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

# TrendsClient

> Referência para o pacote Python trends no SDK da X API, agrupando o client e os modelos Pydantic para os endpoints trends da X API v2.

## Submódulos

* [xdk.trends.client module](/xdks/python/reference/xdk.trends.client)
  * [`TrendsClient`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient)
    * [`TrendsClient.__init__()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.__init__)
    * [`TrendsClient.get_ai()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.get_ai)
    * [`TrendsClient.get_by_woeid()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.get_by_woeid)
    * [`TrendsClient.get_personalized()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.get_personalized)
* [xdk.trends.models module](/xdks/python/reference/xdk.trends.models)
  * [`GetAiResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetAiResponse)
    * [`GetAiResponse.model_config`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetAiResponse.model_config)
  * [`GetByWoeidResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetByWoeidResponse)
    * [`GetByWoeidResponse.model_config`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetByWoeidResponse.model_config)
  * [`GetPersonalizedResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetPersonalizedResponse)
    * [`GetPersonalizedResponse.model_config`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetPersonalizedResponse.model_config)

## Conteúdo do módulo

Este módulo fornece acesso aos endpoints trends da X API
e serve como o principal ponto de entrada para toda a funcionalidade relacionada a trends.

### `class xdk.trends.TrendsClient`

Client para operações de trends

#### Parâmetros

<ParamField path="path.client" type="Client" />

### `__init__`

#### Parâmetros

<ParamField path="path.client" type="Client" />

### `get_ai`

Get AI Trends by ID
Retrieves an AI trend by its ID.

#### Parâmetros

<ParamField path="path.id" type="Any">
  The ID of the ai trend.
</ParamField>

<ParamField path="path.news_fields" type="List or None" default="None">
  A comma separated list of News fields to display.
</ParamField>

#### Retorna

`GetAiResponse` - Response data

### `get_by_woeid`

Get Trends by WOEID
Retrieves trending topics for a specific location identified by its WOEID.

#### Parâmetros

<ParamField path="path.woeid" type="int">
  The WOEID of the place to lookup a trend for.
</ParamField>

<ParamField path="path.max_trends" type="int or None" default="None">
  The maximum number of results.
</ParamField>

<ParamField path="path.trend_fields" type="List or None" default="None">
  A comma separated list of Trend fields to display.
</ParamField>

#### Retorna

`GetByWoeidResponse` - Response data

### `get_personalized`

Get personalized Trends
Retrieves personalized trending topics for the authenticated user.

#### Parâmetros

<ParamField path="path.personalized_trend_fields" type="List or None" default="None">
  A comma separated list of PersonalizedTrend fields to display.
</ParamField>

#### Retorna

`GetPersonalizedResponse` - Response data
