Get all tweets from any user's timeline with text, media, engagement metrics, and metadata. Paginate through their entire tweet history.
Average response time: 95ms
const response = await fetch(
'https://scrapebadger.com/v1/twitter/users/elonmusk/latest_tweets',
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
);
const tweets = await response.json();
tweets.data.forEach(t => console.log(t.text, t.favorite_count));{
"data": [
{
"id": "1001",
"text": "Latest tweet from this user",
"favorite_count": 5400,
"retweet_count": 312,
"created_at": "2025-01-20T16:00:00Z"
}
],
"next_cursor": "timeline_cursor_xyz"
}/v1/twitter/users/{username}/latest_tweets| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | Required | The Twitter username to get tweets from |
cursor | string | Optional | Pagination cursor for next page |
Track competitor accounts, engagement rates, and content strategies to benchmark performance and identify opportunities.
Aggregate top-performing content by topic or industry to fuel newsletters, social feeds, and content marketing calendars.
Collect large-scale Twitter datasets for computational social science, NLP research, political analysis, and network studies.
Feed tweet text into NLP pipelines to classify sentiment, detect emotions, and measure public opinion on products, events, or topics.
Get alerts when your brand is mentioned, track share of voice, and respond quickly to customer feedback or PR crises.
Monitor follower growth, engagement trends, and content performance over time to optimize your Twitter strategy.
You can paginate through a user's entire tweet history, typically going back thousands of tweets.
Yes. The timeline includes original tweets, retweets, and replies. Each type is labeled in the response.
The endpoint returns all tweet types. Filter in your application code by checking the tweet type field.
Each page returns up to 20 tweets. Use the cursor to paginate through all available tweets.
Sign up for free and get 1,000 API credits instantly. No credit card required.