API Hop

Tài liệu

Tài liệu API Hop

Tham chiếu TripAdvisor

Tìm địa điểm trên Tripadvisor và lấy thông tin và đánh giá.

Giới hạn đồng thời

AI và Data mỗi loại dùng chung một nhóm lượt đồng thời trên toàn tài khoản: mặc định 5 AI / 2 Data, tùy theo gói đăng ký. Giới hạn riêng của endpoint vẫn chịu giới hạn tổng của loại API. Khi đạt bất kỳ giới hạn nào, API trả về HTTP 429. Tác vụ bất đồng bộ giữ chỗ đến khi thực thi kết thúc.

GET /v1/tripadvisor/search
Giới hạn mặc định: 2
GET /v1/tripadvisor/place
Giới hạn mặc định: 2
GET /v1/tripadvisor/reviews
Giới hạn mặc định: 2

Tìm địa điểm trên Tripadvisor và lấy thông tin và đánh giá.

Xác thực và phí

Giá mặc định là $0.0003 (300 credits) cho mỗi yêu cầu thành công. Dùng khóa API API Hop. Quyền truy cập phụ thuộc cổng đang bật và quyền khóa. Xem danh mục và tài khoản để biết giá mỗi yêu cầu thành công; ưu tiên giá tài khoản. Kết quả rỗng thành công vẫn tính phí. Lỗi giải phóng khoản giữ trước. Hết hạn sau 60 giây, không tự thử lại hay phân trang. Lỗi quyết toán không gọi lại nhà cung cấp.

http
Authorization: Bearer YOUR_API_KEY

Tripadvisor: Tìm địa điểm

GET https://api.apihop.ai/v1/tripadvisor/search

Tham số

TrườngKiểuGiới hạnVí dụ
querystringTừ khóa tìm kiếm; query: REQUIREDrestaurants in Austin
locationstringVị trí tìm kiếm; location: optional-
languagestringNgôn ngữ; language: optional-
next_page_tokenstringMã trang tiếp theo; next_page_token: optional; UTF-8 bytes: 24576-
limitintegerGiới hạn kết quả; limit: optional; min: 1; max: 1001
devicestringThiết bị; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanKhông lưu trữ phản hồi; zero_trace: optionaltrue
latitudenumberVĩ độ; latitude: optional; min: -90; max: 90-90
longitudenumberKinh độ; longitude: optional; min: -180; max: 180-180
ssrcstringPhạm vi tìm kiếm; ssrc: optional; a, r, A, h, g, fa
offsetintegerVị trí kết quả; offset: optional; min: 0; max: 10000
tripadvisor_domainstringTên miền Tripadvisor theo vùng; tripadvisor_domain: optional; ar.tripadvisor.com, cn.tripadvisor.com, en.tripadvisor.com.hk, fr.tripadvisor.be, fr.tripadvisor.ca, fr.tripadvisor.ch, it.tripadvisor.ch, no.tripadvisor.com, th.tripadvisor.com, tripadvisor.at, tripadvisor.be, tripadvisor.ca, tripadvisor.ch, tripadvisor.cl, tripadvisor.co, tripadvisor.co.id, tripadvisor.co.il, tripadvisor.co.kr, tripadvisor.co.nz, tripadvisor.co.uk, tripadvisor.co.za, tripadvisor.com, tripadvisor.com.ar, tripadvisor.com.au, tripadvisor.com.br, tripadvisor.com.eg, tripadvisor.com.gr, tripadvisor.com.hk, tripadvisor.com.mx, tripadvisor.com.my, tripadvisor.com.pe, tripadvisor.com.ph, tripadvisor.com.sg, tripadvisor.com.tr, tripadvisor.com.tw, tripadvisor.com.ve, tripadvisor.com.vn, tripadvisor.de, tripadvisor.dk, tripadvisor.es, tripadvisor.fr, tripadvisor.ie, tripadvisor.in, tripadvisor.it, tripadvisor.jp, tripadvisor.nl, tripadvisor.pt, tripadvisor.ru, tripadvisor.se, www.tripadvisor.at, www.tripadvisor.be, www.tripadvisor.ca, www.tripadvisor.ch, www.tripadvisor.cl, www.tripadvisor.co, www.tripadvisor.co.id, www.tripadvisor.co.il, www.tripadvisor.co.kr, www.tripadvisor.co.nz, www.tripadvisor.co.uk, www.tripadvisor.co.za, www.tripadvisor.com, www.tripadvisor.com.ar, www.tripadvisor.com.au, www.tripadvisor.com.br, www.tripadvisor.com.eg, www.tripadvisor.com.gr, www.tripadvisor.com.hk, www.tripadvisor.com.mx, www.tripadvisor.com.my, www.tripadvisor.com.pe, www.tripadvisor.com.ph, www.tripadvisor.com.sg, www.tripadvisor.com.tr, www.tripadvisor.com.tw, www.tripadvisor.com.ve, www.tripadvisor.com.vn, www.tripadvisor.de, www.tripadvisor.dk, www.tripadvisor.es, www.tripadvisor.fr, www.tripadvisor.ie, www.tripadvisor.in, www.tripadvisor.it, www.tripadvisor.jp, www.tripadvisor.nl, www.tripadvisor.pt, www.tripadvisor.ru, www.tripadvisor.sear.tripadvisor.com

Kiểm tra

Chỉ nhận tham số truy vấn, không có phần thân. Từ chối giá trị lạ, trùng lặp, trống hoặc không hợp lệ. Chỉ hỗ trợ JSON; không tự phân trang hay thử lại. Quy tắc: AND = cả hai, OR = hoặc, XOR = đúng một, NOT = loại trừ, => = yêu cầu.

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
  • latitude => longitude; longitude => latitude
  • NOT (next_page_token AND offset); next_page_token: opaque, expires after 1 hour; keep account, filters, device and limit unchanged

Ví dụ

bash
curl --get "https://api.apihop.ai/v1/tripadvisor/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=restaurants in Austin"

Tripadvisor: Lấy thông tin địa điểm

GET https://api.apihop.ai/v1/tripadvisor/place

Tham số

TrườngKiểuGiới hạnVí dụ
idstringMã địa điểm; id: REQUIRED27936245
languagestringNgôn ngữ; language: optional-
devicestringThiết bị; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanKhông lưu trữ phản hồi; zero_trace: optionaltrue
tripadvisor_domainstringTên miền Tripadvisor theo vùng; tripadvisor_domain: optional; ar.tripadvisor.com, cn.tripadvisor.com, en.tripadvisor.com.hk, fr.tripadvisor.be, fr.tripadvisor.ca, fr.tripadvisor.ch, it.tripadvisor.ch, no.tripadvisor.com, th.tripadvisor.com, tripadvisor.at, tripadvisor.be, tripadvisor.ca, tripadvisor.ch, tripadvisor.cl, tripadvisor.co, tripadvisor.co.id, tripadvisor.co.il, tripadvisor.co.kr, tripadvisor.co.nz, tripadvisor.co.uk, tripadvisor.co.za, tripadvisor.com, tripadvisor.com.ar, tripadvisor.com.au, tripadvisor.com.br, tripadvisor.com.eg, tripadvisor.com.gr, tripadvisor.com.hk, tripadvisor.com.mx, tripadvisor.com.my, tripadvisor.com.pe, tripadvisor.com.ph, tripadvisor.com.sg, tripadvisor.com.tr, tripadvisor.com.tw, tripadvisor.com.ve, tripadvisor.com.vn, tripadvisor.de, tripadvisor.dk, tripadvisor.es, tripadvisor.fr, tripadvisor.ie, tripadvisor.in, tripadvisor.it, tripadvisor.jp, tripadvisor.nl, tripadvisor.pt, tripadvisor.ru, tripadvisor.se, www.tripadvisor.at, www.tripadvisor.be, www.tripadvisor.ca, www.tripadvisor.ch, www.tripadvisor.cl, www.tripadvisor.co, www.tripadvisor.co.id, www.tripadvisor.co.il, www.tripadvisor.co.kr, www.tripadvisor.co.nz, www.tripadvisor.co.uk, www.tripadvisor.co.za, www.tripadvisor.com, www.tripadvisor.com.ar, www.tripadvisor.com.au, www.tripadvisor.com.br, www.tripadvisor.com.eg, www.tripadvisor.com.gr, www.tripadvisor.com.hk, www.tripadvisor.com.mx, www.tripadvisor.com.my, www.tripadvisor.com.pe, www.tripadvisor.com.ph, www.tripadvisor.com.sg, www.tripadvisor.com.tr, www.tripadvisor.com.tw, www.tripadvisor.com.ve, www.tripadvisor.com.vn, www.tripadvisor.de, www.tripadvisor.dk, www.tripadvisor.es, www.tripadvisor.fr, www.tripadvisor.ie, www.tripadvisor.in, www.tripadvisor.it, www.tripadvisor.jp, www.tripadvisor.nl, www.tripadvisor.pt, www.tripadvisor.ru, www.tripadvisor.sear.tripadvisor.com

Kiểm tra

Chỉ nhận tham số truy vấn, không có phần thân. Từ chối giá trị lạ, trùng lặp, trống hoặc không hợp lệ. Chỉ hỗ trợ JSON; không tự phân trang hay thử lại. Quy tắc: AND = cả hai, OR = hoặc, XOR = đúng một, NOT = loại trừ, => = yêu cầu.

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
  • id: positive integer string <= 2147483647 OR canonical HTTPS Tripadvisor URL; no query, fragment, credentials or port

Ví dụ

bash
curl --get "https://api.apihop.ai/v1/tripadvisor/place" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "id=27936245"

Tripadvisor: Lấy đánh giá

GET https://api.apihop.ai/v1/tripadvisor/reviews

Tham số

TrườngKiểuGiới hạnVí dụ
idstringMã địa điểm; id: REQUIRED27936245
languagestringNgôn ngữ; language: optional-
next_page_tokenstringMã trang tiếp theo; next_page_token: optional; UTF-8 bytes: 24576-
limitintegerGiới hạn kết quả; limit: optional; min: 1; max: 201
sort_bystringSắp xếp; sort_by: optional; recommended, newest, most_recent, detailed_reviewrecommended
devicestringThiết bị; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanKhông lưu trữ phản hồi; zero_trace: optionaltrue
ratingstringSố sao, phân cách bằng dấu phẩy; rating: optional-
monthstringTháng, phân cách bằng dấu phẩy; month: optional-
offsetintegerVị trí kết quả; offset: optional; min: 0; max: 1000000
tripadvisor_domainstringTên miền Tripadvisor theo vùng; tripadvisor_domain: optional; ar.tripadvisor.com, cn.tripadvisor.com, en.tripadvisor.com.hk, fr.tripadvisor.be, fr.tripadvisor.ca, fr.tripadvisor.ch, it.tripadvisor.ch, no.tripadvisor.com, th.tripadvisor.com, tripadvisor.at, tripadvisor.be, tripadvisor.ca, tripadvisor.ch, tripadvisor.cl, tripadvisor.co, tripadvisor.co.id, tripadvisor.co.il, tripadvisor.co.kr, tripadvisor.co.nz, tripadvisor.co.uk, tripadvisor.co.za, tripadvisor.com, tripadvisor.com.ar, tripadvisor.com.au, tripadvisor.com.br, tripadvisor.com.eg, tripadvisor.com.gr, tripadvisor.com.hk, tripadvisor.com.mx, tripadvisor.com.my, tripadvisor.com.pe, tripadvisor.com.ph, tripadvisor.com.sg, tripadvisor.com.tr, tripadvisor.com.tw, tripadvisor.com.ve, tripadvisor.com.vn, tripadvisor.de, tripadvisor.dk, tripadvisor.es, tripadvisor.fr, tripadvisor.ie, tripadvisor.in, tripadvisor.it, tripadvisor.jp, tripadvisor.nl, tripadvisor.pt, tripadvisor.ru, tripadvisor.se, www.tripadvisor.at, www.tripadvisor.be, www.tripadvisor.ca, www.tripadvisor.ch, www.tripadvisor.cl, www.tripadvisor.co, www.tripadvisor.co.id, www.tripadvisor.co.il, www.tripadvisor.co.kr, www.tripadvisor.co.nz, www.tripadvisor.co.uk, www.tripadvisor.co.za, www.tripadvisor.com, www.tripadvisor.com.ar, www.tripadvisor.com.au, www.tripadvisor.com.br, www.tripadvisor.com.eg, www.tripadvisor.com.gr, www.tripadvisor.com.hk, www.tripadvisor.com.mx, www.tripadvisor.com.my, www.tripadvisor.com.pe, www.tripadvisor.com.ph, www.tripadvisor.com.sg, www.tripadvisor.com.tr, www.tripadvisor.com.tw, www.tripadvisor.com.ve, www.tripadvisor.com.vn, www.tripadvisor.de, www.tripadvisor.dk, www.tripadvisor.es, www.tripadvisor.fr, www.tripadvisor.ie, www.tripadvisor.in, www.tripadvisor.it, www.tripadvisor.jp, www.tripadvisor.nl, www.tripadvisor.pt, www.tripadvisor.ru, www.tripadvisor.sear.tripadvisor.com
type_of_visitstringLoại chuyến thăm, phân cách bằng dấu phẩy; type_of_visit: optional-

Kiểm tra

Chỉ nhận tham số truy vấn, không có phần thân. Từ chối giá trị lạ, trùng lặp, trống hoặc không hợp lệ. Chỉ hỗ trợ JSON; không tự phân trang hay thử lại. Quy tắc: AND = cả hai, OR = hoặc, XOR = đúng một, NOT = loại trừ, => = yêu cầu.

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
  • id: positive integer string <= 2147483647 OR canonical HTTPS Tripadvisor URL; no query, fragment, credentials or port
  • NOT (next_page_token AND offset); next_page_token: opaque, expires after 1 hour; keep account, filters, device and limit unchanged
  • rating: distinct 1..5; month: distinct 1..12; type_of_visit: distinct /^[A-Za-z_]+$/; lists comma-separated

Ví dụ

bash
curl --get "https://api.apihop.ai/v1/tripadvisor/reviews" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "id=27936245"

Phản hồi và lỗi

Giữ JSON gốc và độ chính xác. Ví dụ kết quả rỗng thành công. HTTP 400: đầu vào; 401: xác thực; 402: số dư; 403: quyền; 405: phương thức; 429: giới hạn; 5xx: dịch vụ. Giữ X-Request-Id.

json
{
  "success": true,
  "request_id": "example-request",
  "data": {
    "format": "json",
    "content": {
      "results": []
    }
  }
}