API Pagination

Pagination is only relevant to the Search API

To paginate, you can use the parameters from and size

From: From is an integer and must be greater than or equal to 0. This offsets the starting point of the collection returned. The maximum value is 9,900

Size: Size is an integer and must be greater than 0. This limits the number of results returned from the server to a specific number of results. The maximum size is 100.

        "size": 100,
        "from": 0

Using search_after

At the end of any result using the Search API, you will received the "search_after" section. This designates values for the last document property in relation to the query, as well as a tiebreaker.

Using "search_after" allows for deeper pagination of content beyond 10,000 records. It also ensures the true next page of sequenced results, which is useful in rapid data sources. As such, search_after is only usable with Streaming Integrated sources.

๐Ÿ“˜

Usage Limitations

Search_after functionality is only available for stream-integrated sources. For other use cases, utilize the "from" and "size" options.

To use "search_after", use the ID presented at the end of results alongside your query for the next 100 results.

Example result:

    },
    "search_after": [
        "1673997527000"
    ]
}

Example addition to retrieve next 100 results:

{
    "query": {
        "data_sources": [
            "opoint_news"
        ],
        "query": "cats",
        "search_after": [
        "1673997527000"
    ]
    }
}