Skip to main content
Question

API pagination documentation

  • February 15, 2026
  • 2 replies
  • 6 views

I’m trying to leverage the API to fetch all matches without duplicates but I can't seem to identify which documentation covers the pagination. I know responses include next_page_token and previous_page_token but is there any official documentation on how these work?

  • Does the last page have a next_page_token looping to the first page, requiring us to perform loop detection?
  • Are these tokens/pages to be consumed immediately or can we consume these several minutes/hours apart? For example, if Censys gets new hits while we are processing the pages, are new results appended, ignored, or do they get inserted and potentially cause duplicates by shifting the pagination?

I was unable to find pagination examples in the Go SDK which would have implied the correct usage, nor could I find other community topics explaining next_page_token beyond mentioning their existence.

I would appreciate any insights or references to the docs,
Thanks!

 

2 replies

  • Author
  • New Participant
  • February 16, 2026

Did some testing and the first page does not have a previous_page_token nor does the last page have next_page_token, so looping does not seem to be an issue.

 

Still curious about the time-validity of these tokens.


MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • February 17, 2026

Hi ​@0xThiebaut, sorry about searching the docs coming up with no results - page_token parameters and response details are covered in the docs, but apparently the search function doesn’t look across that data. For example, the search query API endpoint docs describe how to use page_token: https://docs.censys.com/reference/v3-globaldata-search-query

To confirm what you said in your follow-up, if next_page_token is empty, that means you are on the last page of results and there shouldn’t be issues with looping.

Regarding your second question about time validity, the tokens are only valid for your API call’s exact request structure and should be consumed roughly immediately. You might miss some data or the request may fail if you wait a longer period of time (say, an hour) to use a specific page token.

Let me know if that answers your questions and if you have any follow-up questions.