> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapebadger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Video Search

> Search Bing Videos — title, thumbnail, duration, publisher, views and source platform per result.

Search Bing Videos. Each result carries the destination video URL, thumbnail,
duration, the host platform (e.g. YouTube), the publisher/channel, and views
and age as displayed.

**Credits:** 5

## Authorization

<ParamField header="X-API-Key" type="string" required>
  Your ScrapeBadger API key.
</ParamField>

## Query Parameters

<ParamField query="query" type="string" required>
  Search keywords, e.g. `espresso tutorial`.
</ParamField>

<ParamField query="market" type="string" default="en-US">
  Bing market code, e.g. `en-US`. See
  [`/markets`](/api-reference/endpoint/bing/list-markets).
</ParamField>

<ParamField query="count" type="integer" default="35">
  Results to return.
</ParamField>

<ParamField query="safe_search" type="string">
  One of `off`, `moderate`, `strict`.
</ParamField>

## Response

<ResponseField name="query" type="string">Echo of the requested query.</ResponseField>
<ResponseField name="market" type="string">The market the results were fetched for.</ResponseField>
<ResponseField name="result_count" type="integer">Videos returned.</ResponseField>

<ResponseField name="results" type="VideoResult[]">
  Video results.

  <Expandable title="VideoResult">
    <ResponseField name="position" type="integer">1-based rank.</ResponseField>

    <ResponseField name="title" type="string" />

    <ResponseField name="url" type="string">Destination video URL.</ResponseField>

    <ResponseField name="thumbnail_url" type="string" />

    <ResponseField name="duration" type="string">e.g. `00:54`.</ResponseField>
    <ResponseField name="source" type="string">Host platform, e.g. `YouTube`.</ResponseField>
    <ResponseField name="publisher" type="string">Channel / uploader.</ResponseField>
    <ResponseField name="views" type="string">View count as displayed, e.g. `4.9K`.</ResponseField>
    <ResponseField name="published" type="string">Age as displayed, e.g. `1 month ago`.</ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://scrapebadger.com/v1/bing/videos?query=espresso+tutorial&count=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(
    "https://scrapebadger.com/v1/bing/videos?" +
      new URLSearchParams({ query: "espresso tutorial", count: "10" }),
    { headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
  );
  const data = await res.json();
  ```

  ```python Python theme={null}
  import requests

  res = requests.get(
      "https://scrapebadger.com/v1/bing/videos",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={"query": "espresso tutorial", "count": 10},
  )
  data = res.json()
  ```
</CodeGroup>

```json Response theme={null}
{
  "query": "espresso tutorial",
  "market": "en-US",
  "result_count": 10,
  "results": [
    {
      "position": 1,
      "title": "How to Make Espresso — Beginner's Guide",
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "thumbnail_url": "https://tse2.mm.bing.net/th?id=OVP.abc123",
      "duration": "08:12",
      "source": "YouTube",
      "publisher": "James Hoffmann",
      "views": "4.9M",
      "published": "1 year ago"
    }
  ]
}
```

<Note>
  `views` and `published` are returned **as Bing displays them** (`4.9K`,
  `1 month ago`) — they are display strings, not numbers or timestamps.
</Note>
