API Hop

เอกสาร

เอกสาร API Hop

เอกสารอ้างอิง Google Maps

ค้นหาธุรกิจและสถานที่ใน Google Maps หรือค้นด้วยรหัสสถานที่ รีวิวสถานที่ · รูปภาพสถานที่ · ข้อมูลรูปภาพ · โพสต์ธุรกิจ · เส้นทาง · คำแนะนำสถานที่ · รีวิวของผู้ร่วมให้ข้อมูล · การค้นหาในท้องถิ่น · บริการในท้องถิ่น · กิจกรรม.

ขีดจำกัดการทำงานพร้อมกัน

AI และ Data ใช้โควตาคำขอพร้อมกันร่วมกันภายในแต่ละหมวดของบัญชี ค่าเริ่มต้นคือ 5 AI / 2 Data และปรับตามแพ็กเกจสมาชิก ขีดจำกัดเฉพาะ endpoint ยังอยู่ภายใต้ขีดจำกัดรวมของหมวด เมื่อถึงขีดจำกัดใดจะส่ง HTTP 429 งานอะซิงโครนัสใช้ช่องจนกว่าการทำงานจะสิ้นสุด

GET /v1/google-maps/search
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/reviews
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/photos
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/photos/meta
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/posts
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/directions
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/autocomplete
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/contributor/reviews
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/local
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/local/services
ขีดจำกัดเริ่มต้น: 2
GET /v1/google-maps/events
ขีดจำกัดเริ่มต้น: 2

ค้นหาธุรกิจและสถานที่ใน Google Maps หรือค้นด้วยรหัสสถานที่ รีวิวสถานที่ · รูปภาพสถานที่ · ข้อมูลรูปภาพ · โพสต์ธุรกิจ · เส้นทาง · คำแนะนำสถานที่ · รีวิวของผู้ร่วมให้ข้อมูล · การค้นหาในท้องถิ่น · บริการในท้องถิ่น · กิจกรรม.

  • ค้นหาสถานที่ใน Google Maps: GET https://api.apihop.ai/v1/google-maps/search
  • รีวิวสถานที่: GET https://api.apihop.ai/v1/google-maps/reviews
  • รูปภาพสถานที่: GET https://api.apihop.ai/v1/google-maps/photos
  • ข้อมูลรูปภาพ: GET https://api.apihop.ai/v1/google-maps/photos/meta
  • โพสต์ธุรกิจ: GET https://api.apihop.ai/v1/google-maps/posts
  • เส้นทาง: GET https://api.apihop.ai/v1/google-maps/directions
  • คำแนะนำสถานที่: GET https://api.apihop.ai/v1/google-maps/autocomplete
  • รีวิวของผู้ร่วมให้ข้อมูล: GET https://api.apihop.ai/v1/google-maps/contributor/reviews
  • การค้นหาในท้องถิ่น: GET https://api.apihop.ai/v1/google-maps/local
  • บริการในท้องถิ่น: GET https://api.apihop.ai/v1/google-maps/local/services
  • กิจกรรม: GET https://api.apihop.ai/v1/google-maps/events

การยืนยันตัวตนและค่าบริการ

ราคามาตรฐานต่อคำขอที่สำเร็จคือ $0.0003 (300 credits) ใช้คีย์ API ของ API Hop การเข้าถึงขึ้นอยู่กับเกตเวย์และสิทธิ์ ดูราคาต่อคำขอที่สำเร็จในแค็ตตาล็อกและบัญชี โดยใช้ราคาบัญชีก่อน ผลลัพธ์ว่างที่สำเร็จก็คิดค่าบริการ คำขอที่ล้มเหลวคืนยอดสำรอง หมดเวลาที่ 60 วินาที ไม่ลองซ้ำหรือแบ่งหน้าอัตโนมัติ ข้อผิดพลาดการชำระไม่เรียกผู้ให้บริการซ้ำ

http
Authorization: Bearer YOUR_API_KEY

พารามิเตอร์

ค้นหาสถานที่ใน Google Maps

GET https://api.apihop.ai/v1/google-maps/search

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
querystringคำค้นcoffee shop
typestringโหมด; search, place-
place_idstringID สถานที่ChIJP8p2kJC1RIYR2qrGoXZtZCk
data_cidstringCID ฐานสิบ2982629209513831130
latitudenumberละติจูด; min: -90; max: 9030.2672
longitudenumberลองจิจูด; min: -180; max: 180-97.7431
locationstringจุดเริ่มต้นAustin, TX
zoomnumberซูม; min: 3; max: 3013.1
mnumberความสูงเป็นเมตร; min: 1; max: 15028132-
startintegerตำแหน่งเริ่ม; min: 0; max: 90071992547409910
glstringประเทศus
hlstringภาษาen-US
nearbybooleanเน้นใกล้เคียง-
zero_tracebooleanปิดการจัดเก็บ-
min_priceintegerราคาต่ำสุด; min: 0; max: 9007199254740991-
max_priceintegerราคาสูงสุด; min: 0; max: 9007199254740991-
min_ratingnumberคะแนนต่ำสุดที่ต้องการ; 2, 2.5, 3, 3.5, 4, 4.5-
open_statestringสถานะเปิด; now, 24h-
open_on_daystringวันท้องถิ่น; mon, tue, wed, thu, fri, sat, sun-
open_at_hourintegerชั่วโมงท้องถิ่น; min: 0; max: 23-

รีวิวสถานที่

GET https://api.apihop.ai/v1/google-maps/reviews

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
idstringID สถานที่ของ Google หรือ ID ข้อมูลฐานสิบหก ไม่รองรับ CID ฐานสิบและ ID ผู้มีส่วนร่วม; จำเป็น-
next_page_tokenstringโทเค็นสำหรับดึงหน้าถัดไปที่ไม่ต้องตีความเนื้อหา หมดอายุหลังหนึ่งชั่วโมง ต้องใช้บัญชี พารามิเตอร์ อุปกรณ์ และ limit เดิม; maxLength: 24576-
limitintegerจำนวนรายการสูงสุดที่ส่งกลับ แหล่งข้อมูลอาจส่งกลับน้อยกว่านี้; ≥ 1; ≤ 20-
sort_bystringลำดับการเรียงรีวิว; relevance, newest, rating_high, rating_low, qualityScore, newestFirst, ratingHigh, ratingLow-
querystringตัวกรองข้อความรีวิว ใช้ร่วมกับ topic_id ไม่ได้; maxLength: 500-
topic_idstringID หัวข้อจากแหล่งข้อมูล ใช้ร่วมกับ query ไม่ได้; maxLength: 131; ^(?:[A-Za-z0-9_-]{1,128}|/[mg]/[A-Za-z0-9_-]{1,128})$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: Google place_id OR hexadecimal data_id; NOT decimal CID, contributor ID
  • query XOR topic_id (optional)
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/reviews" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "id=ChIJM8w7rqS1RIYRhEz2-KuoqzE" \
  --data-urlencode "limit=10"

รูปภาพสถานที่

GET https://api.apihop.ai/v1/google-maps/photos

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
idstringรหัสระบุแหล่งข้อมูลที่ส่งกลับในผลลัพธ์ Google Maps ที่เกี่ยวข้อง; จำเป็น-
next_page_tokenstringโทเค็นสำหรับดึงหน้าถัดไปที่ไม่ต้องตีความเนื้อหา หมดอายุหลังหนึ่งชั่วโมง ต้องใช้บัญชี พารามิเตอร์ อุปกรณ์ และ limit เดิม; maxLength: 24576-
limitintegerจำนวนรายการสูงสุดที่ส่งกลับ แหล่งข้อมูลอาจส่งกลับน้อยกว่านี้; ≥ 1; ≤ 100-
category_idstringID หมวดหมู่แกลเลอรีที่ส่งกลับสำหรับสถานที่นี้; maxLength: 1024; ^[A-Za-z0-9_-]+={0,2}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: Google Maps place identifier; category_id: copy from this place gallery
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/photos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "id=0x8644b5a4ae3bcc33:0x31aba8abf8f64c84" \
  --data-urlencode "limit=10"

ข้อมูลรูปภาพ

GET https://api.apihop.ai/v1/google-maps/photos/meta

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
idstringID รูปภาพที่คัดลอกจาก results[].id ของ photos ห้ามใช้ data_id ของสถานที่; จำเป็น; maxLength: 255; ^[A-Za-z0-9_-]{20,255}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: copy photo ID from GET https://api.apihop.ai/v1/google-maps/photos results; NOT place data_id
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/photos/meta" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "id=AF1QipPFfVtTCFKV9n-uOBqTTOHuRemFBg0PWN7xdVxp"

โพสต์ธุรกิจ

GET https://api.apihop.ai/v1/google-maps/posts

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
idstringรหัสระบุแหล่งข้อมูลที่ส่งกลับในผลลัพธ์ Google Maps ที่เกี่ยวข้อง; จำเป็น-
next_page_tokenstringโทเค็นสำหรับดึงหน้าถัดไปที่ไม่ต้องตีความเนื้อหา หมดอายุหลังหนึ่งชั่วโมง ต้องใช้บัญชี พารามิเตอร์ อุปกรณ์ และ limit เดิม; maxLength: 24576-
limitintegerจำนวนรายการสูงสุดที่ส่งกลับ แหล่งข้อมูลอาจส่งกลับน้อยกว่านี้; ≥ 1; ≤ 100-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: Google Maps place identifier
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/posts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "id=0x8644b5a4ae3bcc33:0x31aba8abf8f64c84" \
  --data-urlencode "limit=10"

เส้นทาง

GET https://api.apihop.ai/v1/google-maps/directions

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
originstringที่อยู่ต้นทาง ต้องใช้เพียงหนึ่งค่าใน origin, start_data_id, start_coords-
destinationstringที่อยู่ปลายทาง ต้องใช้เพียงหนึ่งค่าใน destination, end_data_id, end_coords-
start_data_idstringID ข้อมูล Maps ฐานสิบหกของต้นทาง; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$-
end_data_idstringID ข้อมูล Maps ฐานสิบหกของปลายทาง; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$-
start_coordsstringละติจูด,ลองจิจูดของต้นทาง; maxLength: 80-
end_coordsstringละติจูด,ลองจิจูดของปลายทาง; maxLength: 80-
travel_modestringรูปแบบการเดินทาง; driving, walking, bicycling, transit, two-wheeler, best, flight-
distance_unitintegerกิโลเมตร (0) หรือไมล์ (1); ≥ 0; ≤ 1-
avoidstringประเภทถนนที่ต้องการหลีกเลี่ยง คั่นด้วยจุลภาค-
preferstringรูปแบบขนส่งสาธารณะ คั่นด้วยจุลภาค ต้องระบุ travel_mode=transit-
routeintegerเส้นทางขนส่งสาธารณะ: เปลี่ยนสายน้อยลง (2) เดินน้อยลง (3) รองรับรถเข็น (4); ≥ 2; ≤ 4-
timestringdepart_at:timestamp, arrive_by:timestamp หรือ last_available สำหรับขนส่งสาธารณะเท่านั้น; maxLength: 40-
limitintegerจำนวนรายการสูงสุดที่ส่งกลับ แหล่งข้อมูลอาจส่งกลับน้อยกว่านี้; ≥ 1; ≤ 100-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • origin XOR start_data_id XOR start_coords (required)
  • destination XOR end_data_id XOR end_coords (required)
  • start_coords, end_coords: latitude,longitude; latitude: -90..90; longitude: -180..180
  • prefer, route => travel_mode=transit; time=last_available => travel_mode=transit
  • time: depart_at:Unix_seconds OR arrive_by:Unix_seconds OR last_available
  • distance_unit: 0=km, 1=mi; route: 2=fewer transfers, 3=less walking, 4=wheelchair accessible
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/directions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "origin=Austin, TX" \
  --data-urlencode "destination=Dallas, TX" \
  --data-urlencode "travel_mode=driving"

คำแนะนำสถานที่

GET https://api.apihop.ai/v1/google-maps/autocomplete

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
querystringคำค้นหา ขนาดไม่เกิน 8192 ไบต์ใน UTF-8; จำเป็น-
latitudenumberละติจูด ต้องระบุ longitude ด้วย; ≥ -90; ≤ 90-
longitudenumberลองจิจูด ต้องระบุ latitude ด้วย; ≥ -180; ≤ 180-
limitintegerจำนวนรายการสูงสุดที่ส่งกลับ แหล่งข้อมูลอาจส่งกลับน้อยกว่านี้; ≥ 1; ≤ 100-
llstringขอบเขตการแสดงผล @latitude,longitude,zoomz (3-21) หรือ @latitude,longitude,heightm; maxLength: 120-
cpintegerตำแหน่งเคอร์เซอร์ใน query นับเป็นหน่วยรหัส UTF-16; ≥ 0-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • latitude AND longitude (optional)
  • cp <= query.length (UTF-16)
  • ll: @latitude,longitude,zoomz (3..21) OR @latitude,longitude,heightm (>0)
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=coffee in Austin" \
  --data-urlencode "limit=5"

รีวิวของผู้ร่วมให้ข้อมูล

GET https://api.apihop.ai/v1/google-maps/contributor/reviews

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
idstringID ผู้มีส่วนร่วมแบบตัวเลขจาก URL โปรไฟล์ผู้มีส่วนร่วมของ Google Maps; จำเป็น; ^[0-9]+$-
next_page_tokenstringโทเค็นสำหรับดึงหน้าถัดไปที่ไม่ต้องตีความเนื้อหา หมดอายุหลังหนึ่งชั่วโมง ต้องใช้บัญชี พารามิเตอร์ อุปกรณ์ และ limit เดิม; maxLength: 24576-
pageintegerหน้าภายในรีวิว 200 รายการแรก หน้าหลังหน้า 1 ใช้ร่วมกับโทเค็นไม่ได้; ≥ 1; ≤ 200-
limitintegerจำนวนรายการสูงสุดที่ส่งกลับ แหล่งข้อมูลอาจส่งกลับน้อยกว่านี้; ≥ 1; ≤ 50-
sort_bystringเฉพาะรีวิวล่าสุด; newest-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: numeric Google Maps contributor profile ID
  • (page - 1) * limit < 200; page default: 1; limit default: 20
  • page > 1 => NOT next_page_token
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/contributor/reviews" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "id=112967280418127956987" \
  --data-urlencode "limit=20"

GET https://api.apihop.ai/v1/google-maps/local

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
querystringคำค้นหา ขนาดไม่เกิน 8192 ไบต์ใน UTF-8; จำเป็น-
locationstringชื่อสถานที่ ใช้ร่วมกับพิกัดหรือ uule ไม่ได้-
latitudenumberละติจูด ต้องระบุ longitude ด้วย; ≥ -90; ≤ 90-
longitudenumberลองจิจูด ต้องระบุ latitude ด้วย; ≥ -180; ≤ 180-
uulestringตำแหน่ง Google ที่เข้ารหัสแล้ว ใช้ร่วมกับ location หรือพิกัดไม่ได้; maxLength: 4096-
google_domainstringโดเมน Google ของประเทศ เช่น google.com หรือ google.co.uk-
startintegerค่าออฟเซ็ตของผลลัพธ์ เริ่มจากศูนย์; ≥ 0; ≤ 1000-
tbsstringตัวกรองดั้งเดิมของ Google รูปแบบ key:value คั่นด้วยจุลภาค; maxLength: 512-
ludocidstringรหัสลูกค้าของสถานที่ Google (CID); ^[0-9]{1,20}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • (latitude AND longitude) XOR location XOR uule (optional)
  • tbs: comma-separated key:value filters; ludocid: Google place CID
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/local" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=coffee shop" \
  --data-urlencode "location=Austin, TX"

บริการในท้องถิ่น

GET https://api.apihop.ai/v1/google-maps/local/services

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
querystringคำค้นหา ขนาดไม่เกิน 8192 ไบต์ใน UTF-8; จำเป็น-
locationstringชื่อสถานที่ ใช้ร่วมกับพิกัดหรือ uule ไม่ได้-
limitintegerจำนวนรายการสูงสุดที่ส่งกลับ แหล่งข้อมูลอาจส่งกลับน้อยกว่านี้; ≥ 1; ≤ 20-
data_cidstringCID ทางภูมิศาสตร์แบบ 64 บิตไม่มีเครื่องหมายและไม่เป็นศูนย์ ใช้ร่วมกับ location ไม่ได้-
job_typestringค่าการเลือกบริการดั้งเดิม เช่น restore_power; maxLength: 100; ^[a-z][a-z0-9_]{0,99}$-
cidstringรหัสผู้ให้บริการ ต้องระบุ cid, bid และ pid พร้อมกัน; ^[0-9]{1,20}$-
bidstringรหัสผู้ให้บริการ ต้องระบุ cid, bid และ pid พร้อมกัน; ^[0-9]{1,20}$-
pidstringรหัสผู้ให้บริการ ต้องระบุ cid, bid และ pid พร้อมกัน; ^[0-9]{1,20}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • data_cid: geographic city/district CID, string 1..18446744073709551615; NOT location
  • cid AND bid AND pid (optional group); query selects the service category
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/local/services" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=plumber" \
  --data-urlencode "location=Austin, TX" \
  --data-urlencode "limit=5"

กิจกรรม

GET https://api.apihop.ai/v1/google-maps/events

ฟิลด์ชนิดข้อจำกัดตัวอย่าง
countrystringรหัสประเทศสองตัวอักษร; ^[A-Za-z]{2}$us
languagestringรหัสภาษาที่ผู้ให้บริการรองรับen
devicestringรูปแบบการแสดงผลของแหล่งข้อมูลตามอุปกรณ์; desktop, mobile, tablet-
zero_tracebooleanไม่จัดเก็บผลลัพธ์การตอบกลับจากต้นทาง แต่ยังเก็บข้อมูลเมตาสำหรับการคิดค่าบริการ-
no_cachebooleanแฟล็กความเข้ากันได้ ทั้งสองค่าดึงข้อมูลใหม่และคิดค่าบริการตามปกติ-
querystringคำค้นหา ขนาดไม่เกิน 8192 ไบต์ใน UTF-8; จำเป็น-
locationstringชื่อสถานที่ ใช้ร่วมกับพิกัดหรือ uule ไม่ได้-
latitudenumberละติจูด ต้องระบุ longitude ด้วย; ≥ -90; ≤ 90-
longitudenumberลองจิจูด ต้องระบุ latitude ด้วย; ≥ -180; ≤ 180-
uulestringตำแหน่ง Google ที่เข้ารหัสแล้ว ใช้ร่วมกับ location หรือพิกัดไม่ได้; maxLength: 4096-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • (latitude AND longitude) XOR location XOR uule (optional)
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
curl --get "https://api.apihop.ai/v1/google-maps/events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=events in Austin" \
  --data-urlencode "location=Austin, TX"

การตรวจสอบ

รับเฉพาะพารามิเตอร์ query ไม่มี body ปฏิเสธฟิลด์ที่ไม่รู้จัก ซ้ำ ว่าง และอักขระควบคุม การค้นหาต้องมี query ส่วน place_id หรือ data_cid เลือกสถานที่ ใช้ร่วมกันไม่ได้และ type ต้องตรงกัน เก็บ data_cid เป็นข้อความเลขฐานสิบในช่วง 1–18446744073709551615 พิกัดต้องเป็นคู่และใช้ร่วมกับ location ไม่ได้ m และ nearby ต้องมีจุดเริ่มต้น m ใช้ร่วมกับ zoom ไม่ได้ ราคาต่ำสุดต้องไม่เกินสูงสุด open_state ใช้ร่วมกับวันหรือชั่วโมงไม่ได้ ชั่วโมงต้องมีวันและ 0 คือเที่ยงคืน gl เป็นรหัสประเทศสองตัว hl เป็นภาษา ไม่เติมค่าเริ่มต้น ข้อความยาวไม่เกิน 8192 ตัว start มักเป็น 0, 20, 40 หน้าละไม่เกิน 20 รายการ กฎด้านล่างแสดงข้อจำกัดทั้งหมด

  • search: query; type = search (optional)
  • place: place_id XOR data_cid; type = place (optional); data_cid: 1..18446744073709551615 (string)
  • place: NOT latitude, longitude, location, zoom, m, start, nearby, min_price, max_price, min_rating, open_state, open_on_day, open_at_hour
  • origin (optional): (latitude AND longitude) XOR location; m => (coordinates OR location) AND NOT zoom; nearby => coordinates OR location
  • min_price <= max_price; open_at_hour => open_on_day; open_state => NOT open_on_day AND NOT open_at_hour
  • gl: /^[a-z]{2}$/i; hl: /^[a-z]{2,3}(?:-[a-z]{2,4})?$/i; string.length <= 8192

ตัวอย่าง

bash
curl --get "https://api.apihop.ai/v1/google-maps/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=coffee shop" \
  --data-urlencode "latitude=30.2672" \
  --data-urlencode "longitude=-97.7431" \
  --data-urlencode "start=0"
bash
curl --get "https://api.apihop.ai/v1/google-maps/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "data_cid=2982629209513831130" \
  --data-urlencode "hl=en"

ผลลัพธ์และข้อผิดพลาด

คง JSON ต้นฉบับและความแม่นยำ ตัวอย่างคือผลลัพธ์ว่างที่สำเร็จ HTTP 400: ข้อมูล; 401: ยืนยันตัวตน; 402: ยอดเงิน; 403: สิทธิ์; 405: วิธี; 429: จำกัด; 5xx: บริการ เก็บ X-Request-Id

json
{
  "success": true,
  "request_id": "example-request",
  "data": {
    "format": "json",
    "content": {
      "search_parameters": {
        "q": "coffee shop",
        "type": "maps",
        "engine": "google_maps"
      },
      "has_next_page": false,
      "results": []
    }
  }
}