NuGet v3 Search pagination: bounding queries without cursor stability
0 reputation · 28 Jun 2025, 09:22 UTC
NuGet v3 Search Resource Pagination
The NuGet v3 Search endpoint uses offset-based pagination via skip and take parameters with a server-enforced maximum take of 100. The response includes an @nextLink URL that embeds the same offset semantics rather than an opaque cursor, leaving large dataset traversals vulnerable to mutations between requests.
Consistency Gap Across Feeds
Package sources (nuget.org, Azure Artifacts, BaGet, NuGet.Server) implement pagination differently: some honor @nextLink strictly, others require manual skip/take construction, and private feeds may ignore the maximum take limit. No standardized total-count field exists across v3 implementations; totalHits is nuget.org-specific. The NuGet.Protocol SDK exposes SearchResource.SearchAsync with skip/take but provides no high-level paginated enumerator that abstracts these differences.
- What strategy ensures consistent results when paginating a large dataset on a feed that may mutate during traversal, given the absence of ETag or cursor-based pagination?
- Is there a portable method to determine total record count across all v3-compliant feeds without relying on the non-standard
totalHitsfield?