# Yandex Videos API Documentation

Search Yandex video results. Each video has the position, title, link to the original page, source name and domain, duration in seconds and as text, view count text, publish date, thumbnail and embed URL. A page holds about 20 videos; ads are removed. Filter by duration: short is under 10 minutes, medium is 10 to 65 minutes, long is over 65 minutes. The filter runs on the parsed length, so a video that breaks it is never returned and a page can hold fewer videos. Filters such as hd, within and lr are not supported and answer 422. Each successful request costs 1 credit.

- **Documentation:** [https://scrappa.co/docs/yandex-api/yandex_videos](https://scrappa.co/docs/yandex-api/yandex_videos)
- **API group:** Yandex API
- **Endpoint:** `GET https://scrappa.co/api/yandex/videos`

## 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 |
| --- | --- | --- | --- |
| `text` | string | Yes | Search text. Alias: q. |
| `yandex_domain` | string | No | Yandex site to search. Web and videos: com (default), ru, kz, by or com.tr. Images: com (default), ru, kz or by. Each site has its own index. |
| `page` | integer | No | 1-based page number, 1 to 20. Defaults to 1. |
| `duration` | string | No | short (under 10 minutes), medium (10 to 65 minutes) or long (over 65 minutes). |

## Example response

```json
{
    "meta": {
        "billable": true,
        "duration_ms": 2400,
        "upstream_calls": 2
    },
    "success": true,
    "pagination": {
        "page": 1,
        "has_next_page": true
    },
    "video_results": [
        {
            "link": "https://www.youtube.com/watch?v=NsUWXo8M7UA",
            "title": "Funny cats compilation",
            "views": "33.1 mln",
            "source": "YouTube",
            "duration": "5:57",
            "position": 1,
            "embed_url": "https://www.youtube.com/embed/NsUWXo8M7UA",
            "published": "16 Dec 2019",
            "thumbnail": "https://avatars.mds.yandex.net/get-vthumb/1624469/8f7c7c5420d51b53782b7fbd0b7b2502/564x318_1",
            "published_at": "2019-12-16T10:00:00Z",
            "source_domain": "youtube.com",
            "duration_seconds": 357
        }
    ],
    "search_information": {
        "page": 1,
        "query": "cats",
        "yandex_domain": "com"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | Returned when a required parameter is missing, a value is out of range or a parameter is not supported. No credits are charged. |
| 503 | Service Unavailable | Returned when Yandex could not be read after several attempts. Failed requests are not charged. Try again. |
| 502 | Unexpected Response | Returned when Yandex answers with a page this API cannot read, or an image cannot be read. Failed requests are not charged. |

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