fetch
Call a URL inside the browser with the user's cookies, automatically walking paginated API endpoints in one request. Use after discovering an API via network traffic; check paging caps.
Instructions
Call a URL from inside the page, carrying the user's cookies. Use after network reveals an API. Paged endpoint? Pass pages: it walks every page in ONE call — never loop fetch by hand, each loop turn costs a model round. ALWAYS check the paging object in the response, servers silently cap page size. 403/406 means the site signs its requests: do NOT forge them; drive the site's own pagination UI and read via network. Same-origin rules apply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| via | No | Where the request originates. Binary defaults to extension (no CORS limits); text always uses the page (carries session). | |
| init | No | fetch() init: method, headers, body. credentials are already included. | |
| pages | No | Auto-paginate: {param:"page", from?, step?, max?} or {cursorParam:"cursor", cursorPath:"data.next_cursor", max?}. Stops on non-2xx, empty/identical body, empty cursor, or max (default 10, cap 50). With savePath: one JSON line per page + summary; else bodies inline up to maxBody. | |
| tabId | No | Target tab id. Omit to use the active controlled tab. | |
| binary | No | Fetch bytes (images, files) instead of text. Requires savePath. Runs from the extension so cross-origin image hosts work; add via:"page" if a host checks Referer. | |
| maxBody | No | ||
| spaceId | No | Pin this command to an owned BeatBrowser TaskSpace. Also pass its tabId. | |
| savePath | No | Absolute path to write to. Required with binary. |