API para X / Twitter: Tendências
Obtenha as tendências atuais do X (Twitter) mundiais, de um país ou de uma cidade, na ordem de ranking do X, incluindo a localização resolvida.
Rede de provedores
Provedores ordenados por tráfego
Teste
Faça sua primeira requisição
{
"data": {
"asOfUtc": 12.5,
"items": [
{
"isHashtag": true,
"name": "Example title",
"promoted": true,
"query": "example",
"rank": 1
}
],
"location": "example",
"locationId": "a1b2c3d4",
"url": "https://example.com/page"
},
"found": true,
"reason": "not_found"
}interface TwitterTrendsResponse {
data: {
asOfUtc: number;
items: {
isHashtag?: boolean;
name: string;
promoted?: boolean;
query: string;
rank: number;
}[];
location: string;
locationId: string;
url?: string;
} | null;
found: boolean;
reason?: "not_found";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 30dcurl -X POST https://api.getanyapi.com/v1/run/twitter.trends \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":10,"location":"US"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| limit | integer | 10Número máximo de tendências ranqueadas a retornar (1-50, padrão 50). |
| location | string | "US"Nome do país, nome da cidade ou código ISO do país. Omita para tendências mundiais. |
| requireFields | array | Opcional; se omitido, o roteamento não muda e a fonte mais barata atende. Informe os campos de saída que esta requisição precisa poder retornar, por exemplo `promoted`, e ela só será atendida por uma fonte que retorne todos eles. Os campos que você não informar continuam sendo retornados sempre que a fonte que atende os tiver. Isso pode aumentar o seu preço: quando a fonte mais barata não consegue retornar um campo informado, uma fonte mais cara atende, e você recebe a cotação e é cobrado pelo preço dela. Um campo informado ainda pode vir ausente em uma tendência que realmente não o tenha. Se você informar uma combinação de campos que nenhuma fonte retorna sozinha, a requisição é recusada como entrada inválida, sem cobrança. |
| Resposta | ||
| data | object | The resolved location and its current ranked trends, or null when unavailable. |
| data.asOfUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. Populated whenever the provider has data for the entity. |
| data.items | object[] | Current trends in X's own ranking order. Distinct ranks may carry the same trend name. Populated whenever the provider has data for the entity. |
| data.items[].isHashtagpode ser exigido | boolean | Whether the trend text is a hashtag. |
| data.items[].name | string | Trend text displayed by X. Populated whenever the provider has data for the entity. |
| data.items[].promotedpode ser exigido | boolean | Whether X marks the trend as promoted. |
| data.items[].query | string | Search query corresponding to the trend. Populated whenever the provider has data for the entity. |
| data.items[].rank | integer | One-based position in X's trend ranking. Populated whenever the provider has data for the entity. |
| data.location | string | Resolved X trend-location name. Populated whenever the provider has data for the entity. |
| data.locationId | string | Resolved Yahoo WOEID used by X, exposed as a stable location identifier. Populated whenever the provider has data for the entity. |
| data.url | string | X search URL for the trend. |
| found | boolean | Whether X trends were resolved for the requested location. |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| Preço | ||
| Preço por requisição | USD | US$ 0,0001 |
| Preço /mil req. | USD | US$ 0,10 |
Dúvidas frequentes
Sobre o endpoint Tendências da API para X / Twitter
O endpoint Tendências da AnyAPI para X / Twitter retorna dados de X / Twitter em JSON normalizado com uma chamada POST para /v1/run/twitter.trends. Obtenha as tendências atuais do X (Twitter) mundiais, de um país ou de uma cidade, na ordem de ranking do X, incluindo a localização resolvida. A AnyAPI distribui cada requisição entre 2 fontes, com failover automático quando uma falha. Custa a partir de US$ 0,10 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 100,0% das chamadas ao endpoint Tendências da API para X / Twitter feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 1,3 segundos, em 489 chamadas medidas.