API Hop ドキュメント
Google Trends API リファレンス
Google Trends の検索関心度、候補、急上昇ワード、関連ニュースを取得します。
同時実行上限
AI と Data はそれぞれアカウント全体の同時実行枠を共有します。既定値は AI 5 / Data 2 で、サブスクリプションにより変わります。エンドポイント別の設定もカテゴリ全体の上限を超えられません。いずれかの上限に達すると HTTP 429 を返します。非同期タスクは実行終了まで枠を使用します。
GET /v1/google-trends/search GET /v1/google-trends/autocomplete GET /v1/google-trends/news GET /v1/google-trends/trending-now Google Trends の検索関心度、候補、急上昇ワード、関連ニュースを取得します。
認証と料金
既定料金は成功したリクエストごとに $0.0003(300 credits)です。 API Hop API キーを使用します。利用可否は有効なゲートウェイと権限によります。成功したリクエストの料金はカタログとアカウントを確認してください。個別料金が優先され、成功した空の結果も課金されます。失敗時は予約額を解放します。タイムアウトは 60 秒で、自動再試行と自動ページングはありません。精算失敗による再呼び出しも行いません。
Authorization: Bearer YOUR_API_KEYクエリのみ受け付け、本文は使用しません。不明、重複、空、無効な値は拒否されますが、記載された geo と gprop の空値は使用できます。JSON のみ対応し、自動ページ取得や再試行は行いません。AND = 両方、OR = または、XOR = いずれか一つ、NOT = 不可、=> = 必須。識別子とニューストークンは最新の応答からコピーしてください。例は実際のテスト結果ではありません。成功した照会ごとに課金されます。
Google Trends: 検索関心度を取得
GET https://api.apihop.ai/v1/google-trends/search
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
query | string | 検索語; query: REQUIRED | tesla |
country | string | 国または店舗コード (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 言語; language: optional | - |
category | string | グラフ種別または地理的粒度 (category); category: optional; interest_over_time, interest_by_region, related_queries, related_topics | interest_over_time |
time_range | string | 相対期間または日付範囲 (time_range); time_range: optional | - |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
data_type | string | グラフ種別または地理的粒度 (data_type); data_type: optional; TIMESERIES, GEO_MAP, GEO_MAP_0, RELATED_TOPICS, RELATED_QUERIES | TIMESERIES |
geo | string | Trends の地域コード (geo); geo: optional; UTF-8 bytes: 100 | - |
region | string | グラフ種別または地理的粒度 (region); region: optional; COUNTRY, REGION, DMA, CITY | COUNTRY |
cat | integer | トピック分類 ID (cat); cat: optional; 0, 3, 5, 7, 8, 11, 12, 13, 14, 16, ... 1133 | 0 |
gprop | string | 検索対象 (gprop); gprop: optional; `, images, news, froogle, youtube` | |
date | string | 相対期間または日付範囲 (date); date: optional; UTF-8 bytes: 256 | - |
csv | boolean | 追加の CSV データ (csv); csv: optional | true |
include_low_search_volume | boolean | 検索量の少ない地域を含む (include_low_search_volume); include_low_search_volume: optional | true |
tz | integer | 分単位の時差(ブラウザー規約) (tz); tz: optional; min: -1439; max: 1439 | -1439 |
入力検証
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/query: 1..5 nonempty comma-separated terms; NOT (category AND data_type); NOT (date AND time_range)category: interest_over_time = TIMESERIES, interest_by_region = GEO_MAP_0, related_queries = RELATED_QUERIES, related_topics = RELATED_TOPICS; default TIMESERIESregion OR include_low_search_volume => data_type = GEO_MAP OR GEO_MAP_0; GEO_MAP_0 requires exactly one termgeo: empty = worldwide; uppercase country or subdivision; overrides country; comma-separated locations require TIMESERIES and one location per termgprop: empty = web search; froogle = shopping; tz: browser offset minutes (420 = UTC-07:00)date, time_range: all, now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, OR ordered YYYY-MM-DD YYYY-MM-DD within 2004-01-01..todaydate: multiple comma-separated custom ranges require TIMESERIES and one range per term; cat: topic ID (default 0)
例
curl --get "https://api.apihop.ai/v1/google-trends/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: トピック候補を取得
GET https://api.apihop.ai/v1/google-trends/autocomplete
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
query | string | 検索語; query: REQUIRED | tesla |
language | string | 言語; language: optional | - |
limit | integer | 結果の上限; limit: optional; min: 1; max: 100 | 1 |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
入力検証
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
例
curl --get "https://api.apihop.ai/v1/google-trends/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: 関連ニュースを取得
GET https://api.apihop.ai/v1/google-trends/news
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
page_token | string | 最新の Trending Now 結果のニューストークン (page_token); page_token: REQUIRED; UTF-8 bytes: 32768; ^gtn1\.[A-Za-z0-9_-]+$ | ${NEWS_PAGE_TOKEN} |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
入力検証
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/page_token: exact news_page_token from a fresh Trending Now response; account-bound opaque continuation, do not fabricate or reuse expired tokens
例
curl --get "https://api.apihop.ai/v1/google-trends/news" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "page_token=${NEWS_PAGE_TOKEN}"Google Trends: 急上昇ワードを取得
GET https://api.apihop.ai/v1/google-trends/trending-now
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
country | string | 国または店舗コード (country); country: optional; ^[A-Za-z]{2}$ | us |
language | string | 言語; language: optional | - |
limit | integer | 結果の上限; limit: optional; min: 1; max: 100 | 1 |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
geo | string | Trends の地域コード (geo); geo: optional; `, AL, DZ, AO, AR, AR-C, AR-B, AR-K, AR-H, AR-U`, ... 1445 | |
hours | integer | 過去の時間数 (hours); hours: optional; 4, 24, 48, 168 | 4 |
category_id | integer | トピック分類 ID (category_id); category_id: optional; 0, 1, 2, 3, 20, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19 | 0 |
only_active | boolean | 有効なトレンドのみ (only_active); only_active: optional | true |
入力検証
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/geo: empty = US; overrides country; hours: default 24; category_id: 0 = all; only_active: active trends only
例
curl --get "https://api.apihop.ai/v1/google-trends/trending-now" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "country=us"レスポンスとエラー
元の JSON と数値精度を保持します。例は空の成功結果です。HTTP 400: 入力、401: 認証、402: 残高、403: アクセス、405: メソッド、429: 制限、5xx: 障害。X-Request-Id を保存してください。
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}