Skip to content
youtubeapi.io
All endpoints

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

  • querystringrequired

    Search query string (also accepts q or keyword).

  • typestring

    Filter by content type: video or shorts.

  • sort_bystring

    Sort order: relevance, date, views, or rating.

  • upload_datestring

    Filter by upload timeframe: hour, today, week, month, year.

  • limitinteger

    Maximum number of results to return (1–100).

  • cursorstring

    Continuation 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

FieldTypeSample / Notes
codeinteger
providerstring
statusstring
msgstring
dataobject
querystring
typestring
sortBystring
nextCursorstringnull
continuationstringnull
hasMoreboolean
itemsarray of VideoData
kind"video" | "short" | "live"
videoIdstring11-character YouTube video ID.
videoType"video" | "short" | "live"
urlstringCanonical YouTube video or Shorts URL.
titlestringVideo title.
descriptionstringFull video description including timestamps and links.
channelIdstringChannel ID (UC...).
channelTitlestringChannel display name.
channelHandlestringnullChannel handle without @ (e.g. mrbeast).
lengthSecondsintegerVideo duration in seconds.
viewCountintegerTotal view count.
likeCountintegerTotal like count.
commentCountintegerTotal comment count.
publishDatestringnullISO 8601 publish timestamp.
publishedTextstringnullRelative or formatted publish date text.
categorystringnullYouTube video category.
isLiveContentboolean
isShortboolean
isFamilySafeboolean
thumbnailUrlstringnullHigh-resolution thumbnail URL.
keywordsarray of string
hasTranscriptbooleanTrue if captions/transcripts are available.
metaResponseMeta
request_idstringUnique UUID for tracing and support.
endpointstringCanonical endpoint path.
cachedbooleanTrue if served from L1 Redis or L2 PostgreSQL 16 asset sink.
sourcestringData source tier (redis, pg, upstream_primary, upstream_fallback, oembed).
items_countintegerNumber of records returned in data.
credits_chargedintegerCredits deducted for this request ($1 = 10,000 Credits).
has_morebooleanWhether additional pages are available via next_cursor.
next_cursorstringnullContinuation cursor for the next page.
latency_msintegerEnd-to-end gateway latency in milliseconds.

Status Codes

200
Successful search results