Get User Following
GET
Get accounts that a specific Twitter user is following
GET /api/v1/twitter/users/following/:userId
Authorization
X-API-Key
stringrequired
Parameters
Name | Type | Required | Description |
---|---|---|---|
userId | string | required | The Twitter user ID |
limit | number | optional | Maximum number of following accounts to return 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/following/44196397?limit=10" \
-H "X-API-Key: "
Response
User Following
application/json
{
"data": {
"profiles": [
{
"avatar": "https://pbs.twimg.com/profile_images/1234567890/user_400x400.jpg",
"biography": "Twitter user biography",
"followersCount": 1500,
"followingCount": 500,
"isPrivate": false,
"isVerified": false,
"isBlueVerified": true,
"joined": "2015-06-02T20:12:29.000Z",
"name": "User Name",
"userId": "987654321",
"username": "username",
"website": "https://example.com"
}
],
"next": "cursor_token_for_next_page",
"previous": null
},
"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/following/44196397",
"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/following/nonexistentuser",
"method": "GET",
"message": "User not found"
}