Passer au contenu principal
GET
/
2
/
trends
/
by
/
woeid
/
{woeid}
Récupérer les tendances par WOEID
curl --request GET \
  --url https://api.x.com/2/trends/by/woeid/{woeid} \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "trend_name": "<string>",
      "tweet_count": 123
    }
  ],
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

woeid
integer<int32>
requis

Le WOEID du lieu pour lequel rechercher des tendances.

Paramètres de requête

Le nombre maximal de résultats.

Plage requise: 1 <= x <= 50
trend.fields
enum<string>[]

Une liste de champs Trend, séparés par des virgules, à renvoyer. Les champs disponibles pour un objet Trend.

Minimum array length: 1
Options disponibles:
trend_name,
tweet_count
Exemple:
["trend_name", "tweet_count"]

Réponse

La requête a réussi.

data
object[]
Minimum array length: 1
errors
object[]
Minimum array length: 1

Un objet HTTP Problem Details, tel que défini dans la RFC IETF 7807 (https://tools.ietf.org/html/rfc7807).