Pagination
Learn how to paginate TheirStack API responses with page-based and offset-based methods, including tips for faster queries on GET and POST endpoints.
Responses that return a list of items are paginated. We offer two different pagination strategies:
-
Page-based: This method allows you to navigate through paginated data by specifying the
pageandlimitparameters. Thepageparameter indicates the page number you wish to retrieve, while thelimitparameter specifies the maximum number of items to return per page. For POST requests, include these parameters in the request body. For GET requests, use them as query parameters. -
Offset-based: This method allows you to navigate through paginated data by specifying the
offsetandlimitparameters. Theoffsetparameter indicates the starting point within the collection of results, while thelimitparameter specifies the maximum number of items to return. For POST requests, include these parameters in the request body. For GET requests, use them as query parameters. Some of these endpoints also support theinclude_total_resultsbody or query parameter. If you set it tofalse, the responses will be faster, and the fieldtotal_resultsof the response will benull.
Choosing a limit for searches
For paid job and company searches through the API or MCP, your available API credits must cover limit multiplied by your credit cost per record. If they do not, the API returns 402 Payment Required before running the search, even if fewer results might match. Lower limit to fit your balance or add credits, then retry.
This check does not consume credits. You are charged for the records returned. Free preview searches and searches in the TheirStack app keep their existing behavior.
How is this guide?
Last updated on
Authentication
Learn how to set up TheirStack API authentication with Bearer token API keys — create, manage, and revoke keys directly from your account settings.
Rate Limit
Discover how TheirStack API rate limits work across free and paid tiers, with fixed windows, IETF-compliant headers, and retry best practices.
