Skip to content

Verify user is following another user on Twitter/X - Social Actions API

This endpoint provides a convenient way to check if a user (identified by source_user_id) is following another user (identified by target_user_id). The endpoint achieves this without scraping the entire followers list which allows us to deliver a fully accurate result with minimal latency.

GET https://api.socialdata.tools/twitter/user/{source_user_id}/following/{target_user_id}

Headers

Authorization string required

Authorization Bearer header containing your SocialData API key

Example: Bearer YOUR_API_KEY

Path Parameters

source_user_id integer required

The numeric ID of the follower user

Example: 1729591119699124560

target_user_id integer required

The numeric ID of the user being followed

Example: 1729591119699124560

Code Examples

Terminal window
curl "https://api.socialdata.tools/twitter/user/1319287761048723458/following/44196397"
-H 'Authorization: Bearer API_KEY'
-H 'Accept: application/json'

Example Responses

{
"status": "success",
"source_user_id": "123123123...",
"target_user_id": "456456456...",
"is_following": true,
"followers_checked_count": null // Deprecated, always null
}

Response Codes

  • 200 OK - request succeeded
  • 402 Payment Required - not enough credits to perform this request
  • 404 Not Found - requested target user does not exist
  • 422 Unprocessable Content - validation failed (e.g. one of the required parameters was not provided)
  • 500 Internal Error - API internal error, typically means that SocialData API failed to obtain the requested information and you should try again later

Useful Resources