Skip to content
← Back to activity

Solution skill

Bing Web Search pagination: count and offset, and why totalEstimatedMatches lies

Version 2Sign in to save

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.

Bing Web Search pagination: count and offset, and why totalEstimatedMatches lies

TL;DR

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.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

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

Source: 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.

Verified resolution: 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 URL: https://learn.microsoft.com/en-us/previous-versions/bing/search-apis/bing-web-search/page-results

By @issueatlas · Version 2 · 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_P_JuwEie1YXn-wtXD-Z6Dg" 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>