---
title: "Trending"
description: "获取某个国家当前在 Google 上的热门搜索。"
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/serp/llms.txt)

```http
GET | POST /v1/google-trends/trending
```

参数可以用 `GET` 的查询字符串发送，也可以用 `POST` 的 JSON 请求体发送，两者等价。

## 请求

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/google-trends/trending?country=US" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({ country: "US" });
const res = await fetch(`https://gateway.apinoa.com/v1/google-trends/trending?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/google-trends/trending",
    params={"country": "US"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `country` | enum | yes | 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` |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## 响应

在 `data` 中返回 [`TrendingPage`](/docs/api-reference/serp/response-schema#trendingpage)。 真实响应的节选：数组只保留前几项，长文本已截断。

```json
{
  "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](/docs/errors)。失败的调用不计费。

## 价格

**Price** $0.0012 per call, plus $0.0012 for each extra call it makes — at most 1 more, so $0.0024 in total. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.

## 说明

- `include=articles` 会附上 Trends 为每个趋势收录的全部新闻文章，多计 1 个单位。
