Get User Likes
GET
Get tweets liked by a specific Twitter user
GET /api/v1/twitter/users/likes/:username
Authorization
X-API-Key
stringrequired
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| username | string | required | The Twitter username |
| count | number | optional | Number of tweets to return (1-100) Default: 20 |
| cursor | string | optional | Pagination cursor for fetching next page of results |
Example Request
curl -X GET \
"https://api.xscraper.xyz/api/v1/twitter/users/likes/elonmusk?count=20" \
-H "X-API-Key: " Response
User Likes
application/json
{
"data": {
"tweets": [
{
"id": "1722715025402413077",
"text": "Great thread on AI safety",
"username": "sama",
"name": "Sam Altman",
"likes": 50000,
"replies": 5000,
"retweets": 10000,
"timeParsed": "2025-04-18T15:30:00.000Z",
"hashtags": [],
"photos": [],
"videos": [],
"urls": [],
"isReply": false,
"isRetweet": false
}
],
"next": "cursor_token_for_next_page"
},
"meta": {
"statusCode": 200,
"timestamp": "2025-04-19T15:49:28.824Z"
}
}Error Responses
401 Unauthorized
{
"statusCode": 401,
"timestamp": "2025-04-19T15:49:28.824Z",
"path": "/api/v1/twitter/users/likes/elonmusk",
"method": "GET",
"message": "Invalid or expired API key"
}404 Not Found
{
"statusCode": 404,
"timestamp": "2025-04-19T15:49:28.824Z",
"path": "/api/v1/twitter/users/likes/nonexistentuser",
"method": "GET",
"message": "User not found"
}