📺

YouTube Search

Search YouTube for videos, channels, and playlists

GET 1 credit /v1/youtube/search
curl "https://youtube.toolkitapi.io/v1/youtube/search?query=python%20tutorial&limit=5"
import httpx

resp = httpx.get(
    "https://youtube.toolkitapi.io/v1/youtube/search?query=python%20tutorial&limit=5",
)
print(resp.json())
const resp = await fetch("https://youtube.toolkitapi.io/v1/youtube/search?query=python%20tutorial&limit=5", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "query": "python tutorial",
  "results": [
    {
      "id": "rfscVS0vtbw",
      "type": "video",
      "title": "Learn Python - Full Course for Beginners [Tutorial]",
      "url": "https://www.youtube.com/watch?v=rfscVS0vtbw",
      "thumbnailUrl": "https://i.ytimg.com/vi/rfscVS0vtbw/hqdefault.jpg",
      "description": "This course will give you a full introduction into all of the core concepts in python.",
      "channelName": "freeCodeCamp.org",
      "publishedAt": "2018-07-11T18:00:42Z",
      "viewCount": 45000000,
      "duration": 16194
    },
    {
      "id": "kqtD5dpn9C8",
      "type": "video",
      "title": "Python for Beginners – Full Course [Programming Tutorial]",
      "url": "https://www.youtube.com/watch?v=kqtD5dpn9C8",
      "thumbnailUrl": "https://i.ytimg.com/vi/kqtD5dpn9C8/hqdefault.jpg",
      "description": "Learn Python programming from scratch in this full course for beginners.",
      "channelName": "freeCodeCamp.org",
      "publishedAt": "2022-08-10T15:00:00Z",
      "viewCount": 12000000,
      "duration": 28800
    }
  ],
  "nextPageToken": null
}

Try It Live

Live Demo

Description

Search YouTube for videos, channels, and playlists

How to Use

1

1. Pass your search terms in the `query` parameter. Standard YouTube search syntax is supported.

2

2. Optionally set `limit` to control how many results are returned (1–50, default 20).

3

3. Check the `type` field on each result to distinguish between videos, channels, and playlists.

4

4. Use the returned `id` values to make follow-up requests to the video, channel, or playlist endpoints for full details.

About This Tool

The YouTube Search endpoint lets you search YouTube for videos, channels, and playlists using text queries. It returns results with metadata including titles, thumbnails, view counts, and duration, making it suitable for building search interfaces or content discovery pipelines.

Use this when you need to find YouTube content programmatically — for research, content curation, competitive analysis, or automated discovery workflows. The results mirror what you'd see on YouTube's search page.

Results can include videos, channels, and playlists in a single response, each identified by a `type` field.

Why Use This Tool

Frequently Asked Questions

Can I filter by content type (e.g. only videos)?
The current endpoint returns mixed results including videos, channels, and playlists. Filter client-side using the `type` field on each result.
How are results ranked?
Results follow YouTube's default relevance ranking for the given query. The API does not support custom sort options at this time.
Is pagination supported?
The response includes a `nextPageToken` field for pagination. If it's null, there are no more results. Pass the token as a query parameter to fetch the next page.
What's the maximum number of results?
You can request up to 50 results per page using the `limit` parameter. The default is 20.

Start using YouTube Search now

Get your free API key and make your first request in under a minute.