API Hop 文档
Google Search 接口参考
Google Search: 网页搜索 · AI Mode 回答 · AI 摘要 · 轻量搜索 · 搜索建议 · 相关问题 · 论坛搜索 · 搜索广告 · 来源信息 · 广告素材搜索 · 广告素材详情.
并发上限
AI 与 Data 分别共享账户级并发槽位,默认 5 AI / 2 Data,订阅套餐可调整上限。接口单独配置仍受分类总上限约束。达到任一上限返回 HTTP 429;异步任务执行结束前占用槽位。
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: 网页搜索 · AI Mode 回答 · AI 摘要 · 轻量搜索 · 搜索建议 · 相关问题 · 论坛搜索 · 搜索广告 · 来源信息 · 广告素材搜索 · 广告素材详情.
认证与计费
默认每次成功请求 $0.0003(300 credits)。 使用 API Hop API Key。可用性取决于已启用网关和密钥权限。每次成功请求的价格以当前目录和账户显示为准,账户专属价格优先。成功的空结果也计费,失败请求释放预占额度。超时为 60 秒,不自动重试或翻页,结算失败不会重复调用上游。
Authorization: Bearer YOUR_API_KEY仅接受查询参数,不接受请求体。拒绝未知、重复、空值或无效参数。仅支持 JSON,不自动翻页或重试。标识和续查令牌应从最新响应复制,示例仅供说明。每次完成的查询分别计费,包括已确认的空结果或不可用结果。XOR 表示二选一,NOT 表示不能提供,=> 表示需要。
Google Search: 网页搜索
GET https://api.apihop.ai/v1/google-search/search
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
url | string | 完整 HTTPS 搜索地址 (url); url: optional; maxLength: 32768 | https://www.google.com/search?q=coffee%20beans&hl=en&gl=us |
device_os | string | 移动设备操作系统 (device_os); device_os: optional; android, ios | ios |
query | string | 搜索词; query: optional; minLength: 1; maxLength: 24576; UTF-8 bytes: 8192 | coffee |
query_encoded | boolean | 查询词已进行 URL 编码 (query_encoded); query_encoded: optional | true |
uule | string | Google 编码位置,原样传递;与 location、coordinates、radius 互斥。源站可能忽略不支持的位置。; uule: optional; minLength: 3; maxLength: 4096; ^[wa]\+(?:[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}$ | w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM |
rewrite_links | boolean | 解析 HTML 中的跳转链接 (rewrite_links); rewrite_links: optional | true |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
device | string | 设备; device: optional; mobile, tablet, desktop | mobile |
safe | string | 结果筛选 (safe); safe: optional; active, off | active |
color_scheme | string | 页面配色 (color_scheme); color_scheme: optional; light, dark | light |
ludocid | string | Google 地点 CID,非零无符号 64 位十进制字符串;保持字符串以避免精度丢失。; ludocid: optional; maxLength: 20 | - |
lsig | string | 本地搜索结果中的地点签名,用于选择地图或知识图谱视图。; lsig: optional; maxLength: 2048 | - |
kgmid | string | 以 /m/ 或 /g/ 开头的 Google 知识图谱实体 ID;可能沿用该实体原有的搜索上下文。; kgmid: optional; maxLength: 131 | - |
si | string | 选择缓存搜索或知识图谱标签页的 Google 原生令牌;可能沿用原查询上下文。; si: optional; maxLength: 8192 | - |
ibp | string | Google 页面布局选择器,例如 gwp;0,7 可展开地点知识图谱。; ibp: optional; maxLength: 2048 | - |
uds | string | 从 Google 筛选链接复制的原生搜索筛选令牌。; uds: optional; maxLength: 8192 | - |
pws | integer | 0 请求关闭 Google 个性化,1 允许个性化;省略使用默认值。不会关闭地区、语言或设备影响,也不基于本服务账户个性化。; pws: optional; 0, 1 | 0 |
nfpr | integer | 1 按原搜索词查询,不自动纠正拼写;0 保留正常纠错行为。; nfpr: optional; 0, 1 | 0 |
filter | integer | Google 重复结果筛选:1 启用,0 关闭;搜索源不保证始终遵循。; filter: optional; 0, 1 | 0 |
lr | string | 结果文档语言限制,格式为 lang_fr;多个语言用 | 连接。; lr: optional; ^lang_[a-z]{2,3}(\|lang_[a-z]{2,3})*$ | lang_fr |
cr | string | 按结果文档所属国家限制,格式为 countryUS;多个国家用 | 连接,例如 countryUS|countryCA。; cr: optional; ^country[A-Za-z]{2}(\|country[A-Za-z]{2})*$ | countryFR |
start | integer | 结果偏移量; start: optional; min: 0 | 10 |
google_domain | string | Google 搜索域名,不含协议和 www.;独立于国家、语言和位置参数。; 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 | 两字母国家代码;提高对应国家结果的优先级,不是严格国家过滤。; gl: optional; ad, ae, af, ag, ai, al, am, an, ao, aq, ... 252 | ad |
hl | string | Google 界面语言,也可能影响跨语言查询的结果选择。; hl: optional; af, sq, am, ar, hy, az, bn, bg, my, ca, ... 76 | af |
location | string | 搜索起点; 来源; location: optional; minLength: 1 | Austin,Texas,United States |
coordinates | string | 坐标 JSON(latitude 和 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
radius | integer | 定位半径(米) (radius); radius: optional; min: 1; max: 1000 | 150 |
tbs | string | 时间范围 (tbs); tbs: optional | qdr:h |
tbm | string | 搜索分类代码:nws 新闻、vid 视频、isch 图片、shop 购物、lcl 本地、bks 图书。与 udm 互斥;新闻分类不支持 site:。; tbm: optional; nws, vid, isch, shop, lcl, bks | nws |
udm | integer | 搜索标签:1 本地、2 图片、6 论坛、7 视频、12 新闻、14 网页、28 购物、36 图书、50 AI Mode。与 tbm 互斥;新闻不支持 site:。; udm: optional; 1, 2, 6, 7, 12, 14, 28, 36, 50 | 2 |
校验规则
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
示例
curl --get "https://api.apihop.ai/v1/google-search/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Google Search: AI Mode 回答
GET https://api.apihop.ai/v1/google-search/ai-mode
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
location | string | 搜索起点; location: optional | - |
coordinates | string | 坐标 JSON(latitude 和 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Google 编码位置,原样传递;与 location、coordinates、radius 互斥。源站可能忽略不支持的位置。; uule: optional; maxLength: 4096 | - |
image_url | string | 公开 HTTPS 图片地址 (image_url); image_url: optional; maxLength: 2048 | - |
continuable | boolean | 返回可用于后续追问的会话令牌;Google 会话从首次请求起最多保留 15 分钟,源站可能提前失效。; continuable: optional | true |
subsequent_request_token | string | 本接口返回的会话令牌;同时提交新问题,并保持原语言、地区及位置。; subsequent_request_token: optional; maxLength: 24576 | - |
校验规则
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
示例
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: AI 摘要
GET https://api.apihop.ai/v1/google-search/ai-overview
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: optional; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
page_token | string | Google Search 返回的 AI Overview 令牌,需在一分钟内使用;保留原查询、地区和设备。; page_token: optional; maxLength: 24576 | - |
校验规则
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
示例
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: 轻量搜索
GET https://api.apihop.ai/v1/google-search/light
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | coffee |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
page | integer | 页码(从 1 开始); page: optional; min: 1; max: 1000 | 1 |
location | string | 搜索起点; location: optional | - |
safe | string | 结果筛选 (safe); safe: optional; active, off | active |
time_range | string | 时间范围 (time_range); time_range: optional | - |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
coordinates | string | 坐标 JSON(latitude 和 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Google 编码位置,原样传递;与 location、coordinates、radius 互斥。源站可能忽略不支持的位置。; uule: optional; maxLength: 4096 | - |
google_domain | string | Google 搜索域名,不含协议和 www.;独立于国家、语言和位置参数。; google_domain: optional | - |
lr | string | 结果文档语言限制,格式为 lang_fr;多个语言用 | 连接。; lr: optional; ^lang_[a-z]{2,3}(?:\|lang_[a-z]{2,3})*$ | - |
nfpr | integer | 1 按原搜索词查询,不自动纠正拼写;0 保留正常纠错行为。; nfpr: optional; 0, 1 | 0 |
filter | integer | Google 重复结果筛选:1 启用,0 关闭;搜索源不保证始终遵循。; filter: optional; 0, 1 | 0 |
start | integer | 结果偏移量; start: optional; min: 0; max: 1000 | 0 |
校验规则
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)
示例
curl --get "https://api.apihop.ai/v1/google-search/light" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Google Search: 搜索建议
GET https://api.apihop.ai/v1/google-search/autocomplete
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: REQUIRED; minLength: 1; maxLength: 100; UTF-8 bytes: 8192 | coffee |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
limit | integer | 结果上限; limit: optional; min: 1; max: 20 | 1 |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
client | string | Google 自动补全的原生客户端,默认 firefox。; client: optional; chrome, chrome-omni, gws-wiz, safari, firefox, psy-ab, toolbar, youtube, gws-wiz-local | chrome |
cp | integer | 自动补全查询文本中的光标位置。; cp: optional; min: 0; max: 8192 | 0 |
校验规则
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
示例
curl --get "https://api.apihop.ai/v1/google-search/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Google Search: 相关问题
GET https://api.apihop.ai/v1/google-search/related-questions
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: optional; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
next_page_token | string | 从上次响应复制的续查令牌;保持原账户、查询、设备及筛选条件。有效期通常为一小时,过期后重新开始。; next_page_token: optional; minLength: 1; maxLength: 24576 | - |
校验规则
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
示例
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: 论坛搜索
GET https://api.apihop.ai/v1/google-search/forums
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | best coffee grinder |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
page | integer | 页码(从 1 开始); page: optional; min: 1; max: 1000 | 1 |
location | string | 搜索起点; location: optional | - |
safe | string | 结果筛选 (safe); safe: optional; active, off | active |
time_range | string | 时间范围 (time_range); time_range: optional | - |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
coordinates | string | 坐标 JSON(latitude 和 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Google 编码位置,原样传递;与 location、coordinates、radius 互斥。源站可能忽略不支持的位置。; uule: optional; maxLength: 4096 | - |
nfpr | integer | 1 按原搜索词查询,不自动纠正拼写;0 保留正常纠错行为。; nfpr: optional; 0, 1 | 0 |
filter | integer | Google 重复结果筛选:1 启用,0 关闭;搜索源不保证始终遵循。; filter: optional; 0, 1 | 0 |
start | integer | 结果偏移量; start: optional; min: 0; max: 1000 | 0 |
tbs | string | 时间范围 (tbs); tbs: optional; maxLength: 512 | - |
period_unit | string | 时间范围 (period_unit); period_unit: optional; s, n, h, d, w, m, y | s |
period_value | integer | 时间范围 (period_value); period_value: optional; min: 1; max: 2147483647 | 1 |
start_date | string | 日期边界 (start_date); start_date: optional; ^[0-9]{8}$ | - |
end_date | string | 日期边界 (end_date); end_date: optional; ^[0-9]{8}$ | - |
校验规则
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)
示例
curl --get "https://api.apihop.ai/v1/google-search/forums" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=best coffee grinder"Google Search: 搜索广告
GET https://api.apihop.ai/v1/google-search/ads
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | car insurance |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
location | string | 搜索起点; location: optional | - |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
coordinates | string | 坐标 JSON(latitude 和 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
safe | string | 结果筛选 (safe); safe: optional; active, off | active |
nfpr | integer | 1 按原搜索词查询,不自动纠正拼写;0 保留正常纠错行为。; nfpr: optional; 0, 1 | 0 |
校验规则
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
示例
curl --get "https://api.apihop.ai/v1/google-search/ads" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=car insurance"Google Search: 来源信息
GET https://api.apihop.ai/v1/google-search/about-this-result
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 要查询来源信息的网站 URL,与 req_token 二选一。; query: optional; minLength: 1; UTF-8 bytes: 8192 | https://www.starbucks.com/ |
req_token | string | About This Result 返回的原生 req 令牌,作为 query 的替代参数。; req_token: optional; maxLength: 16384; ^[A-Za-z0-9_-]+={0,2}$ | - |
country | string | 国家筛选 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 语言; language: optional | - |
google_domain | string | Google 搜索域名,不含协议和 www.;独立于国家、语言和位置参数。; google_domain: optional | - |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
校验规则
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
示例
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: 广告素材搜索
GET https://api.apihop.ai/v1/google-search/ads-transparency
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 广告素材搜索文本,例如广告主网站域名;与 id、advertiser_id 三选一。; query: optional; minLength: 1; UTF-8 bytes: 8192 | nike.com |
country | string | 国家筛选 (country); country: optional; ad, ae, af, ag, ai, al, am, ao, aq, ar, ... 244; ^[A-Za-z]{2}$ | ad |
language | string | 语言; language: optional | - |
limit | integer | 结果上限; limit: optional; min: 1; max: 100 | 1 |
id | string | 广告主 AR 标识或逗号分隔列表;与 query、advertiser_id 三选一。; id: optional | - |
category | string | 广告素材格式选择器,与 creative_format 互斥;可选值见枚举。; category: optional; image, text, video | image |
next_page_token | string | 从上次响应复制的续查令牌;保持原账户、查询、设备及筛选条件。有效期通常为一小时,过期后重新开始。; next_page_token: optional; minLength: 1; maxLength: 24576 | - |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
advertiser_id | string | 广告主 AR 标识;素材检索可用逗号分隔最多 100 个,素材详情只接受单个广告主。; advertiser_id: optional; maxLength: 3499 | - |
platform | string | 广告投放平台筛选,可选平台见枚举。; platform: optional; PLAY, MAPS, SEARCH, SHOPPING, YOUTUBE | PLAY |
political_ads | boolean | 仅查询政治广告;启用时必须指定国家或非 anywhere 地区。; political_ads: optional | true |
get_advertiser | boolean | 同时获取广告主详情;启用时必须提供单个广告主 ID。; get_advertiser: optional | true |
region | string | 地区定位 (region); 示例: US=2840; region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245; maxLength: 8 | anywhere |
start_date | string | 日期边界 (start_date); start_date: optional; ^[0-9]{8}$ | - |
end_date | string | 日期边界 (end_date); end_date: optional; ^[0-9]{8}$ | - |
creative_format | string | 广告素材格式,与 category 互斥;可选值见枚举。; creative_format: optional; image, text, video | image |
校验规则
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
示例
curl --get "https://api.apihop.ai/v1/google-search/ads-transparency" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=nike.com"Google Search: 广告素材详情
GET https://api.apihop.ai/v1/google-search/ads-transparency-details
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
advertiser_id | string | 广告主 AR 标识;素材检索可用逗号分隔最多 100 个,素材详情只接受单个广告主。; advertiser_id: REQUIRED; maxLength: 34; ^AR[0-9]{1,32}$ | ${ADVERTISER_ID} |
creative_id | string | 广告素材 CR 标识,从素材详情 URL 或本轮素材检索响应获取。; creative_id: REQUIRED; maxLength: 34; ^CR[0-9]{1,32}$ | ${CREATIVE_ID} |
region | string | 地区定位 (region); region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245 | anywhere |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
校验规则
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
示例
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}"响应与错误
保留原生 JSON 响应和数字精度。下方仅为空成功结果示例,不是真实调用。HTTP 400 表示输入无效;401 需要认证;402 余额不足;403 不可用或无权限;405 方法不支持;429 限流;5xx 服务或上游故障。请保留 X-Request-Id 以便排查。
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}