---
title: "Verify User Is Following - Social Actions API"
description: "Confirm whether one Twitter/X user follows another. Low-cost, low-latency check that avoids scraping the full followers list."
source: "https://docs.socialdata.tools/social-actions/verify-user-following/"
---

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

> **Caution**
> 
> When using languages where the `user_id` value exceeds the default Integer type limit (e.g., JavaScript), you should store `user_id` as a String. Use the `id_str` property returned by the API for these values

## Code Examples

#### curl

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

#### JavaScript

```js
const followerId = '1319287761048723458';
const targetId = '44196397';
const API_KEY = 'YOUR_API_KEY_HERE';

fetch(`https://api.socialdata.tools/twitter/user/${followerId}/following/${targetId}`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
})
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
```

#### Python

```python
import requests

followerId = '1319287761048723458'
targetId = '44196397'
API_KEY = 'YOUR_API_KEY_HERE'

url = f'https://api.socialdata.tools/twitter/user/{followerId}/following/{targetId}'

headers = {
    'Authorization': f'Bearer {API_KEY}',
    'Accept': 'application/json'
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Error: {response.status_code}")
    print(response.text)
```

#### PHP

```php
$followerId = '1319287761048723458';
$targetId = '44196397';
$API_KEY = 'YOUR_API_KEY_HERE';

$url = "https://api.socialdata.tools/twitter/user/{$followerId}/following/{$targetId}";

$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $API_KEY",
        "Accept: application/json"
    ]
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
print_r($data);

curl_close($ch);
```

## Example Responses

#### 200

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

#### 402

```json
{
    "status": "error",
    "message": "Insufficient balance"
}
```

#### 404

```json
{
    "status": "error",
    "message": "User not found"
}
```

#### 500

```json
{
    "status": "error",
    "message": "Failed to fetch data from Twitter"
}
```

## 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

## Related endpoints

-   [Get user followers](https://docs.socialdata.tools/reference/get-user-followers/)
-   [Get user verified followers](https://docs.socialdata.tools/reference/get-user-verified-followers/)
-   [Get user followings](https://docs.socialdata.tools/reference/get-user-followings/)

## Before you integrate

-   [Authentication](https://docs.socialdata.tools/getting-started/authentication/)
-   [Rate limits](https://docs.socialdata.tools/getting-started/rate-limits/)
-   [Errors](https://docs.socialdata.tools/getting-started/errors/)
-   [Pricing](https://docs.socialdata.tools/getting-started/pricing/)
