> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trends by WOEID

> O endpoint Trends by WOEID retorna tópicos em alta para uma localização geográfica específica. Referência para a X API v2 standard tier cobrindo trends by woeid.

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <span>{children}</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

O endpoint Trends by WOEID retorna tópicos em alta para uma localização geográfica específica, identificada por um Yahoo! Where On Earth ID (WOEID).

## Visão geral

<CardGroup cols={2}>
  <Card title="Específico por localização" icon="location-dot">
    Tendências para qualquer localização suportada
  </Card>

  <Card title="Cobertura global" icon="globe">
    Países, cidades e regiões
  </Card>

  <Card title="Tempo real" icon="bolt">
    Tópicos em alta atuais
  </Card>
</CardGroup>

***

## Endpoint

| Método | Endpoint                                                      | Descrição                      |
| :----- | :------------------------------------------------------------ | :----------------------------- |
| GET    | [`/2/trends/by/woeid/:id`](/x-api/trends/get-trends-by-woeid) | Obter tendências para um WOEID |

***

## WOEIDs comuns

| Localização    | WOEID    |
| :------------- | :------- |
| Mundo          | 1        |
| Estados Unidos | 23424977 |
| Reino Unido    | 23424975 |
| Japão          | 23424856 |
| Nova York      | 2459115  |
| Los Angeles    | 2442047  |
| Londres        | 44418    |
| Tóquio         | 1118370  |

***

## Exemplo de requisição

```bash theme={null}
curl "https://api.x.com/2/trends/by/woeid/1" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

## Exemplo de resposta

```json title="Exemplo de resposta" lines wrap icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-brackets.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=ed2428e77bab43e57800e1a590e982fa" theme={null}
{
  "data": [
    {
      "trend_name": "#AI",
      "tweet_count": 250000
    },
    {
      "trend_name": "Breaking News",
      "tweet_count": 180000
    }
  ]
}
```

***

## Primeiros passos

<Note>
  **Pré-requisitos**

  * Uma [conta de desenvolvedor](https://developer.x.com/en/portal/petition/essential/basic-info) aprovada
  * Um [Projeto e App](/resources/fundamentals/developer-apps) no Developer Console
  * O [Bearer Token](/resources/fundamentals/authentication) do seu App
</Note>

<CardGroup cols={2}>
  <Card title="Tendências personalizadas" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-person.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=507a4bbcdcf5744bd18781508002e305" href="/x-api/trends/personalized-trends/introduction" width="24" height="24" data-path="icons/xds/icon-person.svg">
    Obtenha tendências para o usuário autenticado
  </Card>

  <Card title="Referência da API" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/trends/trends-by-woeid" width="24" height="24" data-path="icons/xds/icon-code.svg">
    Documentação completa do endpoint
  </Card>
</CardGroup>
