# Bing News API

> Search Bing News by keyword and get headlines with source, date, snippet and thumbnail, filtered by freshness and market.

Source: https://www.sandbase.ai/apis/bing/news
API reference: https://www.sandbase.ai/apis/bing/news#api

## Facts

- Provider: Bing
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/bing/news`
- Price: $0.01 per call
- Capabilities: api, bing, news, serp
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/bing/news` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `q` | string | yes |  |
| `mkt` | string | no |  |
| `cc` | string | no |  |
| `first` | string | no |  |
| `count` | string | no |  |
| `qft` | string | no |  |
| `safeSearch` | string | no |  |
| `device` | string | no |  |
| `json_restrictor` | string | no |  |

## FAQ

### How do I use the Bing News API?

Send a POST request to https://api.sandbase.ai/v1/api/bing/news with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Bing News API cost?

$0.01 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the Bing News API accept?

Required: q (string). Optional: mkt (string), cc (string), first (string), count (string), qft (string) and safeSearch (string) and 2 more. The Parameters table and the Playground on this page list every field.

### What does the Bing News API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Bing developer account or API key?

No. Bing News runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Bing API access separately.

## README

### Bing News

Search Bing News by keyword and get headlines with source, date, snippet and thumbnail, filtered by freshness and market.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/bing/news" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "artificial intelligence"}'
```

The result is returned in `outputs[0].data` as structured JSON.

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `q` | string | Yes | Parameter defines the search query. You can use anything that you would use in a regular Bing search. (e.g., `'query'`, `NOT`, `OR`, `site:`, `filetype:`, `near:`, `ip:`, `loc:`, `feed:` etc.). |
| `mkt` | string | No | The market where the results come from (e.g. `en-US`). Typically, `mkt` is the country where the user is making the request from. However, it could be a different country if the user is not located in a country where Bing delivers results.  |
| `cc` | string | No | Parameter defines the country to search from. It follows the 2-character ISO_3166-1 format. (e.g., `us` for United States, `de` for Germany, `gb` for United Kingdom, etc.). This parameter and the `mkt` query parameter are mutually exclusive |
| `first` | string | No | Parameter controls the offset of the organic results. This parameter defaults to `1`. (e.g., `first=10` will move the 10th organic result to the first position). |
| `count` | string | No | Parameter controls the number of results per page. This parameter is only a suggestion and might not reflect actual results returned. |
| `qft` | string | No | Parameter defines results sorted by date. If the parameter is not set, it will default to the "Best match" sorting, otherwise, if set to: e.g. `interval="4"`, it will show results from the past hour. Other options are: `interval="7"`: Past  |
| `safeSearch` | string | No | Parameter defines the level of filtering for adult content. It can be set to: `Off` to return webpages with adult text, images, or videos. `Moderate` to return webpages with adult text, but not adult images or videos. `Strict` to not return |
| `device` | string | No | Parameter defines the device to use to get the results. It can be set to `desktop` (default) to use a regular browser, `tablet` to use a tablet browser (currently using iPads), or `mobile` to use a mobile browser. |
| `json_restrictor` | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |

#### Pricing

$0.010 per successful call. Failed calls are not charged.
