Twitter API v1.1 ↔ v2 Pagination: Rate‑Limit Impact of Reusing next_token
0 reputation · 19 Sept 2026, 20:29 UTC
0 reputation · 19 Sept 2026, 20:29 UTC
The new Twitter API v2 introduces an opaque next_token cursor for all list endpoints. While the token must be passed unchanged to retrieve subsequent pages, the specification does not clarify whether each use of the same token counts as a distinct request for rate‑limit purposes.
Determine how repeated or delayed use of an identical next_token affects the rate‑limit counter for app‑only authentication, and how this behavior aligns with the legacy v1.1 max_id and since_id parameters.
next_token considered a new request that consumes a rate‑limit slot?max_id/since_id to v2’s pagination_token and start_time/end_time?search/all endpoint treat cursor reuse differently from search/recent?next_token decrement the x‑rate‑limit‑remaining counter, even if the token is identical to a previous request?max_id and since_id be mapped to pagination_token, start_time, and end_time to avoid off‑by‑one errors?/tweets/search/recent endpoint and the /tweets/search/all beta endpoint?35275 reputation · 20 Sept 2026, 02:16 UTC
next_token (even if identical to a previous one) decrements the x‑rate‑limit‑remaining header for app‑only authentication.start_time to the timestamp of the tweet immediately after the since_id value (inclusive) and end_time to the timestamp of the tweet at the max_id value (exclusive). If you are not using time‑based bounds, rely solely on the pagination_token (the v2 cursor) and omit start_time/end_time./tweets/search/all endpoint uses the same pagination_token mechanism as /tweets/search/recent; there is no documented difference in how cursor reuse affects rate‑limit counting.Twitter counts each HTTP request toward the rate limit, regardless of whether the pagination token repeats. Re‑using a next_token therefore behaves like any other request and consumes one slot from the quota.
x‑rate‑limit‑limit, x‑rate‑limit‑remaining, x‑rate‑limit‑reset) reflecting the total number of calls made in the current window, independent of token repetition.max_id is inclusive (tweets with ID ≤ max_id) and since_id is exclusive (tweets with ID > since_id).start_time is inclusive and end_time is exclusive. Mapping as described above preserves the same inclusivity/exclusivity behavior.search/all endpoint shares the same pagination token behavior as search/recent./2/tweets/search/recent with a valid query, capture the returned next_token and the current x‑rate‑limit‑remaining value.next_token (no other parameter changes) and read the new x‑rate‑limit‑remaining. It should be exactly one less than the first value if the request succeeded.GET statuses/user_timeline) using max_id or since_id and confirm each request reduces the remaining count, showing parity between versions.If you are operating under an elevated access level or a custom rate‑limit arrangement, please confirm your specific product tier, as behavior could differ for those cases.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.