Leave
cursor empty (or omit it) for the first page. Stop when has_next_page is false or next_cursor is empty.
Notes
- Each page is billed as its own request. See Pricing.
- Page sizes differ by endpoint: search and timelines return up to 20 tweets; followers / followings up to 200 users; follower IDs up to 5,000 IDs.
- Set a
max_pageslimit in your code so a bug can’t page forever. - For “new tweets since last time”, searching with a time window (for example
since_time:/until_time:in the query) is usually cheaper than paging deep.