# Bing Maps API

<p><strong>Bing Maps API documentation</strong> for developers who need local business results from Bing Maps as JSON. Scrappa's <code>GET /api/bing/maps</code> endpoint returns places with address, phone, website, category, coordinates, rating and opening status.</p><h2>How to call the endpoint</h2><p>Send a <code>GET</code> request with a required <code>query</code> that includes the place, for example <code>pizza berlin</code>, and your API key in the <code>x-api-key</code> header. Limit the count with <code>limit</code> (1-10). The endpoint has no <code>page</code> parameter because Bing's local results do not page reliably. A query that is not a local search returns an empty list.</p><h2>Response fields</h2><p>Each place has <code>position</code>, <code>id</code>, <code>name</code>, <code>category</code>, <code>address</code>, <code>phone</code>, <code>website</code>, <code>latitude</code>, <code>longitude</code>, <code>rating</code>, <code>review_count</code>, <code>rating_source</code>, <code>open_status</code>, <code>open_hours</code> and <code>image</code>. Fields Bing does not show for a place are <code>null</code>.</p>

- **Documentation:** [https://scrappa.co/docs/bing-search-api/bing_maps](https://scrappa.co/docs/bing-search-api/bing_maps)
- **API group:** Bing Search API
- **Endpoint:** `GET https://scrappa.co/api/bing/maps`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | <p>Local business search with the city in the text.</p><p><strong>Example:</strong> <code>pizza berlin</code></p> |
| `q` | string | No | <p>Alias for <code>query</code>. Prefer <code>query</code> for new integrations.</p> |
| `limit` | string | No | <p>Maximum number of places.</p><p><strong>Range:</strong> 1-10</p><p><strong>Default:</strong> 10</p> |
| `mkt` | string | No | <p>Bing market, language and region together, for example <code>de-DE</code> or <code>en-GB</code>. Results, wording and dates follow the market.</p><p><strong>Default:</strong> <code>en-US</code></p> |
| `cc` | string | No | <p>Two-letter country code, for example <code>DE</code>. Scrappa sends it together with <code>mkt</code>.</p><p><strong>Default:</strong> the country of <code>mkt</code></p> |
| `setlang` | string | No | <p>Interface language, for example <code>de</code>. Scrappa sends it together with <code>mkt</code>.</p><p><strong>Default:</strong> the language of <code>mkt</code></p> |

## Example response

```json
{
    "data": [
        {
            "id": "ypid:YN47CA1C40C77636B6",
            "name": "Standard Serious Pizza",
            "image": "https://www.bing.com/th?id=OLC.4shfBA9pMSWG6g480x360&pid=Local",
            "phone": "030 48625614",
            "rating": 4,
            "address": "Templiner Stra\u00dfe 7 Berlin",
            "website": "https://www.standard-berlin.de/",
            "category": "Pizza restaurant",
            "latitude": 52.532867,
            "position": 1,
            "longitude": 13.408627,
            "open_hours": "Open until 12 AM tomorrow",
            "open_status": "Open",
            "review_count": 395,
            "rating_source": "Tripadvisor"
        }
    ],
    "limit": 10,
    "query": "pizza berlin",
    "market": {
        "cc": "US",
        "mkt": "en-US",
        "setlang": "en"
    },
    "source": "bing",
    "results_on_page": 1
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The query is missing, limit is outside 1-10, page was sent (not supported), or mkt, cc or setlang is malformed. |
| 503 | Bing Temporarily Unavailable | Bing did not return usable data after the bounded retry on a second route. The request is not billed. Retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
