LogoAIDIR Docs

Followers

API for getting a Twitter user's followers list

Followers

Get the list of followers for a specific Twitter user.

Request

URL: /api/twitter/followers

Method: GET or POST

Request Parameters:

ParameterTypeRequiredDescription
restIdstringYesUser's unique ID identifier

Response

A successful response will return a list of users following the specified user, including basic information for each follower, such as username, display name, profile picture, etc.

Examples

Request Example

# GET request
curl --request GET \
  --url 'https://www.aidir.fun/api/twitter/followers?restId=44196397' \
  --header 'X-API-Key: <api-key>'
 
# POST request
curl --request POST \
  --url 'https://www.aidir.fun/api/twitter/followers' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
    "restId": "44196397"
  }'

Response Example

{
  "data": {
    "user": {
      "id": "44196397",
      "rest_id": "44196397",
      "name": "Elon Musk",
      "screen_name": "elonmusk"
    },
    "followers": {
      "timeline": {
        "instructions": [
          {
            "entries": [
              {
                "content": {
                  "user": {
                    "id": "12345678",
                    "rest_id": "12345678",
                    "name": "Twitter Follower",
                    "screen_name": "twitterfollower",
                    "profile_image_url": "https://pbs.twimg.com/profile_images/1234567890/avatar.jpg",
                    "description": "This is a Twitter follower",
                    "followers_count": 100,
                    "following_count": 200,
                    "verified": false
                  }
                }
              }
            ],
            "cursor": {
              "value": "HBaAgICw4OOTExPDI5MTY4OTY5MDY4NzAyMjk3MQoSAAA=",
              "cursorType": "Bottom"
            }
          }
        ]
      }
    }
  }
}

Error Responses

Status CodeDescription
400Request parameter error, e.g., missing required restId parameter
401Authentication failed, API key invalid or missing
404User does not exist
500Internal server error

Pagination

The response may contain a cursor object which can be used to retrieve more results. To get the next page of results, you can add the appropriate cursor parameter to your request (the specific parameter name depends on the Twitter API implementation).

Notes

  • For accounts with a large number of followers, this API may require multiple requests to retrieve the complete list
  • Due to Twitter API limitations, for accounts with an extremely large number of followers (such as celebrities or public figures), it may not be possible to retrieve the complete followers list
  • Some accounts' followers lists may not be fully accessible due to privacy settings

Table of Contents