---
title: "Get X Trends"
method: GET
path: "/twitter/trends"
tags: ["X Search"]
---

# Get X Trends

`GET /twitter/trends`

## Request

- Base URL: `https://api.desearch.ai`
- URL: `https://api.desearch.ai/twitter/trends`
- Auth: API key in header `Authorization`

Retrieve trending topics on X for a given location using its WOEID (Where On Earth ID). Worldwide is 1 and the United States is 23424977. Only locations X publishes trends for are accepted. An unsupported WOEID is rejected and is not replaced with the Worldwide list.

Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. For example, `usage_count=10` at `$0.015 / 1,000` resolves to `cost_usd=0.00015`. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

## Query parameters

- `woeid` integer, required: WOEID of a location X publishes trends for. Worldwide is 1. The United States is 23424977. An unsupported WOEID is rejected.
- `count` integer, nullable: The number of trends to return. Minimum is 30, maximum is 100.

## Response `200`

A JSON object containing the list of trending topics.

- XTrendsResponse
  - `trends` XTrendItem[], required: List of trending topics
    - `name` string, required: The name of the trending topic
    - `query` string, nullable: The search query associated with the trend
    - `rank` integer, nullable: The rank of the trend
  - `woeid` XTrendsWoeid
    - `name` string, required: The name of the location
    - `id` integer, required: The WOEID (Where On Earth ID) of the location

## Other responses

- `301`: Moved Permanently
- `304`: Not Modified
- `401`: Unauthorized
- `422`: Validation Error
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Trends service unavailable
- `504`: Trends service timed out

---

[API](https://skmtc.dev/desearch/apis/desearch-api.md) · [All operations](https://skmtc.dev/desearch/apis/desearch-api/llms.txt) · [OpenAPI document](https://skmtc.dev/desearch/apis/desearch-api/revisions/c2d7648859bd?raw)
