Google Trends 热门趋势 API
API 健康状态
健康 可用 受限 大多不可用 无数据
正在加载健康状态...
获取 Google 趋势的热门趋势数据,包括最新热门话题、区域和时间窗口过滤器以及热度指标,用于突发趋势监控和编辑规划。
标签: Google Trends
请求参数
| 名称 | 必填 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
geo | 是 | string | 用于获取实时趋势的地理位置代码(例如,'US' 代表美国)。默认为 'US'。 | |
hours | 否 | string | 热门话题的时间窗口。 可用值: - PAST_4_HOURS:过去 4 小时。旧版值 4 同样接受。- PAST_24_HOURS:过去 24 小时。旧版值 24 同样接受。- PAST_48_HOURS:过去 48 小时。旧版值 48 同样接受。- PAST_7_DAYS:过去 7 天。旧版值 168 同样接受。 | |
language | 否 | string | en | 使用其两位字母代码设置结果的语言(例如,'en')。 |
复制请求
bash
curl -X GET "https://api.justserpapi.com/api/v1/google/trends/trending-now?geo=YOUR_VALUE" \
-H "X-API-Key: YOUR_API_KEY"js
const res = await fetch("https://api.justserpapi.com/api/v1/google/trends/trending-now?geo=YOUR_VALUE", {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);python
import requests
url = "https://api.justserpapi.com/api/v1/google/trends/trending-now"
headers = { "X-API-Key": "YOUR_API_KEY" }
params = {
"geo": "YOUR_VALUE"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())php
<?php
$url = "https://api.justserpapi.com/api/v1/google/trends/trending-now?geo=YOUR_VALUE";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: YOUR_API_KEY"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.justserpapi.com/api/v1/google/trends/trending-now?geo=YOUR_VALUE", nil)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}响应
正在加载最新响应示例...
