Skip to main content
Some APIs return more results than fit in one response: an account’s followers, a search with thousands of hits. Pagination support is SKU-specific. Inspect the API’s input and output schemas before adding pagination fields.

Confirm pagination support

Fetch the selected API’s contract with GET /v1/apis/{sku} or MCP get_api. Use cursor pagination only when inputSchema declares cursor and the output schema declares nextCursor. Include limit or requireSinglePage only when inputSchema also declares those fields. For an API that declares this contract, call again with data.nextCursor as cursor. When nextCursor is null, you have reached the end. The examples below use instagram.followers, whose schema declares these fields.

What the fields mean

  • limit, when declared, is the most items you want in this response: a page cap, not a grand total. Follow nextCursor for more.
  • cursor is an opaque token from a previous response’s nextCursor. Pass it to continue, or omit it to start from the first page. Do not parse or build it yourself: it is sealed and tied to one walk.
  • nextCursor is in the response at output.data.nextCursor. A non-null value means there is more; null means you have reached the end of this walk.
The selected SKU’s schema defines its page-size constraints. Do not copy a limit value from another API. If a cursor is rejected because it expired, start again without a cursor.

Get everything in one call

If you cannot loop, for a spreadsheet import, a no-code tool, or a one-shot job, check whether the selected inputSchema declares requireSinglePage. When it does, set requireSinglePage: true to request up to the schema’s allowed limit in one response. This route can cost more than walking pages.
curl

Cost

Check the selected API’s pricing before choosing between paging and a supported single-page request. Your exact charge in USD is returned as costUsd.
Not sure whether an API paginates? Inspect its schema with curl https://api.getanyapi.com/v1/apis/instagram.followers. An input that declares cursor, plus an output that declares nextCursor, means it supports cursor pagination. Other controls are available only when the input schema declares them.