X User Tweets
X User Tweets is used to fetch timeline posts from an X account.
- Fetch user tweets by screen name
- Support page and tweet count limits
- Return profile data and tweet engagement metrics
- Suitable for account monitoring and custom social tracking workflows
Use XCrawl to Fetch X User Tweets
Usage
curl -s -X POST 'https://run.xcrawl.com/v1/data' \
-H 'Authorization: Bearer $XCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"engine": "x_user_tweets",
"screen_name": "elonmusk",
"max_tweets": 10,
"pages": 1,
"delay": 1
}'Request parameter notes:
enginemust bex_user_tweetsscreen_namespecifies the account handlemax_tweetslimits how many tweets to keeppagesspecifies the maximum page countdelaycontrols the pause between page fetches
Response Example
{
"user": {
"name": "Elon Musk",
"screen_name": "elonmusk",
"followers_count": 237651757
},
"tweets": [
{
"id": "2038394048885805303",
"full_text": "The largest cultural exchange in history just dropped.",
"favorite_count": 13991
}
]
}Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
screen_name | string | X account handle. |
max_tweets | number | Maximum number of tweets to keep. |
pages | number | Maximum number of pages to fetch. |
delay | number | Delay in seconds between page fetches. |
Parameter Notes
max_tweetsdefaults to10pagesdefaults to1delaydefaults to1
Response Fields
Response data is returned at the top level.
| Field | Type | Description |
|---|---|---|
user | object | Basic information about the target account. |
pages_fetched | number | Number of pages actually fetched. |
next_cursor | string | Cursor for the next page. |
tweets | array | Tweet list. |
User Fields
Common fields in user include:
| Field | Type | Description |
|---|---|---|
id | string | User id. |
name | string | Display name. |
screen_name | string | Account handle. |
description | string | Profile bio. |
followers_count | number | Follower count. |
friends_count | number | Following count. |
statuses_count | number | Total post count. |
verified | boolean | Whether the account is verified. |
Tweet Fields
Each item in tweets[] includes:
| Field | Type | Description |
|---|---|---|
id | string | Tweet id. |
created_at | string | Publish time. |
full_text | string | Full tweet text. |
lang | string | Language code. |
favorite_count | number | Like count. |
retweet_count | number | Retweet count. |
reply_count | number | Reply count. |
quote_count | number | Quote count. |
bookmark_count | number | Bookmark count. |
