# Twitter (X) Trending Topics API

> 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.

Source: https://www.sandbase.ai/apis/twitter/web/trending
API reference: https://www.sandbase.ai/apis/twitter/web/trending/docs

## Facts

- Provider: Twitter
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/twitter/web/trending`
- 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/trending` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `country` | string | no |  |

## FAQ

### How do I use the Twitter (X) Trending Topics API?

Send a POST request to https://api.sandbase.ai/v1/api/twitter/web/trending 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) Trending Topics 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) Trending Topics API accept?

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

### What does the Twitter (X) Trending Topics 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) Trending Topics 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) Trending Topics API

Fetch the current X (Twitter) trending list for a country. Each trend includes its name and context such as the category it trends in.

#### Use cases

- Monitor what is trending in a market right now.
- Trigger alerts when a brand or keyword trends.
- Plan timely social content.

#### Request

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

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `country` | string | No | Country, default is UnitedStates, other optional values are as follows: China; India; Japan; Russia; Germany; Indonesia… |

#### Example response

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

```json
{
  "trends": [
    {
      "context": "Sports · Trending",
      "name": "Falcons"
    }
  ]
}
```

#### Notes

- `country` defaults to `UnitedStates`; other values include Japan, India, UnitedKingdom, Germany and more.

#### 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 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.
- [Twitter (X) User Profile](/model/twitter/web/user-profile): 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.
