# Bing Shopping API

#### SERP API Bing Query Parameters

including output options for parameters such as localization, geographical location, and pagination.

<details>

<summary><strong><code>q</code> ,</strong>Search Query<strong>(Required)</strong></summary>

Define the search query for data crawling (default value: `q=pizza`). Any keywords in any language are supported.

**Example Request:**

Example with `q`:<mark style="color:blue;">pizza</mark> parameter

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=bing_shopping" \
 -d "q=pizza" \
 -d "json=1"
```

</details>

## Localization

<details>

<summary><strong><code>cc</code> ,</strong>Country<strong>(Optional)</strong></summary>

This parameter defines that during crawling, you can specify that search results be displayed according to the habits of users in a specific country/region. It is a two-letter country/region code (for example: `us`, `ru`, `uk`).

**Examples:**

* `cc=us` → United States (English)
* `cc=fr` → France (French)

**Example Request:**

Example results for `q` : <mark style="color:blue;">pizza</mark>,`cc`:<mark style="color:blue;">jp</mark>

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=bing_shopping" \
 -d "q=pizza" \
 -d "json=1" \
 -d "cc=jp"
```

</details>

## Geographical Location

<details>

<summary><strong><code>mkt</code> ,</strong>Language<strong>(Optional)</strong></summary>

This parameter defines the interface display language of search results during crawling. It adopts the format of <"language code">-<"country/region code">.&#x20;

For example, `en-US`. This string is case-insensitive.

**Examples:**

* `mkt=en-US` → English (United States)
* `mkt=zh-CN` → Simplified Chinese

**Example Request:**

Example results for `q` : <mark style="color:blue;">pizza</mark>,`mkt`:<mark style="color:blue;">fr-fr</mark>

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=bing_shopping" \
 -d "q=pizza" \
 -d "json=1" \
 -d "mkt=fr-fr"
```

</details>

## Pagination

<details>

<summary><code>efirst</code> <strong>,</strong>Result offset<strong>(Optional)</strong></summary>

Sets the result offset (default: `1`). For example, `first=10` skips the first 9 results.

This parameter is used to control the offset of Organic Search results, with a default value of 1. For example, when `first=10`, the system will promote the 10th organic search result to the top position.

**Example Request:**

Example results for `q` : <mark style="color:blue;">pizza</mark>,`efirst`:<mark style="color:blue;">10</mark>

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=bing_shopping" \
 -d "q=pizza" \
 -d "json=1" \
 -d "efirst=10"
```

</details>

## Advanced Filters

<details>

<summary><code>filters</code> <strong>,</strong>Additional Filtering<strong>(Optional)</strong></summary>

Parameters allow for more complex filtering options, such as filtering by date range ex1:"ez5\_18169\_18230" or using specific display filters

(e.g. ufn:"Wunderman+Thompson"+sid:"5bede9a2-1bda-9887-e6eb-30b1b8b6b513"+catguid:"5bede9a2-1bda-9887-e6eb-30b1b8b6b513\_cfb02057"+segment:"generic.carousel"+entitysegment:"Organization").

You can use Bing search and copy filters query parameters to construct precise values.

**Example Request:**

Example results for `q` : <mark style="color:blue;">pizza</mark>,`filters`:ex1:"ez5\_18169\_18230"

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=bing_shopping" \
 -d "q=pizza" \
 -d "json=1" \
 -d "filters=ex1:"ez5_18169_18230""
```

</details>

**For assistance, contact <support@thordata.com>.**
