Skip to main content

Pagination

APIs often return a large number of records, too many to send all at once. To avoid this, many APIs split the data into pages. This technique is called pagination.

Instead of giving you everything in a single response, the API returns a portion (for example, 100 records), along with a link to the next page of data. You need to make another request to that next URL to get more results, and repeat this process until all the data is retrieved.

How Note API Connector Handles Pagination

Note API Connector supports Next URL pagination. This means it can automatically follow the "next page" link provided by the API, fetch more data, and continue until all the pages are loaded, or until you've reached a page limit you define.

How to Set It Up

To enable pagination in Note API Connector:

  1. In the Request Overview tab, open Import Settings and enable Pagination.
  2. Choose "Next URL" as the pagination method.
  3. Choose whether to:
    • Fetch all pages — Note API Connector will continue following the next URLs until there are no more pages.
    • 🔢 Fetch a limited number of pages — Stop after the number of pages you specify.
  4. In the Next URL Path field, specify where the next page URL is located in your API response.

Pagination Next URL

How to Find the Next URL Path

To help you find the correct path:

1️⃣ On the right side, you’ll see a tree view of your API response.
2️⃣ Find the field that contains the "next page" URL (e.g., pagination.next, meta.next, or links.next_url).
3️⃣ Click the copy icon to copy the path.
4️⃣ Paste it into the Next URL Path field in the pagination settings.

✅ Once pasted, Note API Connector will validate the path. If the path is correct, you’ll see a green checkmark and a message confirming it's a valid path.

Define Next URL Path

Examples of Next URL Paths

tip

Even though APIs may look different, the logic is the same: look for the value that contains a URL to the next page.


Example 1: If the API response looks like this:

{
"results": [...],
"pagination": {
"next": "https://api.example.com/data?page=2"
}
}

The Next URL Path would be: pagination.next


Example 2: If the API response looks like this:

{
"data": [...],
"meta": {
"next": "https://api.myapi.com/data?offset=20"
}
}

The Next URL Path would be: meta.next


Example 3: If the API response looks like this:

{
"items": [...],
"links": {
"self": "https://...",
"next_url": "https://api.anotherapi.com/page/3"
}
}

The Next URL Path would be: links.next_url


Example 4: Some APIs return null or an empty string when there are no more pages to fetch:

{
"data": [...],
"nextPage": null
}

or

{
"data": [...],
"nextPage": ""
}

The Next URL Path would be: nextPage

Note: This usually means you're already on the last (or only) page. Pagination stops when the value is null, empty, or missing.

Summary

  • Pagination lets APIs return large datasets in smaller chunks.
  • Note API Connector can automatically fetch all pages using Next URL pagination.
  • You can choose to fetch all pages or limit how many pages to import.
  • Use the API Response Tree View to copy the correct path to the next page URL and paste it into the Next URL Path field.

This allows you to import full datasets without writing any code, even if the API response is paginated across dozens or hundreds of pages.

Leave a Comment