Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

Twitter (X) Trending Topics

Docs da API
https://api.sandbase.ai/v1/api/twitter/web/trending

Get trending topics on Twitter / X by country: trend names with their category context, for the United States, Japan, India, the UK and other markets.

Preço
$0.001USD / chamada
Método
POST
Resposta
JSON
Parâmetros
0 obrigatórios · 1 opcionais
100 chamadas grátis / diaAs primeiras 100 chamadas por dia são grátis (compartilhadas por organização) · Reinicia às 00:00 UTC. Depois, pagamento por chamada.

Playground

Entrada
Country, default is UnitedStates, other optional values are as follows: China; India; Japan; Russia; Germany; Indonesia; Brazil; France; UnitedKingdom; Turkey; Italy; Mexico; SouthKorea; Canada; Spain; SaudiArabia; Egypt; Australia; Poland; Iran; Pakistan; Vietnam; Nigeria; Bangladesh; Netherlands; Argentina; Philippines; Malaysia; Colombia; UniteArabEmirates; Romania; Belgium; Switzerland; Singapore; Sweden; Norway; Austria; Kazakhstan; Algeria; Chile; Czechia; Peru
SaídaExemplo
Respostaoutputs · 476 B · 24 linhas
[
  {
    "data": {
      "trends": [
        {
          "context": "Only on X · Trending",
          "description": null,
          "name": "#bb28"
        },
        {
          "context": "Only on X · Trending",
          "description": null,
          "name": "#RaisingKanan"
        },
        {
          "context": "Trending",
          "description": null,
          "name": "#SnoopDoggMV"
        },
        "… 47 more items in the full response"
      ]
    }
  }
]

Exemplos

Selecione um exemplo para carregar as entradas e o resultado no playground.

README da API

Twitter (X) Trending Topics API

Returns the current list of trending topics on Twitter (X) for one country. The only input is the optional country parameter, which defaults to UnitedStates.

Use cases

  • Check which topics trend in Japan, India or the UK at the moment you call.
  • Flag a brand or keyword when its name appears in the name field of a trend.
  • Group trends by their context label, such as NFL, to see which categories dominate a market.
  • Pick topics to search for or write about while they trend.

Request

curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/trending" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
countrystringNoCountry, default is UnitedStates, other optional values are as follows: China; India; Japan; Russia; Germany; Indonesia; Brazil; France; UnitedKingdom; Turkey; Italy; Mexico; SouthKorea; Canada; Spain; SaudiArabia; Egypt

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "trends": [
    {
      "context": "NFL · Trending",
      "description": null,
      "name": "Bears"
    }
  ]
}

Response fields

FieldMeaning
trends[]List of trending topics for the chosen country.
trends[].nameThe trend text as shown on X, for example a team, person or hashtag.
trends[].contextShort label that shows where the trend sits, for example NFL · Trending. The part before the dot names the category.
trends[].descriptionExtra text about the trend. It is null when none is given.

Notes

  • Pass country as a full name without spaces, such as UnitedStates, UnitedKingdom, SouthKorea or SaudiArabia. An empty request returns UnitedStates.
  • The response has no pagination, tweet counts or rank field. The order of trends is the order returned.
  • To see posts about a trend, pass its name to Twitter (X) Search.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
Twitter$0.001 por chamadaJSON
Twitter$0.001 por chamadaJSON
Twitter$0.001 por chamadaJSON
Twitter$0.001 por chamadaJSON
Twitter$0.001 por chamadaJSON
Twitter$0.001 por chamadaJSON

Guias:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Perguntas

FAQ

Como eu uso a API Twitter (X) Trending Topics?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/twitter/web/trending com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API Twitter (X) Trending Topics?

$0.001 por chamada. Cada organização recebe 100 chamadas grátis por dia UTC, compartilhadas entre as APIs elegíveis da SandBase, incluindo esta; depois disso, cada chamada é cobrada nesse valor do seu saldo SandBase. Não há assinatura.

Quais parâmetros a API Twitter (X) Trending Topics aceita?

Nenhum parâmetro é obrigatório. Opcionais: country (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API Twitter (X) Trending Topics retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor Twitter ou de uma chave de API?

Não. Twitter (X) Trending Topics funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Twitter separadamente.