# youtube search api: json results, paged - fastsaver api

youtube search api. GET /youtube/search returns paged json results: the video id, title, duration and thumbnails of each video. 2 credits a call.

> source: https://api.fastsaver.io/docs/youtube/search

`GET https://api.fastsaver.io/v1/youtube/search` - search youtube

paged search results with thumbnails and durations.

Credits: 2 credits. A failed call costs 0.1 credit.
Every request carries `X-Api-Key`.

## Parameters

- `query` (string, required) - what to search for (example: `the weeknd`)
- `page` (integer, required) - 1-based page number (example: `1`)

## Request

```http
GET https://api.fastsaver.io/v1/youtube/search?query=the%20weeknd&page=1
```

## Response

```json
{
  "ok": true,
  "page": 1,
  "results": [
    {
      "video_id": "HgLfYfJtc8M",
      "title": "The Weeknd - One Of The Girls",
      "duration": "4:05",
      "thumbnail": "https://i.ytimg.com/vi/HgLfYfJtc8M/mqdefault.jpg",
      "thumbnail_max": "https://i.ytimg.com/vi/HgLfYfJtc8M/maxresdefault.jpg"
    },
    {
      "video_id": "p8_ugAjWI5I",
      "title": "The Weeknd - São Paulo",
      "duration": "5:02",
      "thumbnail": "https://i.ytimg.com/vi/p8_ugAjWI5I/mqdefault.jpg",
      "thumbnail_max": "https://i.ytimg.com/vi/p8_ugAjWI5I/maxresdefault.jpg"
    }
  ]
}
```
