Tài liệu API Hop
Tham chiếu Google Shopping
Tìm sản phẩm trên Google Shopping và lấy bộ lọc, thông tin chi tiết và ưu đãi của cửa hàng.
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/google-shopping/search GET /v1/google-shopping/light GET /v1/google-shopping/filters GET /v1/google-shopping/product GET /v1/google-shopping/immersive-product Tìm sản phẩm trên Google Shopping và lấy bộ lọc, thông tin chi tiết và ưu đãi của cửa hàng.
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.
Authorization: Bearer YOUR_API_KEYGoogle Shopping: Tìm sản phẩm
GET https://api.apihop.ai/v1/google-shopping/search
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: optional | coffee grinder |
country | string | Mã quốc gia hoặc cửa hàng (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
page | integer | Trang bắt đầu từ 1; page: optional; min: 1; max: 1000 | 1 |
device | string | Thiết bị; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
location | string | Vị trí tìm kiếm; location: optional | - |
latitude | number | Vĩ độ; latitude: optional; min: -90; max: 90 | -90 |
longitude | number | Kinh độ; longitude: optional; min: -180; max: 180 | -180 |
safe | string | Bộ lọc gốc (safe); safe: optional; active, off | active |
uule | string | Bộ lọc gốc (uule); uule: optional; UTF-8 bytes: 4096 | - |
google_domain | string | Tên miền theo vùng (google_domain); google_domain: optional | - |
start | integer | Vị trí kết quả; start: optional; min: 0; max: 1000 | 0 |
shoprs | string | Bộ lọc gốc (shoprs); shoprs: optional; UTF-8 bytes: 16384 | - |
min_price | number | Giá tối thiểu (min_price); min_price: optional; min: 0; max: 1000000000 | 0 |
max_price | number | Giá tối đa (max_price); max_price: optional; min: 0; max: 1000000000 | 0 |
sort_by | string | Sắp xếp; sort_by: optional; 1, 2 | 1 |
free_shipping | boolean | Miễn phí giao hàng (free_shipping); free_shipping: optional | true |
on_sale | boolean | Sản phẩm giảm giá (on_sale); on_sale: optional | true |
small_business | boolean | Doanh nghiệp nhỏ (small_business); small_business: optional | true |
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 supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/latitude => longitude; longitude => latitudeNOT (page AND start)min_price <= max_pricequery OR shoprs: requireduule => NOT location AND NOT latitude AND NOT longitude
Ví dụ
curl --get "https://api.apihop.ai/v1/google-shopping/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee grinder"Google Shopping: Tìm sản phẩm (rút gọn)
GET https://api.apihop.ai/v1/google-shopping/light
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: optional | coffee grinder |
country | string | Mã quốc gia hoặc cửa hàng (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
page | integer | Trang bắt đầu từ 1; page: optional; min: 1; max: 1000 | 1 |
device | string | Thiết bị; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
location | string | Vị trí tìm kiếm; location: optional | - |
latitude | number | Vĩ độ; latitude: optional; min: -90; max: 90 | -90 |
longitude | number | Kinh độ; longitude: optional; min: -180; max: 180 | -180 |
safe | string | Bộ lọc gốc (safe); safe: optional; active, off | active |
uule | string | Bộ lọc gốc (uule); uule: optional; UTF-8 bytes: 4096 | - |
google_domain | string | Tên miền theo vùng (google_domain); google_domain: optional | - |
start | integer | Vị trí kết quả; start: optional; min: 0; max: 1000 | 0 |
shoprs | string | Bộ lọc gốc (shoprs); shoprs: optional; UTF-8 bytes: 16384 | - |
min_price | number | Giá tối thiểu (min_price); min_price: optional; min: 0; max: 1000000000 | 0 |
max_price | number | Giá tối đa (max_price); max_price: optional; min: 0; max: 1000000000 | 0 |
sort_by | string | Sắp xếp; sort_by: optional; 1, 2 | 1 |
free_shipping | boolean | Miễn phí giao hàng (free_shipping); free_shipping: optional | true |
on_sale | boolean | Sản phẩm giảm giá (on_sale); on_sale: optional | true |
small_business | boolean | Doanh nghiệp nhỏ (small_business); small_business: optional | true |
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 supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/latitude => longitude; longitude => latitudeNOT (page AND start)min_price <= max_pricequery OR shoprs: requireduule => NOT location AND NOT latitude AND NOT longitude
Ví dụ
curl --get "https://api.apihop.ai/v1/google-shopping/light" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee grinder"Google Shopping: Lấy bộ lọc mua sắm
GET https://api.apihop.ai/v1/google-shopping/filters
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: REQUIRED | coffee grinder |
country | string | Mã quốc gia hoặc cửa hàng (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
location | string | Vị trí tìm kiếm; location: optional | - |
latitude | number | Vĩ độ; latitude: optional; min: -90; max: 90 | -90 |
longitude | number | Kinh độ; longitude: optional; min: -180; max: 180 | -180 |
uule | string | Bộ lọc gốc (uule); uule: optional; UTF-8 bytes: 4096 | - |
google_domain | string | Tên miền theo vùng (google_domain); google_domain: optional | - |
shoprs | string | Bộ lọc gốc (shoprs); shoprs: optional; UTF-8 bytes: 16384 | - |
device | string | Thiết bị; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
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 supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/latitude => longitude; longitude => latitudeuule => NOT location AND NOT latitude AND NOT longitude
Ví dụ
curl --get "https://api.apihop.ai/v1/google-shopping/filters" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee grinder"Google Shopping: Lấy thông tin sản phẩm
GET https://api.apihop.ai/v1/google-shopping/product
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
id | string | Mã sản phẩm hoặc người bán từ kết quả (id); id: optional | 17755277695162489284 |
query | string | Từ khóa tìm kiếm; query: optional | sony wh-1000xm5 |
country | string | Mã quốc gia hoặc cửa hàng (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
page_token | string | Mã chọn sản phẩm từ phản hồi mới nhất (page_token); page_token: optional; UTF-8 bytes: 16384 | - |
offer_view | boolean | Ưu đãi từ người bán khác (offer_view); offer_view: optional | true |
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 supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/id XOR page_token: required; page_token => NOT query AND NOT country AND NOT language AND NOT offer_viewid: /^[0-9]{1,30}$/Tokens: copy the exact token from a fresh response; do not invent or reuse expired tokens
Ví dụ
curl --get "https://api.apihop.ai/v1/google-shopping/product" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=17755277695162489284" \
--data-urlencode "query=sony wh-1000xm5"Google Shopping: Lấy thông tin sản phẩm mở rộng
GET https://api.apihop.ai/v1/google-shopping/immersive-product
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
page_token | string | Mã chọn sản phẩm từ phản hồi mới nhất (page_token); page_token: REQUIRED; UTF-8 bytes: 16384 | gprod1.eyJ2IjoxLCJpZCI6IjE3NzU1Mjc3Njk1MTYyNDg5Mjg0IiwicSI6InNvbnkgd2gtMTAwMHhtNSIsImdsIjoidXMiLCJobCI6ImVuIn0 |
more_stores | boolean | Thêm ưu đãi cửa hàng (more_stores); more_stores: optional | true |
next_page_token | string | Mã trang tiếp theo; next_page_token: optional; UTF-8 bytes: 24576 | - |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
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 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: copy immersive_product_page_token from a fresh search result; next_page_token requires more_stores = trueTokens: copy the exact token from a fresh response; do not invent or reuse expired tokens
Ví dụ
curl --get "https://api.apihop.ai/v1/google-shopping/immersive-product" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "page_token=gprod1.eyJ2IjoxLCJpZCI6IjE3NzU1Mjc3Njk1MTYyNDg5Mjg0IiwicSI6InNvbnkgd2gtMTAwMHhtNSIsImdsIjoidXMiLCJobCI6ImVuIn0"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.
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}