scraper
Back to API docs

Overview

  • Overview

APIs

  • POSTThread
  • POSTSearch
  • POSTUser Tweets
  • POSTUser Info

Twitter User Tweets

2 credits

Get recent tweets from an X/Twitter user.

POST/api/v1/tools/twitter/user-tweets

Parameters

userstringrequired

Username (e.g. "elonmusk" or "@elonmusk") or profile URL (e.g. "https://x.com/elonmusk").

maxPostsnumber

Maximum number of tweets to return. Must be a positive integer. Defaults to 200. Upper bound is determined by your plan.

includeRepliesboolean

Include tweets that are replies. Defaults to false.

includeRetweetsboolean

Include retweets. Defaults to false.

fieldsstring[]

Fields to include per tweet. Omit for defaults: restId, url, fullText, createdAt, conversationIdStr, favoriteCount, replyCount, retweetCount, quoteCount, bookmarkCount, lang, viewsCount, entities. Available fields also include displayTextRange, source, possiblySensitive, isQuoteStatus, hasBirdwatchNotes, communityNote, replyTo, retweetOf, quoteOf, media, and card. Use ["*"] for all fields.

Response Schema

dataobject

User tweets result

tweetsobject[]

Recent tweets from the user.

truncatedboolean

True if more tweets exist than were returned.

metaobject

Request metadata

toolstring

Tool name (twitter-user-tweets)

creditsUsednumber

Credits consumed (2)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/twitter/user-tweets \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"user": "elonmusk",
"maxPosts": 50
}'

Response Example

{
"data": {
"tweets": [
{
"restId": "9876543210",
"url": "https://x.com/elonmusk/status/9876543210",
"fullText": "Mars soon.",
"createdAt": "2026-04-14T09:30:00.000Z",
"favoriteCount": 45000,
"replyCount": 1200,
"retweetCount": 3400,
"quoteCount": 200,
"bookmarkCount": 800,
"viewsCount": 1200000,
"lang": "en",
"entities": {
"hashtags": [],
"symbols": [],
"urls": [],
"userMentions": []
}
}
],
"truncated": false
},
"meta": {
"tool": "twitter-user-tweets",
"creditsUsed": 2,
"requestId": "req_abc123"
}
}