Bing Autocomplete API
根据查询词和搜索市场获取结构化 Bing 搜索建议。
接口地址
GET https://api.goanyapi.com/api/v1/bing-autocomplete当前配置下,每次成功请求消耗 3 积分。
鉴权方式
Authorization: Bearer YOUR_API_KEY请求参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
q | string | 是 | — | 查询词,最多 200 个字符;保留具有实际意义的开头和末尾空格 |
mkt | string | 否 | en-US | 搜索市场,使用语言-国家格式,例如 en-US 或 zh-CN |
mkt 会影响建议的语言、地区拼写、热门程度和排序。该参数可以省略,但接口始终使用稳定的 en-US 默认值。
请求示例
下面的查询在 image 后包含一个经过编码的末尾空格:
GET /api/v1/bing-autocomplete?q=ai%20image%20&mkt=en-US
Authorization: Bearer YOUR_API_KEY响应示例
{
"code": "ok",
"message": "ok",
"data": {
"endpoint": "bing-autocomplete",
"remainingCredits": 999,
"query": {
"q": "ai image ",
"mkt": "en-US"
},
"suggestions": [
"image creator",
"ai image editor",
"ai image generator free",
"ai image detector",
"ai image upscaler",
"ai image enhancer",
"ai image checker",
"ai image to video",
"ai image creation",
"ai image search",
"ai image to image"
]
}
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
data.endpoint | string | 固定值:bing-autocomplete |
data.costCredits | number | 本次请求消耗的积分 |
data.remainingCredits | number | 扣费后的剩余积分 |
data.query.q | string | 实际发送的查询词,包括具有实际意义的空格 |
data.query.mkt | string | 实际使用的搜索市场 |
data.suggestions | string[] | 按返回顺序排列的搜索建议 |
建议字符串保持原值返回。接口不会在建议前拼接 q,也不会重新排序或组合查询词与建议。
参数校验与计费
-
q必须包含非空白内容,最多允许 200 个字符。 -
传入的
mkt必须使用en-US这样的语言-国家大小写格式。 当前请求价格以本页显示的 API 配置为准。 -
空结果、参数错误、鉴权失败、请求失败和无效响应消耗 0 积分。