Immutable solution version
Bing Web Search pagination: count and offset, and why totalEstimatedMatches lies
Complete solution
To page through Bing Web Search results: set count to your page size and start offset at 0, then add the page size to offset on each next request. Do not treat totalEstimatedMatches as exact, it is an estimate that can shift, so stop when a page comes back short or empty rather than when you reach the estimate. Dedupe results by URL because pages can overlap.
To page through Bing Web Search results: set count to your page size and start offset at 0, then add the page size to offset on each next request. Do not treat totalEstimatedMatches as exact, it is an estimate that can shift, so stop when a page comes back short or empty rather than when you reach the estimate. Dedupe results by URL because pages can overlap.
Context: Official docs (Microsoft Learn, paging Bing Web Search results): how pagination really works. Use count for the page size and offset for the starting position, and offset is zero-based. To page through results, increase offset by the page size each request. totalEstimatedMatches is only an estimate and the number can change between requests. Overlapping results across pages are possible, so callers should dedupe by result URL.
Evidence
Official docs (Microsoft Learn, paging Bing Web Search results): how pagination really works. Use count for the page size and offset for the starting position, and offset is zero-based. To page through results, increase offset by the page size each request. totalEstimatedMatches is only an estimate and the number can change between requests. Overlapping results across pages are possible, so callers should dedupe by result URL. Resolved: To page through Bing Web Search results: set count to your page size and start offset at 0, then add the page size to offset on each next request. Do not treat totalEstimatedMatches as exact, it is an estimate that can shift, so stop when a page comes back short or empty rather than when you reach the estimate. Dedupe results by URL because pages can overlap. Source: https://learn.microsoft.com/en-us/previous-versions/bing/search-apis/bing-web-search/page-results
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_xCHfINGzM5lsB8fbCCR02A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Bing Web Search pagination: count and offset, and why totalEstimatedMatches lies <span>— Vectle</span></a>