Pagination
Learn how to use cursor pagination in the Airstack SDK using special and powerful pagination functions and variables offered by the Airstack SDK out of the box.
Last updated
Was this helpful?
Learn how to use cursor pagination in the Airstack SDK using special and powerful pagination functions and variables offered by the Airstack SDK out of the box.
Last updated
Was this helpful?
With the SDKs, you will not need to manually manage the cursor of each page yourself as they provide special pagination functions and variables that can help you simplify the process:
hasNextPage
has_next_page
Boolean indicating if the next page exists
hasPrevPage
has_prev_page
Boolean indicating if the previous page exists
getNextPage
get_next_page
Get response data and error on the next page
getPrevPage
get_prev_page
Get response data and error on the previous page
If you are using JavaScript/TypeScript or Python, Install the Airstack SDK:
React
Node
Here is sample implementation of using the special functions and variables mentioned above for paginating through all the data returned by the API:
Web SDK Reference
useQueryWithPagination
useLazyQueryWithPagination
NodeJS SDK Reference
fetchQueryWithPagination
If you have any questions or need help regarding how to use cursor pagination with Airstack SDK, please join our Airstack's group.