> ## 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 por WOEID

> El endpoint Trends por WOEID devuelve temas en tendencia para una ubicación geográfica específica. Referencia del nivel estándar de X API v2 que cubre 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>;
};

El endpoint Trends por WOEID devuelve temas en tendencia para una ubicación geográfica específica, identificada por un Yahoo! Where On Earth ID (WOEID).

## Descripción general

<CardGroup cols={2}>
  <Card title="Específico de ubicación" icon="location-dot">
    Trends para cualquier ubicación soportada
  </Card>

  <Card title="Cobertura global" icon="globe">
    Países, ciudades y regiones
  </Card>

  <Card title="En tiempo real" icon="bolt">
    Temas en tendencia actuales
  </Card>
</CardGroup>

***

## Endpoint

| Método | Endpoint                                                      | Descripción                  |
| :----- | :------------------------------------------------------------ | :--------------------------- |
| GET    | [`/2/trends/by/woeid/:id`](/x-api/trends/get-trends-by-woeid) | Obtener trends para un WOEID |

***

## WOEIDs comunes

| Ubicación      | WOEID    |
| :------------- | :------- |
| Mundo          | 1        |
| Estados Unidos | 23424977 |
| Reino Unido    | 23424975 |
| Japón          | 23424856 |
| Nueva York     | 2459115  |
| Los Ángeles    | 2442047  |
| Londres        | 44418    |
| Tokio          | 1118370  |

***

## Solicitud de ejemplo

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

## Respuesta de ejemplo

```json title="Respuesta de ejemplo" 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
    }
  ]
}
```

***

## Primeros pasos

<Note>
  **Requisitos previos**

  * Una [cuenta de desarrollador](https://developer.x.com/en/portal/petition/essential/basic-info) aprobada
  * Un [Project y App](/resources/fundamentals/developer-apps) en el Developer Console
  * El [Bearer Token](/resources/fundamentals/authentication) de tu App
</Note>

<CardGroup cols={2}>
  <Card title="Personalized trends" 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">
    Obtén trends para el usuario autenticado
  </Card>

  <Card title="Referencia de la 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">
    Documentación completa del endpoint
  </Card>
</CardGroup>
