เอกสาร API Hop
เอกสารอ้างอิง Google Trends
ดูความสนใจในการค้นหา คำแนะนำ การค้นหามาแรง และข่าวที่เกี่ยวข้องบน Google Trends
ขีดจำกัดการทำงานพร้อมกัน
AI และ Data ใช้โควตาคำขอพร้อมกันร่วมกันภายในแต่ละหมวดของบัญชี ค่าเริ่มต้นคือ 5 AI / 2 Data และปรับตามแพ็กเกจสมาชิก ขีดจำกัดเฉพาะ endpoint ยังอยู่ภายใต้ขีดจำกัดรวมของหมวด เมื่อถึงขีดจำกัดใดจะส่ง 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 ของ API Hop การเข้าถึงขึ้นอยู่กับเกตเวย์และสิทธิ์ ดูราคาต่อคำขอที่สำเร็จในแค็ตตาล็อกและบัญชี โดยใช้ราคาบัญชีก่อน ผลลัพธ์ว่างที่สำเร็จก็คิดค่าบริการ คำขอที่ล้มเหลวคืนยอดสำรอง หมดเวลาที่ 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 | รหัสหมวดหมู่หัวข้อ (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 | รหัสหมวดหมู่หัวข้อ (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": []
}
}
}