Authentication
Endpoint requirements
Private metrics
To access private metrics, you must authenticate on behalf of the Post author:Fields and expansions
By default, responses include onlyid, text, and edit_history_tweet_ids. Request additional data:
Example request
cURL
Key fields
Fields and expansions guide
Learn more about customizing responses
Pagination
Timelines return up to 100 Posts per request. Use pagination for larger result sets.How it works
- Make initial request with
max_results - Get
next_tokenfrom themetaobject - Include
pagination_tokenin next request - Repeat until no
next_tokenis returned
Example
cURL
Pagination guide
Learn more about pagination
Filtering results
Time-based filtering
Exclude parameter
Remove specific Post types from results:cURL
Volume limits
Each timeline has maximum retrieval limits:Requesting Posts beyond these limits returns a successful response with no data.
Post edits
Posts can be edited up to 5 times within 30 minutes. Timeline endpoints always return the most recent version.Considerations
- Posts older than 30 minutes represent their final version
- Near-real-time use cases should account for potential edits
- Use Post lookup to verify final state if needed
Edit Posts fundamentals
Learn more about Post edits
Post metrics
Public metrics
Available for all Posts with App-Only or User Context authentication:Private metrics
Requires User Context authentication from the Post author:- Only available for Posts from the last 30 days
- Only returned for Posts authored by the authenticated user
- Returns error for other users’ Posts
Edge cases
Non-public metrics and pagination
Non-public metrics and pagination
When requesting non-public metrics for Posts older than 30 days, you may receive a
next_token with result_count: 0. To avoid this:- Keep requests within the last 30 days
- Use
max_resultsof at least 10
Promoted metrics for non-promoted Posts
Promoted metrics for non-promoted Posts
Requesting promoted metrics for Posts that weren’t promoted returns an empty response. This is a known issue.
Truncated Retweet text
Truncated Retweet text
For Retweets with text over 140 characters, the text field is truncated. Use the
referenced_tweets.id expansion to get the full text.Next steps
Home timeline quickstart
Get a user’s home feed
Mentions quickstart
Get mentions for a user
API Reference
Full endpoint documentation
Pagination
Handle large result sets