SocialData.Tools: API Documentation
  • Getting Started
  • Authentication
  • Pricing
  • SDKs and Code Examples
  • Twitter: Tweets
    • Retrieve tweet details
    • Retrieve thread
    • Retrieve article details
    • Retrieve all users who retweeted a tweet
    • Retrieve search results by keyword
    • Retrieve all users who liked a tweet
  • Twitter: Users
    • Retrieve user profile details
    • Retrieve profile's affiliated users
    • Retrieve tweets and replies made by a specific user
    • Retrieve likes made by a specific user
    • Retrieve user's articles
    • Retrieve user's highlighted tweets
    • Retrieve user's followers
    • Retrieve user's following
    • Retrieve user's lists
    • Check if a user is following another user
    • Check if a user retweeted a specific tweet
    • Check if a user commented on a specific tweet
    • Check if a user liked a specific tweet
    • Retrieve users search results by screenname
  • Twitter: Lists
    • Retrieve list details
    • Retrieve list members
  • Twitter: Spaces
    • Retrieve Twitter spaces stream details
  • Twitter / X: Communities
    • Retrieve community tweets timeline
    • Retrieve community members
Powered by GitBook
On this page
  • Endpoint
  • Endpoint parameters
  • Response codes
  • Rate limits
  • Example request
  • Example response
  1. Twitter: Users

Retrieve users search results by screenname

PreviousCheck if a user liked a specific tweetNextRetrieve list details

Last updated 1 day ago

WARNING:

You are viewing an outdated version of our documentation. For the latest and most accurate information, please visit .

Returns a list of users with screenname or full name matching the search query.

Endpoint

GET https://api.socialdata.tools/twitter/search-users?query=...

Endpoint parameters

Name
Description
Example

query (Required)

Search query

elon

Response codes

  • HTTP 200 OK - succeeded

  • HTTP 402 Payment Required - not enough credits to perform this request

  • HTTP 404 Not Found - requested tweet does not exist

  • HTTP 422 Unprocessable Content - validation failed (e.g. one of the required parameters was not provided)

  • HTTP 500 Internal Server Error - other error, typically means that SocialData API failed to obtain the requested information and you should try again later

Rate limits

By default each user has a limit of 120 requests per minute shared across all endpoints. Please reach out to support@socialdata.tools if you need to raise your rate limit.

Example request

curl "https://api.socialdata.tools/twitter/search-users?query=elon"
-H 'Authorization: Bearer API_KEY'
-H 'Accept: application/json'

Example response

// If succeeded: 
{
    "users": [
      {
        "id": 44196397,
        "id_str": "44196397",
        "verified": false,
        "ext_is_blue_verified": true,
        "badges": [
          {
            "badge_url": "https:\/\/pbs.twimg.com\/profile_images\/1683899100922511378\/5lY42eHs_bigger.jpg",
            "badge_type": "BusinessLabel",
            "description": "X"
          }
        ],
        "is_dm_able": false,
        "is_secret_dm_able": false,
        "is_blocked": false,
        "can_media_tag": false,
        "name": "Elon Musk",
        "screen_name": "elonmusk",
        "profile_image_url": "http:\/\/pbs.twimg.com\/profile_images\/1683325380441128960\/yRsRRjGO_normal.jpg",
        "profile_image_url_https": "https:\/\/pbs.twimg.com\/profile_images\/1683325380441128960\/yRsRRjGO_normal.jpg",
        "location": "Tr\u014dllheim",
        "is_protected": false,
        "rounded_score": 0,
        "social_proof": 0,
        "connecting_user_count": 0,
        "connecting_user_ids": [],
        "social_proofs_ordered": [],
        "social_context": {
          "following": false,
          "followed_by": false
        },
        "tokens": [],
        "inline": false
      },
      ...
    ]
}

// If failed:
{
    "status":"error",
    "message":"Failed to fetch data from Twitter"
}

docs.socialdata.tools