Search YouTube Videos & Shorts by Keyword & Filters
GET/v1/youtube/search
Searches YouTube videos and Shorts without the 100-unit quota penalty of official YouTube Data API v3 search.list. Supports filtering by type (video or shorts), sort_by (relevance, date, views, rating), upload_date, and duration. Cost: 1 Credit per item returned (minimum 10 Credits per non-empty call).
Query Parameters
querystringrequiredSearch query string (also accepts
qorkeyword).typestringFilter by content type:
videoorshorts.sort_bystringSort order:
relevance,date,views, orrating.upload_datestringFilter by upload timeframe:
hour,today,week,month,year.limitintegerMaximum number of results to return (1–100).
cursorstringContinuation cursor for next page.
Example Request (cURL / Python / JavaScript)
curl "https://api.youtubeapi.io/v1/youtube/search?query=ai+agents" \
-H "x-api-key: yt_live_your_api_key"Live Response Preview
{
"code": 0,
"provider": "https://youtubeapi.io",
"status": "ok",
"msg": "success",
"data": {
"query": "youtube api",
"type": "video",
"sortBy": "relevance",
"nextCursor": null,
"continuation": null,
"hasMore": false,
"items": [
{
"kind": "video",
"videoId": "M7lc1UVf-VE",
"videoType": "video",
"url": "https://www.youtube.com/watch?v=M7lc1UVf-VE",
"title": "YouTube Developers Live: Embedded Web Player Customization",
"description": "Learn how to customize the YouTube IFrame Player API.",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"channelTitle": "Google for Developers",
"channelHandle": "googledevelopers",
"lengthSeconds": 1340,
"viewCount": 1945200,
"likeCount": 14500,
"commentCount": 980,
"publishDate": "2013-05-15T18:00:00.000Z",
"publishedText": "2013-05-15",
"category": "Science & Technology",
"isLiveContent": false,
"isShort": false,
"isFamilySafe": true,
"thumbnailUrl": "https://i.ytimg.com/vi/M7lc1UVf-VE/hqdefault.jpg",
"keywords": [
"youtube api",
"google developers"
],
"hasTranscript": true
}
]
},
"meta": {
"request_id": "3c4d5e6f-3333-4444-5555-666677778888",
"endpoint": "/v1/youtube/search",
"cached": true,
"source": "pg",
"items_count": 1,
"credits_charged": 10,
"has_more": false,
"next_cursor": null,
"latency_ms": 8
}
}Response Fields
Successful search results
| Field | Type | Sample / Notes |
|---|---|---|
code | integer | |
provider | string | |
status | string | |
msg | string | |
data | object | |
query | string | |
type | string | |
sortBy | string | |
nextCursor | stringnull | |
continuation | stringnull | |
hasMore | boolean | |
items | array of VideoData | |
kind | "video" | "short" | "live" | |
videoId | string | 11-character YouTube video ID. |
videoType | "video" | "short" | "live" | |
url | string | Canonical YouTube video or Shorts URL. |
title | string | Video title. |
description | string | Full video description including timestamps and links. |
channelId | string | Channel ID (UC...). |
channelTitle | string | Channel display name. |
channelHandle | stringnull | Channel handle without @ (e.g. mrbeast). |
lengthSeconds | integer | Video duration in seconds. |
viewCount | integer | Total view count. |
likeCount | integer | Total like count. |
commentCount | integer | Total comment count. |
publishDate | stringnull | ISO 8601 publish timestamp. |
publishedText | stringnull | Relative or formatted publish date text. |
category | stringnull | YouTube video category. |
isLiveContent | boolean | |
isShort | boolean | |
isFamilySafe | boolean | |
thumbnailUrl | stringnull | High-resolution thumbnail URL. |
keywords | array of string | |
hasTranscript | boolean | True if captions/transcripts are available. |
meta | ResponseMeta | |
request_id | string | Unique UUID for tracing and support. |
endpoint | string | Canonical endpoint path. |
cached | boolean | True if served from L1 Redis or L2 PostgreSQL 16 asset sink. |
source | string | Data source tier (redis, pg, upstream_primary, upstream_fallback, oembed). |
items_count | integer | Number of records returned in data. |
credits_charged | integer | Credits deducted for this request ($1 = 10,000 Credits). |
has_more | boolean | Whether additional pages are available via next_cursor. |
next_cursor | stringnull | Continuation cursor for the next page. |
latency_ms | integer | End-to-end gateway latency in milliseconds. |
Status Codes
- 200
- Successful search results