# Twitter (X) User Profile API

> Get a Twitter / X user profile by screen name or user ID: name, bio, follower and following counts, post and media counts, verification and creation date.

Source: https://www.sandbase.ai/apis/twitter/web/user-profile
API reference: https://www.sandbase.ai/apis/twitter/web/user-profile/docs

## Facts

- Provider: Twitter
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/twitter/web/user-profile`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, twitter
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/twitter/web/user-profile` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `rest_id` | integer | no |  |
| `screen_name` | string | no |  |

## FAQ

### How do I use the Twitter (X) User Profile API?

Send a POST request to https://api.sandbase.ai/v1/api/twitter/web/user-profile with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Twitter (X) User Profile API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Twitter (X) User Profile API accept?

No parameters are required. Optional: rest_id (integer) and screen_name (string). The Parameters table and the Playground on this page list every field.

### What does the Twitter (X) User Profile API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Twitter developer account or API key?

No. Twitter (X) User Profile runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Twitter API access separately.

## README

### Twitter (X) User Profile API

Pass an X screen name (or numeric user ID) and get the account's public profile and counts.

#### Use cases

- Vet influencers and partners.
- Track follower growth.
- Resolve handles to stable user IDs.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/user-profile" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"screen_name": "NASA"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `rest_id` | integer | No | User ID, for example: 44196397, if the user ID is used, the username will be ignored, only one of them can be selected. |
| `screen_name` | string | No | Screen Name, for example: elonmusk, can be obtained from the user's homepage link, for example: elonmusk in https://twi… |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "blue_verified": true,
  "desc": "Making the seemingly impossible, possible. ✨",
  "id": "11348282",
  "media_count": 28179,
  "name": "NASA",
  "rest_id": "11348282",
  "status": "active",
  "statuses_count": 74382,
  "sub_count": 92374842,
  "verification_type": "Government"
}
```

#### Related APIs

- [Twitter (X) Search](/model/twitter/web/search-timeline): Search Twitter / X posts by keyword and get tweets with text, author, time and engagement counts (likes, retweets, replies, views).
- [Twitter (X) Trending Topics](/model/twitter/web/trending): Get trending topics on Twitter / X by country: trend names with their category context, for the United States, Japan, India, the UK and other markets.
- [Twitter Tweet Detail](/model/twitter/web/tweet-detail): Get a single tweet (X post) by ID: full text, author, media, and like, retweet, reply, quote, bookmark and view counts.
