# Bing Search API

<p><strong>Bing Search API documentation</strong> for developers who need Bing web results in JSON. Scrappa's <code>GET /api/bing/search</code> endpoint returns organic Bing results with positions, titles, descriptions, URLs, domains, related searches, and question suggestions.</p><h2>Bing Search API for web results</h2><p>Use this endpoint for SERP monitoring, alternative search coverage, market research, citation discovery, and products that need Microsoft Bing result data without maintaining their own proxy-backed scraper.</p><h2>How to call the Bing Search API</h2><p>Send a <code>GET</code> request to <code>/api/bing/search</code> with a required <code>query</code> parameter and your Scrappa API key in the <code>x-api-key</code> header. The <code>q</code> alias is also accepted for compatibility, but new integrations should use <code>query</code>. Optional parameters include <code>page</code>, <code>num</code>, <code>site</code>, <code>filetype</code>, <code>safe</code>, <code>hl</code>, and <code>include_html</code>.</p><h2>Response fields</h2><p>The response includes <code>data</code> results with <code>position</code>, <code>title</code>, <code>description</code>, <code>url</code>, and <code>domain</code>, plus <code>people_also_search_for</code>, <code>people_also_ask</code>, <code>results_on_page</code>, and <code>source</code>. <code>results_on_page</code> describes the current response page.</p>

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

## 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>The Bing search query string. Use this parameter for new integrations.</p><p><strong>Example:</strong> <code>web scraping tools</code></p> |
| `q` | string | No | <p>Alias for <code>query</code>. Prefer <code>query</code> for new integrations.</p> |
| `page` | string | No | <p>Result page number.</p><p><strong>Range:</strong> 1-50</p><p><strong>Default:</strong> 1</p> |
| `num` | string | No | <p>Number of results requested from Bing.</p><p><strong>Range:</strong> 1-50</p><p><strong>Default:</strong> 10</p> |
| `site` | string | No | <p>Restrict results to a domain by adding a Bing <code>site:</code> operator.</p><p><strong>Example:</strong> <code>example.com</code></p> |
| `filetype` | string | No | <p>Restrict results to a file extension by adding a Bing <code>filetype:</code> operator.</p><p><strong>Example:</strong> <code>pdf</code></p> |
| `safe` | string | No | <p>Safe search setting.</p><p><strong>Values:</strong> <code>off</code>, <code>moderate</code>, <code>strict</code></p><p><strong>Default:</strong> <code>moderate</code></p> |
| `hl` | string | No | <p>Language/locale hint passed to Bing as <code>setlang</code>.</p><p><strong>Default:</strong> <code>en-US</code></p> |
| `include_html` | string | No | <p>Include the raw Bing HTML in the JSON response for diagnostics.</p><p><strong>Default:</strong> <code>false</code></p> |

## Example response

```json
{
    "data": [
        {
            "url": "https://example.com/web-scraping-tools",
            "title": "Web Scraping Tools - Example Guide",
            "domain": "example.com",
            "position": 1,
            "description": "A practical overview of web scraping tools, proxy routing, parsers, and data extraction workflows."
        },
        {
            "url": "https://example.org/data-extraction-platforms",
            "title": "Best Data Extraction Platforms",
            "domain": "example.org",
            "position": 2,
            "description": "Compare APIs and scraping platforms for search, ecommerce, jobs, reviews, and business data."
        }
    ],
    "source": "bing",
    "twitter_card": null,
    "knowledge_graph": null,
    "people_also_ask": [
        {
            "question": "What are web scraping tools used for?"
        }
    ],
    "results_on_page": 2,
    "see_results_about": null,
    "people_also_search_for": [
        {
            "query": "web scraping software"
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The query is missing, or a pagination, locale, safe-search, site, filetype, or include_html parameter failed validation. |
| 503 | Bing Temporarily Unavailable | The approved mobile-proxy pool was unavailable, Bing returned a blocking HTTP response, the transport failed, or the returned HTML did not contain valid Bing result markers after the bounded proxy rotation. The request is not billed. |

## 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)
