xdataapi.io

Pagination

Cursors, page size and ordering.

List endpoints return a page and, when there is more, a next_cursor. Pass it back as cursor to get the next page.

curl "https://api.xdataapi.io/v1/users/x/tweets?count=20" -H "x-api-key: $KEY"
# ... "next_cursor": "DAABCgABG..."
curl "https://api.xdataapi.io/v1/users/x/tweets?count=20&cursor=DAABCgABG..." -H "x-api-key: $KEY"
  • Cursors are opaque strings. Do not parse or store them for longer than a session.
  • A page without next_cursor is the last one.
  • A page holds exactly count items while there are that many, from 1 up to 100 for timelines, 50 for search and 200 for followers. You are charged for the items you receive.
  • Cursors can point into the middle of a page we already hold; the next call is then served from cache at half price. Pass them back as they are.
  • Timelines are newest first. Search with product=Latest is newest first; Top is by relevance where available.