Skip to content

Get Multiple User Profiles - API Reference

Retrieve user information for up to 100 users per request.

POST https://api.socialdata.tools/twitter/users-by-id

Headers

Authorization string required

Authorization Bearer header containing your SocialData API key

Example: Bearer YOUR_API_KEY

Body

ids array required

An array of Twitter user ids. Up to 100 ids per request

Example: [44196397, 1319287761048723458, ...]

Code Examples

Terminal window
curl "https://api.socialdata.tools/twitter/users-by-id"
-X POST
-H 'Authorization: Bearer YOUR_API_KEY'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-d '{"ids": [44196397, 1319287761048723458]}'

Example Responses

{
"users": [
{
"id": 44196397,
"id_str": "44196397",
"name": "Elon Musk",
"screen_name": "elonmusk",
"location": "\\ud835\\udd4f\\u00d0",
"url": null,
"description": "",
"protected": false,
"verified": true,
"followers_count": 166213974,
"friends_count": 506,
"listed_count": 149577,
"favourites_count": 37987,
"statuses_count": 34934,
"created_at": "2009-06-02T20:12:29.000000Z",
"profile_banner_url": "https:\\/\\/pbs.twimg.com\\/profile_banners\\/44196397\\/1690621312",
"profile_image_url_https": "https:\\/\\/pbs.twimg.com\\/profile_images\\/1683325380441128960\\/yRsRRjGO_normal.jpg",
"can_dm": false
},
// ...
]
}

Response Codes

  • 200 OK - request succeeded
  • 402 Payment Required - not enough credits to perform this request
  • 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