---
title: "YouTube API: Search | Perceptlayer"
description: "Search from YouTube as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/youtube/search
---

[APIs](https://perceptlayer.com/apis) / [YouTube](https://perceptlayer.com/apis/youtube) / Search

# YouTube: Search

Search from YouTube as JSON. 1 credit per successful call.

GET `/v1/youtube/search` Needs terms

Note 

This endpoint needs the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints), which you can accept in your dashboard.

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | Optional | Any |
| `limit` | integer | Optional | Any |
| `page` | integer | Optional | Any |
| `continuation` | string | Optional | Any |
| `hl` | string | Optional | Up to 2 characters |
| `gl` | string | Optional | Up to 2 characters |
| `type` | string | Optional | video, channel, playlist, movie, all |
| `order` | string | Optional | date, rating, relevance, viewCount |
| `videoDuration` | string | Optional | short, medium, long |
| `publishedAfter` | string | Optional | Any |
| `publishedBefore` | string | Optional | Any |
| `safeSearch` | string | Optional | moderate, none, strict |

## Example request

cURL shell 

```
curl "https://api.perceptlayer.com/v1/youtube/search?query=programming+tutorial" \
  -H "X-API-Key: $API_KEY"
```

[Run this endpoint in the playground](https://perceptlayer.com/apis/youtube?try=search#playground) with your own parameters. 1 credit per successful call; failed calls are free.
