API Hop 文档
Bing Search 接口参考
Bing: 网页搜索 · Copilot 回答.
并发上限
AI 与 Data 分别共享账户级并发槽位,默认 5 AI / 2 Data,订阅套餐可调整上限。接口单独配置仍受分类总上限约束。达到任一上限返回 HTTP 429;异步任务执行结束前占用槽位。
GET /v1/bing-search/search 默认并发上限: 2
GET /v1/bing-search/copilot 默认并发上限: 2
Bing: 网页搜索 · Copilot 回答.
认证与计费
默认每次成功请求 $0.0003(300 credits)。 使用 API Hop API Key。可用性取决于已启用网关和密钥权限。每次成功请求的价格以当前目录和账户显示为准,账户专属价格优先。成功的空结果也计费,失败请求释放预占额度。超时为 60 秒,不自动重试或翻页,结算失败不会重复调用上游。
http
Authorization: Bearer YOUR_API_KEY仅接受查询参数,不接受请求体。拒绝未知、重复、空值或无效参数。仅支持 JSON,不自动翻页或重试。标识和续查令牌应从最新响应复制,示例仅供说明。每次完成的查询分别计费,包括已确认的空结果或不可用结果。XOR 表示二选一,NOT 表示不能提供,=> 表示需要。
Bing: 网页搜索
GET https://api.apihop.ai/v1/bing-search/search
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: REQUIRED; minLength: 1; maxLength: 8192; UTF-8 bytes: 8192 | coffee |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | false |
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 |
sp | integer | Bing 原生拼写提示,仅支持 -1;属于未公开保证的源站参数,行为可能变化。; sp: optional; -1 | -1 |
first | integer | Bing 结果起始位置;大于 1 时必须携带前一响应的 next_page_token。; first: optional; min: 1 | 1 |
next_page_token | string | 从上次响应复制的续查令牌;保持原账户、查询、设备及筛选条件。有效期通常为一小时,过期后重新开始。; next_page_token: optional; minLength: 1; maxLength: 24576 | - |
cc | string | Bing 结果国家的两字母代码,与 mkt 互斥。; cc: optional; ar, au, at, be, br, ca, cl, dk, fi, fr, ... 36 | us |
location | string | 搜索起点; location: optional; minLength: 1; maxLength: 512 | - |
mkt | string | Bing 结果市场,例如 en-US;与 cc 互斥,翻页时保持相同值。; mkt: optional; ^[A-Za-z]{2,3}-[A-Za-z]{2}$ | en-US |
filters | string | 结果筛选 (filters); filters: optional; minLength: 1; maxLength: 4096 | - |
setlang | string | Bing 界面语言,使用该接口列出的支持值。; setlang: optional | en-US |
coordinates | string | 坐标 JSON(latitude 和 longitude) (coordinates); 精度: 100 m; coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
tbs | string | 时间范围 (tbs); qdr:<d/w/m/y>[1..10000]; tbs: optional | qdr:d |
校验规则
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)next_page_token: copy from a fresh response; keep original query, localization and filters; do not fabricate tokensNOT (cc AND mkt); NOT (filters AND tbs); first > 1 => next_page_token; hourly qdr:h time filters are unsupported
示例
bash
curl --get "https://api.apihop.ai/v1/bing-search/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Bing: Copilot 回答
GET https://api.apihop.ai/v1/bing-search/copilot
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | What is coffee? |
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 |
校验规则
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
示例
bash
curl --get "https://api.apihop.ai/v1/bing-search/copilot" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=What is coffee?"响应与错误
保留原生 JSON 响应和数字精度。下方仅为空成功结果示例,不是真实调用。HTTP 400 表示输入无效;401 需要认证;402 余额不足;403 不可用或无权限;405 方法不支持;429 限流;5xx 服务或上游故障。请保留 X-Request-Id 以便排查。
json
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}