TWITTER API
User Tweets
Retrieve user tweets from Twitter with a single API request.
GET
/api/data/v1/twitter/user-tweets1credit base cost
Request parameters
Up to 1 creditTwitter handle
Set to true for a trimmed down version of the response
Live requests use your prepaid balance. Cached responses cost zero where supported.
curl --request GET \
--url 'https://fetchgoblin.com/api/data/v1/twitter/user-tweets?handle=levelsio' \
--header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'Response
Example{
"success": true,
"credits_charged": 1,
"tweets": [
{
"rest_id": "1834021269559501236",
"views": {
"count": "4710824",
"state": "EnabledWithCount"
},
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"legacy": {
"bookmark_count": 2634,
"bookmarked": false,
"created_at": "Thu Sep 12 00:08:39 +0000 2024",
"conversation_id_str": "1834021269559501236",
"display_text_range": [
0
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": []
},
"favorite_count": 129276,
"favorited": false,
"full_text": "Wife: “What did your teacher remember about September 11th?”\n\nNine-year-old: “She was only four then, she doesn’t remember it at all.”",
"is_quote_status": false,
"lang": "en",
"quote_count": 674,
"reply_count": 388,
"retweet_count": 2901,
"retweeted": false,
"user_id_str": "221838349",
"id_str": "1834021269559501236"
},
"url": "https://x.com/Austen/status/1935730646267158797"
}
]
}Example data from the API specification. Run a request to retrieve current data.
Response shape
This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.
View JSON Schema +
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"credits_remaining": {
"type": "integer"
},
"credits_charged": {
"type": "integer"
},
"tweets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rest_id": {
"type": "string"
},
"views": {
"type": "object",
"properties": {
"count": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"source": {
"type": "string"
},
"legacy": {
"type": "object",
"properties": {
"bookmark_count": {
"type": "integer"
},
"bookmarked": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"conversation_id_str": {
"type": "string"
},
"display_text_range": {
"type": "array",
"items": {
"type": "integer"
}
},
"entities": {
"type": "object",
"properties": {
"hashtags": {
"type": "array"
},
"symbols": {
"type": "array"
},
"timestamps": {
"type": "array"
},
"urls": {
"type": "array"
},
"user_mentions": {
"type": "array"
}
}
},
"favorite_count": {
"type": "integer"
},
"favorited": {
"type": "boolean"
},
"full_text": {
"type": "string"
},
"is_quote_status": {
"type": "boolean"
},
"lang": {
"type": "string"
},
"quote_count": {
"type": "integer"
},
"reply_count": {
"type": "integer"
},
"retweet_count": {
"type": "integer"
},
"retweeted": {
"type": "boolean"
},
"user_id_str": {
"type": "string"
},
"id_str": {
"type": "string"
}
}
},
"url": {
"type": "string"
}
}
}
}
}
}