How to identify your API’s pagination type
Most APIs document their pagination method in a dedicated “Pagination” section or within specific endpoint documentation. Check your API documentation for these patterns:- URL parameters: “page”, “offset”, “limit”, “cursor”, or “after”
- Request body fields: Pagination parameters sent in the body instead of URL
- Response fields: “next_url”, “next_cursor”, “has_more”, or “total_pages”
- Headers: Custom pagination headers like “page” or “x-page”
- GraphQL: Cursor-based with “first”, “after”, or “before” arguments
Data Fetcher pagination types
Data Fetcher handles the most common types of pagination. Click any type below to jump to its setup instructions:- Page
- Page 1:
http://example.com/?page=1 - Page 2:
https://www.example.com/?page=2
- Offset
- Page 1:
https://www.example.com/?offset=0&limit=50 - Page 2:
https://www.example.com/?offset=50&limit=100
- Cursor
- Page 1:
http://www.example.com - Page 2:
https://www.example.com/?starting_after=cus_IOCwDqeBZGGsrF
- Next URL
- Offset body
- Page 1 body:
{ "startRow": 0, "rowLimit": 1000 } - Page 2 body:
{ "startRow": 1000, "rowLimit": 1000 }
- Cursor body
- Page 1 body:
{ "pageToken": "" } - Page 2 body:
{ "pageToken": "cus_IOCwDqeBZGGsrF" }
- Header
- Page 1 headers:
page: 1 - Page 2 headers:
page: 2
- Path
- Page 1:
https://api.example.com/stocks/1 - Page 2:
https://api.example.com/stocks/2
- GraphQL Cursor
- Page 1:
afterwould be set to null - Page 2:
afterwould be set to theendCursorvalue (or the finalIDvalue for some APIs).
Select pagination type
- On the request screen, click to open the Advanced settings.
- Scroll to Max response records, and enter the maximum number of records you want to receive.
- Under Pagination, select the pagination type using the dropdown.
Set the number of pages to fetch
Each page that is fetched will use 1 out of your monthly workspace runs.
- Fetch all pages: Automatically paginate through every page until no more records are returned. Test this option first, as it can sometimes cause infinite runs if the API always returns data.
- Set a maximum number of pages: Enter a specific number of pages to fetch. Data Fetcher will stop when it reaches this limit, when no items are returned, or when a page has fewer records than the last one.
- If you want to force pagination up to this number of pages even when fewer items are returned, click the settings icon (⚙️) next to the number of page input and enable Keep paginating when no/fewer items returned.
Set up pagination
Set up page pagination
- Set the pagination type to “Page”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the name of the page parameter. This is usually “page” but some APIs may use a different name.
- If the API supports it, you can set a page size parameter and size, so that Data Fetcher knows when to stop paginating more reliably.
- Set the name of the page size parameter.
- Set the page size.
Set up offset pagination
- Set the pagination type to “Offset”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the name of the Offset parameter. This is often called “offset” but some endpoints may use a different name.
- Enter the name of the Limit parameter. This is often called “limit” but some endpoints may use a different name.
- Enter the numerical Limit value. This is the number of items that are fetched in each page. The offset value will be increased by this amount for each request.
- Optionally, enter a Starting offset. If you leave this blank,
0will be used.
Set up cursor pagination
- Make sure you import the cursor field (usually an ID) on the response field mapping and run the request once to create the cursor field in the output table.
- Set the pagination type to “Cursor”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the name of the cursor parameter.
- Select the Cursor field from the output table fields using the dropdown.
- If the API supports it, you can set a page size parameter to help Data Fetcher know when to stop paginating.
- Set the name of the page size parameter.
- Set the page size.
Set up next URL pagination
- Make sure you import the cursor field (usually an id) on the response field mapping and run the request once to create the next URL field in the output table.
- Set the pagination type to “Next URL”.
- Set the number of pages to fetch or select Fetch all pages.
- Select the Next URL field from the output table fields using the dropdown:
- If the API supports it, you can set a page size parameter to help Data Fetcher know when to stop paginating.
- Set the name of the page size parameter.
- Set the page size.
Set up next URL pagination using Link header
- Set the pagination type to “Next URL”.
- Set the number of pages to fetch or select Fetch all pages.
- Turn on Or, use link in response header.
Set up offset body pagination
- Set the pagination type to “Offset Body”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the Offset path for the request body. This uses JSONPath syntax (e.g.,
$.pagination.offset). - Enter the Limit path for the request body. This uses JSONPath syntax (e.g.,
$.pagination.limit). - Enter the Limit value.
- Optionally, enter a Starting offset. If you leave this blank, 0 will be used.
Set up cursor body pagination
- Make sure you import the cursor field (usually an ID) on the response field mapping and run the request once to create the cursor field in the output table.
- Set the pagination type to “Cursor Body”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the Cursor path for the request body. This uses JSONPath syntax (e.g.,
$.pagination.cursor). - Select the Cursor field from the output table fields in the dropdown.
Set up header pagination
- Set the pagination type to “Header”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the name of Page header, e.g. “page”.
- Optionally, enter a Page size header.
- Optionally, enter a Page size.
- Optionally, enter a Starting page. If you leave this blank, 1 will be used.
Set up path pagination
- In the request screen’s main URL field, enter the URL with
{}around the path parameter, e.g.https://api.example.com/stocks/{page}. - Back in the pagination settings, set the pagination type to “Path”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the Path parameter (e.g. “page” in this example).
- Optionally, enter a Page size parameter.
- Optionally, enter a Page size.
- Optionally, enter a Starting page. If you leave this blank, 1 will be used.
Set up GraphQL Cursor Pagination
- Make sure you import the cursor field (usually an ID) on the response field mapping and run the request once to create the cursor field in the output table.
- In the request screen’s main Body → GraphQL → Query section, enter the GraphQL query, including any pagination arguments.
- There is no need to add them in the Variables section, as Data Fetcher will handle this automatically.
- Set the pagination type to “GraphQL Cursor”.
- Set the number of pages to fetch or select Fetch all pages.
- Enter the Cursor variable name.
- Select the Cursor field from the dropdown. Typically, this is an ID field or a pagination cursor field in the response.
- You can optionally enter a Page size variable or just a Page size value. This will help Data Fetcher know when to stop paginating if you have selected the Fetch all pages option.P