트렌드
트렌드 조회
GET /v1/trends reads 2 크레딧
X 탐색 페이지의 트렌드 토픽을 순위 목록으로: 전체 트렌드 목록, 또는 뉴스, 스포츠, 엔터테인먼트 탭.
쿼리 매개변수
| 쿼리 파라미터 | 타입 | 의미 |
|---|---|---|
category | trending | news | sport | entertainment = trending | trending, news, sport 또는 entertainment(대소문자 구분 없음, sports도 허용). 스포츠 탭은 비어 있는 경우가 잦습니다. |
limit | int 1–100 = 30 | 반환할 트렌드의 최대 수 |
응답
카테고리, X가 목록 위에 표시하는 제목(없으면 null), 그리고 순위 순서의 트렌드. 각 트렌드에는 이름, X가 붙이는 컨텍스트 라벨, X가 표시하는 경우 게시물 수 또는 요약 줄, 관련 묶음 트렌드, 검색 URL이 담깁니다. 목록은 한 페이지뿐입니다. X가 현재 아무것도 표시하지 않는 탭에서는 비어 있을 수 있으며, 빈 목록에는 과금되지 않습니다.
상태: 200, 400, 422, 429, 502
요청
curl https://api.xsignalfeed.com/v1/trends?category=trending&limit=20 \ -H "Authorization: Bearer xsf_your_key"
응답 · 200 / 400
{
"category": "trending",
"title": "United States trends",
"trends": [
{
"rank": 1,
"name": "#dwts",
"description": null,
"posts": null,
"domain": "Movies & TV · Trending",
"url": "https://x.com/search?q=%23dwts&src=trend_click&vertical=trends",
"related": [
"Maura",
"Amber"
]
},
{
"rank": 2,
"name": "#AEWDynamite",
"description": null,
"posts": null,
"domain": "Wrestling · Trending",
"url": "https://x.com/search?q=%23AEWDynamite&src=trend_click&vertical=trends",
"related": [
"All Out",
"Lena Kross"
]
}
]
}