Tài liệu API Hop
Tham chiếu Google Search
Google Search: Tìm kiếm web · Câu trả lời AI Mode · Tóm tắt AI · Tìm kiếm nhẹ · Gợi ý tìm kiếm · Câu hỏi liên quan · Tìm kiếm diễn đàn · Quảng cáo tìm kiếm · Thông tin nguồn · Tìm nội dung quảng cáo · Chi tiết nội dung quảng cáo.
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-search/search GET /v1/google-search/ai-mode GET /v1/google-search/ai-overview GET /v1/google-search/light GET /v1/google-search/autocomplete GET /v1/google-search/related-questions GET /v1/google-search/forums GET /v1/google-search/ads GET /v1/google-search/about-this-result GET /v1/google-search/ads-transparency GET /v1/google-search/ads-transparency-details Google Search: Tìm kiếm web · Câu trả lời AI Mode · Tóm tắt AI · Tìm kiếm nhẹ · Gợi ý tìm kiếm · Câu hỏi liên quan · Tìm kiếm diễn đàn · Quảng cáo tìm kiếm · Thông tin nguồn · Tìm nội dung quảng cáo · Chi tiết nội dung quảng cáo.
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_KEYChỉ nhận tham số truy vấn, không có phần thân. Từ chối giá trị lạ, trùng, trống hoặc không hợp lệ. Chỉ JSON, không tự phân trang hay thử lại. Sao chép mã từ phản hồi mới nhất. Ví dụ chỉ để minh họa. Mỗi truy vấn hoàn tất tính phí riêng, kể cả kết quả trống hoặc không khả dụng đã xác nhận. XOR = đúng một, NOT = loại trừ, => = yêu cầu.
Google Search: Tìm kiếm web
GET https://api.apihop.ai/v1/google-search/search
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
url | string | Địa chỉ HTTPS tìm kiếm đầy đủ (url); url: optional; maxLength: 32768 | https://www.google.com/search?q=coffee%20beans&hl=en&gl=us |
device_os | string | Hệ điều hành di động (device_os); device_os: optional; android, ios | ios |
query | string | Từ khóa tìm kiếm; query: optional; minLength: 1; maxLength: 24576; UTF-8 bytes: 8192 | coffee |
query_encoded | boolean | Truy vấn đã mã hóa URL (query_encoded); query_encoded: optional | true |
uule | string | Khu vực (uule); uule: optional; minLength: 3; maxLength: 4096; ^[wa]\+(?:[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}$ | w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM |
rewrite_links | boolean | Giải quyết liên kết chuyển hướng HTML (rewrite_links); rewrite_links: optional | true |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
device | string | Thiết bị; device: optional; mobile, tablet, desktop | mobile |
safe | string | Bộ lọc kết quả (safe); safe: optional; active, off | active |
color_scheme | string | Chủ đề màu (color_scheme); color_scheme: optional; light, dark | light |
ludocid | string | Chế độ tìm kiếm hoặc bộ chọn gốc (ludocid); ludocid: optional; maxLength: 20 | - |
lsig | string | Chế độ tìm kiếm hoặc bộ chọn gốc (lsig); lsig: optional; maxLength: 2048 | - |
kgmid | string | Chế độ tìm kiếm hoặc bộ chọn gốc (kgmid); kgmid: optional; maxLength: 131 | - |
si | string | Chế độ tìm kiếm hoặc bộ chọn gốc (si); si: optional; maxLength: 8192 | - |
ibp | string | Chế độ tìm kiếm hoặc bộ chọn gốc (ibp); ibp: optional; maxLength: 2048 | - |
uds | string | Chế độ tìm kiếm hoặc bộ chọn gốc (uds); uds: optional; maxLength: 8192 | - |
pws | integer | Bộ lọc kết quả (pws); pws: optional; 0, 1 | 0 |
nfpr | integer | Bộ lọc kết quả (nfpr); nfpr: optional; 0, 1 | 0 |
filter | integer | Bộ lọc kết quả (filter); filter: optional; 0, 1 | 0 |
lr | string | Bộ lọc ngôn ngữ (lr); lr: optional; ^lang_[a-z]{2,3}(\|lang_[a-z]{2,3})*$ | lang_fr |
cr | string | Bộ lọc quốc gia (cr); cr: optional; ^country[A-Za-z]{2}(\|country[A-Za-z]{2})*$ | countryFR |
start | integer | Vị trí kết quả; start: optional; min: 0 | 10 |
google_domain | string | Tên miền công cụ tìm kiếm (google_domain); google_domain: optional; google.com, google.ad, google.ae, google.com.af, google.com.ag, google.al, google.am, google.co.ao, google.com.ar, google.as, ... 186 | google.co.uk |
gl | string | Bộ lọc quốc gia (gl); gl: optional; ad, ae, af, ag, ai, al, am, an, ao, aq, ... 252 | ad |
hl | string | Bộ lọc ngôn ngữ (hl); hl: optional; af, sq, am, ar, hy, az, bn, bg, my, ca, ... 76 | af |
location | string | Vị trí tìm kiếm; Nguồn; location: optional; minLength: 1 | Austin,Texas,United States |
coordinates | string | Tọa độ JSON (latitude, longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
radius | integer | Bán kính tính bằng mét (radius); radius: optional; min: 1; max: 1000 | 150 |
tbs | string | Khoảng thời gian (tbs); tbs: optional | qdr:h |
tbm | string | Chế độ tìm kiếm hoặc bộ chọn gốc (tbm); tbm: optional; nws, vid, isch, shop, lcl, bks | nws |
udm | integer | Chế độ tìm kiếm hoặc bộ chọn gốc (udm); udm: optional; 1, 2, 6, 7, 12, 14, 28, 36, 50 | 2 |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)radius => coordinates; NOT uule; desktop radius <= 199 meters, mobile/tablet radius <= 1000 metersdevice_os => device = mobile OR tabletquery XOR url; tbm XOR udm when selecting a search tabquery: <= 8192 UTF-8 bytes after decoding; query_encoded=true => URL-encoded query value, not a URL or q= prefixurl: HTTPS Google /search with nonempty q or as_q; only device, device_os, zero_trace and rewrite_links may accompany urlludocid: nonzero unsigned 64-bit decimal string; preserve numeric precision
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Google Search: Câu trả lời AI Mode
GET https://api.apihop.ai/v1/google-search/ai-mode
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | Bộ lọc quốc gia (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
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 | - |
coordinates | string | Tọa độ JSON (latitude, longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Khu vực (uule); uule: optional; maxLength: 4096 | - |
image_url | string | Địa chỉ HTTPS ảnh công khai (image_url); image_url: optional; maxLength: 2048 | - |
continuable | boolean | Bật mã hội thoại tiếp theo (continuable); continuable: optional | true |
subsequent_request_token | string | Mã từ phản hồi mới nhất (subsequent_request_token); subsequent_request_token: optional; maxLength: 24576 | - |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)continuable=true: return a conversation token; subsequent_request_token: new query, optional image_url, same original locale/location; token expires after 15 minutes or earlier at the sourceimage_url: public HTTPS image URL; no credentials, fragment or port
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/ai-mode" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=how do solar panels work"Google Search: Tóm tắt AI
GET https://api.apihop.ai/v1/google-search/ai-overview
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: optional; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | Bộ lọc quốc gia (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
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 |
page_token | string | Mã từ phản hồi mới nhất (page_token); page_token: optional; maxLength: 24576 | - |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedquery XOR page_token; page_token: copy from a fresh search response; preserve original query and localepage_token: use within one minute; valid page without AI Overview => feature_available=false
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/ai-overview" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=how do solar panels work"Google Search: Tìm kiếm nhẹ
GET https://api.apihop.ai/v1/google-search/light
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | coffee |
country | string | Bộ lọc quốc gia (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 |
location | string | Vị trí tìm kiếm; location: optional | - |
safe | string | Bộ lọc kết quả (safe); safe: optional; active, off | active |
time_range | string | Khoảng thời gian (time_range); time_range: optional | - |
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 |
coordinates | string | Tọa độ JSON (latitude, longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Khu vực (uule); uule: optional; maxLength: 4096 | - |
google_domain | string | Tên miền công cụ tìm kiếm (google_domain); google_domain: optional | - |
lr | string | Bộ lọc ngôn ngữ (lr); lr: optional; ^lang_[a-z]{2,3}(?:\|lang_[a-z]{2,3})*$ | - |
nfpr | integer | Bộ lọc kết quả (nfpr); nfpr: optional; 0, 1 | 0 |
filter | integer | Bộ lọc kết quả (filter); filter: optional; 0, 1 | 0 |
start | integer | Vị trí kết quả; start: optional; min: 0; max: 1000 | 0 |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/light" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Google Search: Gợi ý tìm kiếm
GET https://api.apihop.ai/v1/google-search/autocomplete
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: REQUIRED; minLength: 1; maxLength: 100; UTF-8 bytes: 8192 | coffee |
country | string | Bộ lọc quốc gia (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
limit | integer | Giới hạn kết quả; limit: optional; min: 1; max: 20 | 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 |
client | string | Chế độ tìm kiếm hoặc bộ chọn gốc (client); client: optional; chrome, chrome-omni, gws-wiz, safari, firefox, psy-ab, toolbar, youtube, gws-wiz-local | chrome |
cp | integer | Vị trí con trỏ (cp); cp: optional; min: 0; max: 8192 | 0 |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Google Search: Câu hỏi liên quan
GET https://api.apihop.ai/v1/google-search/related-questions
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: optional; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | Bộ lọc quốc gia (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
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 |
next_page_token | string | Mã từ phản hồi mới nhất (next_page_token); next_page_token: optional; minLength: 1; maxLength: 24576 | - |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectednext_page_token: copy from a fresh response; keep original query, localization and filters; do not fabricate tokensquery OR next_page_token: required; result tokens expand an individual question
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/related-questions" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=how do solar panels work"Google Search: Tìm kiếm diễn đàn
GET https://api.apihop.ai/v1/google-search/forums
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | best coffee grinder |
country | string | Bộ lọc quốc gia (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 |
location | string | Vị trí tìm kiếm; location: optional | - |
safe | string | Bộ lọc kết quả (safe); safe: optional; active, off | active |
time_range | string | Khoảng thời gian (time_range); time_range: optional | - |
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 |
coordinates | string | Tọa độ JSON (latitude, longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Khu vực (uule); uule: optional; maxLength: 4096 | - |
nfpr | integer | Bộ lọc kết quả (nfpr); nfpr: optional; 0, 1 | 0 |
filter | integer | Bộ lọc kết quả (filter); filter: optional; 0, 1 | 0 |
start | integer | Vị trí kết quả; start: optional; min: 0; max: 1000 | 0 |
tbs | string | Khoảng thời gian (tbs); tbs: optional; maxLength: 512 | - |
period_unit | string | Khoảng thời gian (period_unit); period_unit: optional; s, n, h, d, w, m, y | s |
period_value | integer | Khoảng thời gian (period_value); period_value: optional; min: 1; max: 2147483647 | 1 |
start_date | string | Giới hạn ngày (start_date); start_date: optional; ^[0-9]{8}$ | - |
end_date | string | Giới hạn ngày (end_date); end_date: optional; ^[0-9]{8}$ | - |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/forums" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=best coffee grinder"Google Search: Quảng cáo tìm kiếm
GET https://api.apihop.ai/v1/google-search/ads
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | car insurance |
country | string | Bộ lọc quốc gia (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
location | string | Vị trí tìm kiếm; location: optional | - |
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 |
coordinates | string | Tọa độ JSON (latitude, longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
safe | string | Bộ lọc kết quả (safe); safe: optional; active, off | active |
nfpr | integer | Bộ lọc kết quả (nfpr); nfpr: optional; 0, 1 | 0 |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)valid page without ads => ads_available=false; this endpoint reads ads and does not create campaigns
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/ads" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=car insurance"Google Search: Thông tin nguồn
GET https://api.apihop.ai/v1/google-search/about-this-result
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm (website URL; query XOR req_token); query: optional; minLength: 1; UTF-8 bytes: 8192 | https://www.starbucks.com/ |
req_token | string | Mã từ phản hồi mới nhất (req_token); req_token: optional; maxLength: 16384; ^[A-Za-z0-9_-]+={0,2}$ | - |
country | string | Bộ lọc quốc gia (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Ngôn ngữ; language: optional | - |
google_domain | string | Tên miền công cụ tìm kiếm (google_domain); google_domain: optional | - |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedquery XOR req_token; query: website URL; req_token: copy from a fresh About This Result selector
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/about-this-result" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=https://www.starbucks.com/"Google Search: Tìm nội dung quảng cáo
GET https://api.apihop.ai/v1/google-search/ads-transparency
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
query | string | Từ khóa tìm kiếm; query: optional; minLength: 1; UTF-8 bytes: 8192 | nike.com |
country | string | Bộ lọc quốc gia (country); country: optional; ad, ae, af, ag, ai, al, am, ao, aq, ar, ... 244; ^[A-Za-z]{2}$ | ad |
language | string | Ngôn ngữ; language: optional | - |
limit | integer | Giới hạn kết quả; limit: optional; min: 1; max: 100 | 1 |
id | string | Mã định danh gốc (id); id: optional | - |
category | string | Chế độ tìm kiếm hoặc bộ chọn gốc (category); category: optional; image, text, video | image |
next_page_token | string | Mã từ phản hồi mới nhất (next_page_token); next_page_token: optional; minLength: 1; maxLength: 24576 | - |
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 |
advertiser_id | string | Mã định danh gốc (advertiser_id); advertiser_id: optional; maxLength: 3499 | - |
platform | string | Chế độ tìm kiếm hoặc bộ chọn gốc (platform); platform: optional; PLAY, MAPS, SEARCH, SHOPPING, YOUTUBE | PLAY |
political_ads | boolean | Bộ lọc kết quả (political_ads); political_ads: optional | true |
get_advertiser | boolean | Chi tiết nhà quảng cáo (get_advertiser); get_advertiser: optional | true |
region | string | Khu vực (region); Ví dụ: US=2840; region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245; maxLength: 8 | anywhere |
start_date | string | Giới hạn ngày (start_date); start_date: optional; ^[0-9]{8}$ | - |
end_date | string | Giới hạn ngày (end_date); end_date: optional; ^[0-9]{8}$ | - |
creative_format | string | Chế độ tìm kiếm hoặc bộ chọn gốc (creative_format); creative_format: optional; image, text, video | image |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectednext_page_token: copy from a fresh response; keep original query, localization and filters; do not fabricate tokensexactly one of query, id, advertiser_id; category XOR creative_format when selecting a creative formatid, advertiser_id: AR-prefixed IDs, comma-separated, up to 100; get_advertiser=true => exactly one advertiser IDpolitical_ads=true => explicit country or region other than anywhere; start_date < end_date; dates must exist
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/ads-transparency" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=nike.com"Google Search: Chi tiết nội dung quảng cáo
GET https://api.apihop.ai/v1/google-search/ads-transparency-details
Tham số
| Trường | Kiểu | Giới hạn | Ví dụ |
|---|---|---|---|
advertiser_id | string | Mã định danh gốc (advertiser_id); advertiser_id: REQUIRED; maxLength: 34; ^AR[0-9]{1,32}$ | ${ADVERTISER_ID} |
creative_id | string | Mã định danh gốc (creative_id); creative_id: REQUIRED; maxLength: 34; ^CR[0-9]{1,32}$ | ${CREATIVE_ID} |
region | string | Khu vực (region); region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245 | anywhere |
zero_trace | boolean | Không lưu trữ phản hồi; zero_trace: optional | true |
Kiểm tra
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedadvertiser_id AND creative_id: copy from a fresh ads-transparency response; sample identifiers do not prove availability
Ví dụ
curl --get "https://api.apihop.ai/v1/google-search/ads-transparency-details" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "advertiser_id=${ADVERTISER_ID}" \
--data-urlencode "creative_id=${CREATIVE_ID}"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": []
}
}
}