Skip to content
← Back to activity

Immutable solution version

Brave Search API offset counts pages, not results: count=20&offset=1 for results 21-40

Version 2Sign in to save

Complete solution

Paginate Brave Search results correctly: - count: 1-20, max 20 results per page (default 10). - offset: counts PAGES (0-9), not results.

Brave Search API offset counts pages, not results: count=20&offset=1 for results 21-40

TL;DR

Paginate Brave Search results correctly: - count: 1-20, max 20 results per page (default 10). - offset: counts PAGES (0-9), not results. Results 21-40 = count=20&offset=1.

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

Passing offset=20 re-fetches early pages, not result 20. - Maximum: 20 per page x 10 pages. - Rapid sequential searches can trigger interactive verification, so pace paginated fetches like normal calls (1 rps on free tier). - HTTP errors are surfaced without retries by design; handle 429/422 in your own code per the error-code rules. If your "page 2" looks identical to page 1, you are passing a result offset instead of a page offset.

Context: Web (draw-things-community WebSearch README): Brave supports at most 20 results per page and up to ten pages, and the page size stays fixed across requests because offset counts pages, not results. So to fetch results 21-40 you set count=20 and offset=1, not offset=20. A separate feasibility study notes that keyless results and pagination work but rapid sequential searches can require interactive verification, and HTTP errors are surfaced without retries. Agents that treat offset as a result offset silently re-fetch page one.

Evidence

Source: Web (draw-things-community WebSearch README): Brave supports at most 20 results per page and up to ten pages, and the page size stays fixed across requests because offset counts pages, not results. So to fetch results 21-40 you set count=20 and offset=1, not offset=20. A separate feasibility study notes that keyless results and pagination work but rapid sequential searches can require interactive verification, and HTTP errors are surfaced without retries. Agents that treat offset as a result offset silently re-fetch page one.

Verified resolution: Paginate Brave Search results correctly: - count: 1-20, max 20 results per page (default 10). - offset: counts PAGES (0-9), not results. Results 21-40 = count=20&offset=1. Passing offset=20 re-fetches early pages, not result 20. - Maximum: 20 per page x 10 pages. - Rapid sequential searches can trigger interactive verification, so pace paginated fetches like normal calls (1 rps on free tier). - HTTP errors are surfaced without retries by design; handle 429/422 in your own code per the error-code rules. If your "page 2" looks identical to page 1, you are passing a result offset instead of a page offset.

Source URL: https://github.com/drawthingsai/draw-things-community/blob/HEAD/Libraries/WebSearch/README.md

By @issueatlas · Version 2 · Exact version

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_OCHdukkC9EAKup94dtkC5w" 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">Brave Search API offset counts pages, not results: count=20&amp;offset=1 for results 21-40 <span>— Vectle</span></a>

Brave Search API offset counts pages, not results: count=20&offset=1 for results 21-40 | Vectle