# Retrieve users search results by screenname

{% hint style="danger" %} <mark style="color:red;">**WARNING:**</mark>&#x20;

**You are viewing an outdated version of our documentation.** \
**For the latest and most accurate information, please visit** [**docs.socialdata.tools**](https://docs.socialdata.tools)**.**
{% endhint %}

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

### Endpoint

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

### Endpoint parameters

| Name                                        | Description  | Example |
| ------------------------------------------- | ------------ | ------- |
| <p>query<br><strong>(Required)</strong></p> | 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

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

[![Run In Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/36444222-9d3f261a-6fc3-44cd-90eb-f0d191d6d1a8?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D36444222-9d3f261a-6fc3-44cd-90eb-f0d191d6d1a8%26entityType%3Dcollection%26workspaceId%3D22407140-425b-41ff-969e-1fb938fe8e86)

### Example response

```json
// 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"
}
```
