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))
}回應
正在載入最新回應範例...
