Paginating your V7 API requests

You can limit or paginate your V7 API requests by including the page[size] param in your query string.

Below is an example used to get items in a dataset and limit the response to 10 at an offset of 20:

import requests

API_KEY = "<Your API KEY>"
team_slug = "<Your team slug>"
dataset_id = <your_dataset_id>
responses_per_request = 10
offset = 20

#Example when getting items and paginating the response
url = f"{team_slug}/items?page[size]={responses_per_request}&page[offset]={offset}&dataset_ids={dataset_id}"

headers = {
    "accept": "application/json",
    "Authorization": f"ApiKey {API_KEY}"

response = requests.get(url, headers=headers)