Dokumentasi API Hop
Referensi Google Trends
Jelajahi minat penelusuran, saran, penelusuran tren, dan berita terkait di Google Trends.
Batas konkurensi
AI dan Data masing-masing berbagi kumpulan slot serentak untuk seluruh akun: bawaan 5 AI / 2 Data, sesuai langganan. Batas khusus endpoint tetap tunduk pada batas kategori. Mencapai salah satu batas mengembalikan HTTP 429. Tugas asinkron memakai slot hingga eksekusi selesai.
GET /v1/google-trends/search GET /v1/google-trends/autocomplete GET /v1/google-trends/news GET /v1/google-trends/trending-now Jelajahi minat penelusuran, saran, penelusuran tren, dan berita terkait di Google Trends.
Autentikasi dan biaya
Harga bawaan adalah $0.0003 (300 credits) per permintaan berhasil. Gunakan kunci API API Hop. Akses bergantung pada gateway aktif dan izin. Lihat katalog dan akun untuk harga per permintaan berhasil; harga khusus akun diutamakan. Hasil kosong yang berhasil tetap dikenai biaya. Kegagalan melepas cadangan. Batas waktu 60 detik, tanpa pengulangan atau paginasi otomatis. Kegagalan penyelesaian tidak mengulang permintaan pemasok.
Authorization: Bearer YOUR_API_KEYHanya parameter kueri, tanpa isi. Nilai tak dikenal, berulang, kosong, atau tidak valid ditolak, kecuali geo dan gprop kosong yang didokumentasikan. Hanya JSON; tanpa paginasi atau percobaan ulang otomatis. AND = keduanya, OR = atau, XOR = tepat satu, NOT = dilarang, => = memerlukan. Salin ID dan token berita dari respons terbaru; contoh bukan hasil uji langsung. Setiap permintaan berhasil ditagih terpisah.
Google Trends: Jelajahi minat penelusuran
GET https://api.apihop.ai/v1/google-trends/search
Parameter
| Kolom | Tipe | Batas | Contoh |
|---|---|---|---|
query | string | Teks pencarian; query: REQUIRED | tesla |
country | string | Kode negara atau toko (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Bahasa; language: optional | - |
category | string | Jenis grafik atau resolusi geografis (category); category: optional; interest_over_time, interest_by_region, related_queries, related_topics | interest_over_time |
time_range | string | Periode relatif atau rentang tanggal (time_range); time_range: optional | - |
device | string | Perangkat; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Jangan arsipkan respons; zero_trace: optional | true |
data_type | string | Jenis grafik atau resolusi geografis (data_type); data_type: optional; TIMESERIES, GEO_MAP, GEO_MAP_0, RELATED_TOPICS, RELATED_QUERIES | TIMESERIES |
geo | string | Kode lokasi Trends (geo); geo: optional; UTF-8 bytes: 100 | - |
region | string | Jenis grafik atau resolusi geografis (region); region: optional; COUNTRY, REGION, DMA, CITY | COUNTRY |
cat | integer | ID kategori topik (cat); cat: optional; 0, 3, 5, 7, 8, 11, 12, 13, 14, 16, ... 1133 | 0 |
gprop | string | Sumber pencarian (gprop); gprop: optional; `, images, news, froogle, youtube` | |
date | string | Periode relatif atau rentang tanggal (date); date: optional; UTF-8 bytes: 256 | - |
csv | boolean | Data CSV tambahan (csv); csv: optional | true |
include_low_search_volume | boolean | Wilayah dengan volume pencarian rendah (include_low_search_volume); include_low_search_volume: optional | true |
tz | integer | Offset zona waktu dalam menit (konvensi peramban) (tz); tz: optional; min: -1439; max: 1439 | -1439 |
Validasi
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)
Contoh
curl --get "https://api.apihop.ai/v1/google-trends/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: Ambil saran topik
GET https://api.apihop.ai/v1/google-trends/autocomplete
Parameter
| Kolom | Tipe | Batas | Contoh |
|---|---|---|---|
query | string | Teks pencarian; query: REQUIRED | tesla |
language | string | Bahasa; language: optional | - |
limit | integer | Batas hasil; limit: optional; min: 1; max: 100 | 1 |
device | string | Perangkat; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Jangan arsipkan respons; zero_trace: optional | true |
Validasi
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})?$/
Contoh
curl --get "https://api.apihop.ai/v1/google-trends/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: Ambil berita terkait
GET https://api.apihop.ai/v1/google-trends/news
Parameter
| Kolom | Tipe | Batas | Contoh |
|---|---|---|---|
page_token | string | Token berita dari hasil Trending Now terbaru (page_token); page_token: REQUIRED; UTF-8 bytes: 32768; ^gtn1\.[A-Za-z0-9_-]+$ | ${NEWS_PAGE_TOKEN} |
device | string | Perangkat; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Jangan arsipkan respons; zero_trace: optional | true |
Validasi
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
Contoh
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: Ambil penelusuran tren
GET https://api.apihop.ai/v1/google-trends/trending-now
Parameter
| Kolom | Tipe | Batas | Contoh |
|---|---|---|---|
country | string | Kode negara atau toko (country); country: optional; ^[A-Za-z]{2}$ | us |
language | string | Bahasa; language: optional | - |
limit | integer | Batas hasil; limit: optional; min: 1; max: 100 | 1 |
device | string | Perangkat; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Jangan arsipkan respons; zero_trace: optional | true |
geo | string | Kode lokasi Trends (geo); geo: optional; `, AL, DZ, AO, AR, AR-C, AR-B, AR-K, AR-H, AR-U`, ... 1445 | |
hours | integer | Jam sebelumnya (hours); hours: optional; 4, 24, 48, 168 | 4 |
category_id | integer | ID kategori topik (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 | Hanya tren aktif (only_active); only_active: optional | true |
Validasi
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
Contoh
curl --get "https://api.apihop.ai/v1/google-trends/trending-now" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "country=us"Respons dan kesalahan
JSON asli dan presisi dipertahankan. Contoh hasil kosong berhasil. HTTP 400: masukan; 401: autentikasi; 402: saldo; 403: akses; 405: metode; 429: batas; 5xx: layanan. Simpan X-Request-Id.
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}