Bing API endpoint
Returns Bing autosuggest query completions for a query prefix. Locale defaults to country=us and lang=en-us. Suggestions are fetched from public Bing suggest endpoints and trimmed to the requested count. `rich=true` adds entity cards (name, description, image) where Bing shows them.
/bing/suggestq: required. Search query prefix. Example: openai.count: optional. Suggestions to return; defaults to 10, clamped to 1..12.country: optional. Two-letter country code; defaults to us.lang: optional. Bing UI language; defaults to en-us.rich: optional boolean. When true, suggestions that Bing renders as an entity card also carry an entity object with name, description, and image_url. Defaults to false.entity is omitted for plain phrase suggestions and for every row when rich is not true. Rich mode reads Bing's HTML suggestion list instead of the flat JSON list, so its ordering can differ from the default mode.503 is returned when both public suggest endpoints fail or return unusable payloads.| Field | Filled in, of 12 checked | Values in the sample |
|---|---|---|
| position | 12 | 1 to 12, median 6 |
| query | 12 | “openai api” and 11 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Search query prefix | openai | |
| count | integer | No | 10 | Suggestions to return; defaults to 10, clamped to 1..12 Minimum: 1. Maximum: 12. | 10 |
| country | string | No | us | Two-letter country code; defaults to us | us |
| lang | string | No | en-us | Bing UI language; defaults to en-us | en-us |
| rich | boolean | No | false | Add entity name, description, and image to suggestions Bing resolves to a known entity; defaults to false | false |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/bing/suggest?q=openai&count=10&country=us&lang=en&rich=true" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "openai",
"suggestions": [
{
"position": 1,
"query": "openai api key"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/bing.suggestResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | bing.SuggestResponse | No | ||||
| data.query | string | No | openai | Query prefix the suggestions were requested for. | ||
| data.suggestions | array | No | Search suggestions Bing returned, in order. | |||
| data.suggestions[].entity | object | No | Entity Bing matched to the suggestion. Only set when the request used `rich=true` and Bing recognises an entity. | |||
| data.suggestions[].entity.description | string | No | American AI company | Short description of the entity. | ||
| data.suggestions[].entity.image_url | string | No | https://ts3.tc.mm.bing.net/th/id/OSK.example?w=120&h=120 | URL of the entity's image. | ||
| data.suggestions[].entity.name | string | No | OpenAI | Name of the entity. | ||
| data.suggestions[].position | integer | No | 1 | Rank of the suggestion in the list, starting at 1. | ||
| data.suggestions[].query | string | No | openai api key | Suggested search query. | ||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid query parameters | #/definitions/app.Response |
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
| 503 | Bing upstream request failed | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/bing/suggest?q=openai&count=10&country=us&lang=en&rich=true" \
-H "x-api-key: $CRAWLORA_API_KEY"