API 接口文档

左侧选择接口,右侧查看说明与示例。所有对外接口都需要 API Key。

Google趋势榜单接口

获取 Google 趋势榜单(搜索量上升 / 热门),可按开始日期和结束日期筛选;也可按 id 增量拉取。

GET /api/public/google-trends

模式一:榜单查询

不传日期时,默认返回近 30 天数据(rising_searches 与 trending_searches 各最多 50 条)。传入 startDate 和 endDate 后,按 trend_date 闭区间筛选,两类列表均返回区间内全部匹配数据,不做条数限制。

GET /api/public/google-trends
GET /api/public/google-trends?startDate=2026-11-01&endDate=2026-11-15
Authorization: Bearer <您的密钥>
startDatestring(可选)- 开始日期,YYYY-MM-DD。需与 endDate 一起传
endDatestring(可选)- 结束日期,YYYY-MM-DD。需与 startDate 一起传

模式二:增量拉取

GET /api/public/google-trends?after_id=12345&limit=200
GET /api/public/google-trends?tail=1&limit=100
GET /api/public/google-trends?after_id=12345&startDate=2026-11-01&endDate=2026-11-15
Authorization: Bearer <您的密钥>
after_idnumber(可选)- 只返回 id 大于该值的记录,按 id 升序
tailstring(可选)- 传 1 时取最新一批,按 id 降序
limitnumber(可选)- 条数,默认 800(tail 时默认 100),最多 800
startDate / endDatestring(可选)- 增量模式下也可按日期过滤

响应示例(榜单)

{
  "success": true,
  "data": [
    {
      "id": 1,
      "query": "example keyword",
      "trends_value": 100,
      "has_data": true,
      "trend_link": "https://trends.google.com/...",
      "list_type": "rising_searches",
      "period": 1,
      "collected_at": "2026-11-15T00:00:00.000Z",
      "trend_date": "2026-11-15T00:00:00.000Z",
      "search_volume": 1000,
      "overall_score": 12,
      "trend_score": 80,
      "kws": 5
    }
  ],
  "count": 1,
  "startDate": "2026-11-01",
  "endDate": "2026-11-15"
}

代码示例

curl "https://youzikuaibao.com.cn/api/public/google-trends?startDate=2026-11-01&endDate=2026-11-15" \
  -H "Authorization: Bearer <您的密钥>"

说明

若需要按单个关键词查询详情,请使用 Google趋势词查询接口。