xAPIs.dev
API Reference · v2
Free Tools{ }OpenAPI YAMLGet API key
API Reference / User / Check follow relationship

Check follow relationship

GET/twitter/user/check_follow_relationship2 credits

Check whether one account follows another. The sample response below is captured from the live API. List endpoints paginate with `has_next_page` and `next_cursor`.

Authentication required
Send your key in the x-api-key header. Requests without a valid key return 401.

Query parameters

source_user_name
stringrequired
The source @handle.
target_user_name
stringrequired
The target @handle to check against.

Response fields

dataobject
Response payload.
statusstring
Request status: "success" or "error".
messagestring
Status message from the upstream.
data.followingboolean
Whether source_user_name follows target_user_name.
data.followed_byboolean
Whether target_user_name follows source_user_name back.
Request
curl https://v2.xapis.dev/twitter/user/check_follow_relationship \
  -G --data-urlencode "source_user_name=jack" \
  -G --data-urlencode "target_user_name=elonmusk" \
  -H "x-api-key: $XAPIS_KEY"
Response200 OK
application/json
{
  "status": "success",
  "message": "check follow relationship success",
  "data": {
    "following": true,
    "followed_by": true
  }
}
base url · https://v2.xapis.dev
Ready to call Check follow relationship?