Trending
获取某个国家当前在 Google 上的热门搜索。
GET | POST /v1/google-trends/trending参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 请求体发送,两者等价。
请求
curl "https://gateway.apinoa.com/v1/google-trends/trending?country=US" \
-H "x-api-key: $APINOA_API_KEY"参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
country | enum | 是 | The country, as an ISO 3166 code. AE AL AM AO AR AT AU AZ BA BD BE BF BG BH BJ BO BR BY CA CD CH CI CL CM CO CR CU CY CZ DE DK DO DZ EC EE EG ES ET FI FR GB GE GH GR GT HK HN HR HT HU ID IE IL IN IQ IR IT JM JO JP KE KG KH KR KW KZ LB LK LT LV LY MA MD MK ML MM MX MY MZ NG NI NL NO NP NZ OM PA PE PH PK PL PR PS PT PY QA RO RS RU SA SE SG SI SK SN SV SY TH TM TN TR TT TW TZ UA UG US UY UZ VE VN YE ZA ZM ZW |
category | integer | Only trends in this category (trending now's own 1-20; 0 = all). | |
include | enum | articles: every news article Trends holds for each trend, for the first 300 trends (charged as one more unit). articles | |
lang | string | Interface language: the language of topic names and labels (en, pt-BR). | |
subregion | string | A state or province inside country (US-CA). | |
window | enum | The period: past 4 hours, 24 hours (default), 48 hours or 7 days. 4h 24h 48h 7d |
这些参数及所有响应类型也写在OpenAPI 文档中。
响应
在 data 中返回 TrendingPage。 真实响应的节选:数组只保留前几项,长文本已截断。
{
"success": true,
"data": {
"engine": "google-trends",
"country": "US",
"window": "24h",
"items": [
{
"rank": 1,
"query": "patrick stewart",
"volume": "2M+",
"minVolume": 2000000,
"growth": "+1,000%",
"startedAt": "2026-10-29T19:30:00Z",
"active": true,
"categories": ["Entertainment"],
"related": ["patrick stewart", "sir patrick stewart"],
"ext": {"categoryIds": [4], "articleIds": [[4906062271]]}
},
{
"rank": 2,
"query": "panthers vs packers",
"volume": "500K+",
"minVolume": 500000,
"growth": "+1,000%",
"startedAt": "2026-10-29T05:30:00Z",
"active": true,
"categories": ["Sports"],
"related": ["panthers vs packers", "packers vs panthers"],
"ext": {"categoryIds": [17], "articleIds": [[4899588623]]}
}
],
"fetchedAt": "2026-10-30T01:00:30.090Z",
"ext": {"listed": 537}
}
}错误
| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | INVALID_PARAMS | 参数缺失、未知、超出范围,或该引擎不接受。消息中会指出是哪一个。 |
| 401 | UNAUTHORIZED | 缺少 x-api-key 请求头,或密钥已吊销或未知。 |
| 402 | INSUFFICIENT_BALANCE | 余额不足以支付本次调用。请在控制台充值。 |
| 429 | MARKETPLACE_SATURATED | 并发调用过多。请等待 Retry-After 秒后重试。 |
| 502 | UPSTREAM_ERROR | 引擎返回了无法使用的内容。请退避后重试。 |
| 503 | SERVICE_UNAVAILABLE | 临时故障。请退避后重试。 |
全部错误代码见 Errors。失败的调用不计费。
价格
价格 每次调用 $0.0012,每多一次调用加 $0.0012——最多再加 1 次,合计最多 $0.0024。标价;单日调用超过 1,000 次后单价下调。
说明
include=articles会附上 Trends 为每个趋势收录的全部新闻文章,多计 1 个单位。