Twitter / X Scraping
X User Tweets Endpoint
POST /v1/x/user-tweets
#Pricing
- 10 credits per request
#Request Fields
usernamerequirednext_page_tokenoptionalprevious_page_tokenoptional
Only one page token may be provided at a time.
#Example Request
{
"username": "ImranKhanPTI"
}
#Example Response
{
"response": [
{
"id": "111",
"tweet_url": "https://x.com/ImranKhanPTI/status/111",
"like_count": 9,
"view_count": 99,
"source": "Twitter Web App",
"sensitive": false,
"media": [
{
"type": "photo",
"image_url": "https://example.com/photo1.jpg?name=orig",
"video_url": null
}
]
}
],
"pagination": {
"next_page_token": "token",
"previous_page_token": null
}
}
#Validation Rules
- both page tokens together ->
422 - invalid page token ->
422withInvalid page token.