YouTube Transcript API Search API
Search across YouTube.
Search across YouTube.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/youtubetranscriptapi-com:youtubetranscriptapi-com-search-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: YouTubeTranscriptAPI REST Search API
version: 2.0.0
summary: Fetch clean YouTube transcripts without 429 errors. Search, browse channels, and extract playlists through one REST API.
description: 'Fetch YouTube transcripts, search YouTube, and list channel and playlist videos as JSON.
**Authentication.** Send an API key on every request: `Authorization: Bearer tk_live_…`. Create keys at https://youtubetranscriptapi.com/dashboard/keys.
**Credits.** Each operation''s price is in its description and in `x-credit-cost`. Only successful (200) responses are charged; errors and rate-limited requests never are. Free operations still need a balance of at least 1 credit. Without enough credits you get 402 with a link to billing. Plans: https://youtubetranscriptapi.com/pricing.
**Errors.** Error bodies are `{ "detail": "…", "code": "…" }`. On 402 (`insufficient_credits`) `detail` is an object with the shortfall, a billing link and the plans; accounts without a plan also get `checkout_url`, a checkout that opens without signing in.
**Balance.** Successful responses carry X-Credits-Charged and X-Credits-Remaining. GET /account/whoami returns the plan and balance for free.
**Rate limits.** 300 requests per minute per API key by default, on a sliding one-minute window. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; 429, 408 and 503 add Retry-After.
**Caching.** X-Cache-Status is HIT when a stored result was served and MISS otherwise. Stored responses cost the same as fresh ones.'
termsOfService: https://youtubetranscriptapi.com/legal/terms
contact:
name: YouTubeTranscriptAPI
url: https://youtubetranscriptapi.com/contact
email: hello@youtubetranscriptapi.com
servers:
- url: https://youtubetranscriptapi.com/api/v2
security:
- bearerAuth: []
tags:
- name: Search
description: Search across YouTube.
externalDocs:
url: https://youtubetranscriptapi.com/docs/api/search
paths:
/youtube/search:
get:
operationId: searchYouTube
summary: Search YouTube
description: Search YouTube for videos or channels with rich metadata. Up to 50 results per call. Costs 4 credits per successful (200) response; errors are never charged.
tags:
- Search
externalDocs:
url: https://youtubetranscriptapi.com/docs/api/search
x-credit-cost: 4
parameters:
- name: q
in: query
required: true
description: Search query, 1–200 characters after trimming.
schema:
type: string
minLength: 1
maxLength: 200
- name: type
in: query
required: false
description: Search for videos or for channels.
schema:
type: string
enum:
- video
- channel
default: video
- name: limit
in: query
required: false
description: Maximum number of results.
schema:
type: integer
minimum: 1
maximum: 50
default: 20
responses:
'200':
description: 'Search results: all videos for type=video, all channels for type=channel.'
headers:
X-Cache-Status:
$ref: '#/components/headers/XCacheStatus'
X-Credits-Charged:
$ref: '#/components/headers/XCreditsCharged'
X-Credits-Remaining:
$ref: '#/components/headers/XCreditsRemaining'
X-RateLimit-Limit:
$ref: '#/components/headers/XRateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
X-Request-Id:
$ref: '#/components/headers/XRequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResults'
examples:
video:
summary: type=video
value:
results:
- type: video
videoId: dQw4w9WgXcQ
title: Rick Astley - Never Gonna Give You Up
channelId: UCuAXFkgsw1L7xaCfnd5JJOw
channelTitle: Rick Astley
channelHandle: '@RickAstley'
channelVerified: null
lengthText: '3:33'
viewCountText: 1.5B views
publishedTimeText: 14 years ago
hasCaptions: null
thumbnails:
- url: https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg
width: 120
height: 90
- url: https://i.ytimg.com/vi/dQw4w9WgXcQ/mqdefault.jpg
width: 320
height: 180
- url: https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg
width: 480
height: 360
result_count: 1
channel:
summary: type=channel
value:
results:
- type: channel
channelId: UCAuUUnT6oDeKwE6v1NGQxug
title: TED
handle: '@TED'
url: https://www.youtube.com/@TED
description: Official channel...
subscriberCount: 26M subscribers
verified: true
rssUrl: https://www.youtube.com/feeds/videos.xml?channel_id=UCAuUUnT6oDeKwE6v1NGQxug
thumbnails: []
result_count: 1
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'408':
$ref: '#/components/responses/Timeout'
'422':
description: A parameter is missing or invalid (`validation_error`). Not charged.
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/XRateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
X-Request-Id:
$ref: '#/components/headers/XRequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
missing_q:
value:
detail: 'Missing required parameter: q'
code: validation_error
invalid_type:
value:
detail: type must be either video or channel
code: validation_error
invalid_limit:
value:
detail: limit must be an integer between 1 and 50
code: validation_error
'429':
$ref: '#/components/responses/RateLimited'
'503':
$ref: '#/components/responses/Unavailable'
components:
responses:
PaymentRequired:
description: Not enough credits for this call. detail says why and links to billing. Not charged.
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/XRateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
X-Request-Id:
$ref: '#/components/headers/XRequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequiredError'
examples:
insufficient_credits:
value:
detail:
message: This call needs 20 credits; you have 5. Choose a plan to keep going.
reason: insufficient_credits
required: 20
available: 5
action_label: Choose a plan
action_url: https://youtubetranscriptapi.com/dashboard/billing?from=402&plan=annual
plans:
monthly:
price_usd: 3
interval: month
credits_per_interval: 1000
topup_usd_per_1k: 2.5
url: https://youtubetranscriptapi.com/dashboard/billing?plan=monthly
annual:
price_usd: 30
interval: year
credits_per_interval: 15000
topup_usd_per_1k: 2
refund: Refundable within 14 days if under 1,000 credits are used
url: https://youtubetranscriptapi.com/dashboard/billing?plan=annual
code: insufficient_credits
free_credits_used:
summary: Free account, with the no-login checkout link
value:
detail:
message: 'Your 100 free credits are used up. Annual: 15,000 credits for $30 ($2.5/mo). Monthly: 1,000 credits/mo for $3.'
reason: insufficient_credits
required: 1
available: 0
action_label: Choose a plan
action_url: https://youtubetranscriptapi.com/dashboard/billing?from=402&plan=annual
checkout_url: https://youtubetranscriptapi.com/u/eyJ1c2VyX2lkIjoi4oCmIn0.c2lnbmF0dXJl
checkout_plan: annual
plans:
monthly:
price_usd: 3
interval: month
credits_per_interval: 1000
topup_usd_per_1k: 2.5
url: https://youtubetranscriptapi.com/dashboard/billing?plan=monthly
annual:
price_usd: 30
interval: year
credits_per_interval: 15000
topup_usd_per_1k: 2
refund: Refundable within 14 days if under 1,000 credits are used
url: https://youtubetranscriptapi.com/dashboard/billing?plan=annual
code: insufficient_credits
Unauthorized:
description: The bearer token is missing (`missing_auth`) or invalid or revoked (`invalid_auth`).
headers:
WWW-Authenticate:
$ref: '#/components/headers/WWWAuthenticate'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
missing_auth:
value:
detail: Missing bearer token
code: missing_auth
invalid_auth:
value:
detail: Invalid or revoked API key
code: invalid_auth
Timeout:
description: The upstream fetch timed out (`upstream_timeout`). Safe to retry after Retry-After seconds. Not charged.
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/XRateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
X-Request-Id:
$ref: '#/components/headers/XRequestId'
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
upstream_timeout:
value:
detail: Upstream timed out; retry in a few seconds
code: upstream_timeout
Forbidden:
description: API access for this account is paused while a payment dispute is reviewed (`account_frozen`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
account_frozen:
value:
detail: API access for this account is paused while a payment dispute is reviewed. Contact support.
code: account_frozen
Unavailable:
description: 'Temporary failure: `upstream_error`, `internal` (the account check failed) or `config_missing`. Safe to retry after Retry-After seconds. Not charged.'
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
X-Request-Id:
$ref: '#/components/headers/XRequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
upstream_error:
value:
detail: Upstream unavailable; retry in a few seconds
code: upstream_error
internal:
value:
detail: Could not check your account right now; retry in a few seconds
code: internal
RateLimited:
description: Rate limit exceeded (`rate_limited`). Wait Retry-After seconds, until the current one-minute window ends. Not charged.
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/XRateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
X-Request-Id:
$ref: '#/components/headers/XRequestId'
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
rate_limited:
value:
detail: Rate limit exceeded
code: rate_limited
headers:
XCreditsCharged:
description: Credits this call cost. 0 for free operations. Sent on 200 responses only; errors are never charged.
schema:
type: integer
minimum: 0
XCacheStatus:
description: HIT when a stored result was served (transcripts, resolved channel IDs), otherwise MISS. Same price either way.
schema:
type: string
enum:
- HIT
- MISS
RetryAfter:
description: 'Seconds to wait before retrying: until the window ends on 429, 3 on 408 and 503.'
schema:
type: integer
minimum: 1
XCreditsRemaining:
description: Spendable credits left after this call. Sent on 200 responses; left out rather than estimated when the balance can't be read.
schema:
type: integer
minimum: 0
XRateLimitRemaining:
description: Requests left in the current sliding one-minute window.
schema:
type: integer
minimum: 0
XRequestId:
description: Request ID for support. Echoes the X-Request-Id you sent, otherwise generated.
schema:
type: string
XRateLimitReset:
description: Unix time, in seconds, when the current minute window ends.
schema:
type: integer
WWWAuthenticate:
description: Always Bearer.
schema:
type: string
enum:
- Bearer
XRateLimitLimit:
description: Requests allowed per minute for this API key.
schema:
type: integer
schemas:
Error:
type: object
required:
- detail
- code
properties:
detail:
type: string
description: Human-readable message.
code:
type: string
description: 'Machine-readable code: validation_error, continuation_unavailable, missing_auth, invalid_auth, account_frozen, transcript_not_found, channel_not_found, playlist_not_found, upstream_timeout, rate_limited, upstream_error, config_missing or internal.'
Thumbnail:
type: object
required:
- url
- width
- height
properties:
url:
type: string
format: uri
width:
type: integer
height:
type: integer
PlanOffer:
type: object
required:
- price_usd
- interval
- credits_per_interval
- topup_usd_per_1k
- url
properties:
price_usd:
type: number
description: Price per interval in US dollars.
interval:
type: string
enum:
- month
- year
credits_per_interval:
type: integer
description: 'Credits granted each interval: monthly each month, annual up front each year.'
topup_usd_per_1k:
type: number
description: Top-up price per 1,000 credits on this plan.
refund:
type: string
description: Refund terms, where the plan has them.
url:
type: string
format: uri
description: Billing page with this plan selected.
SearchChannelResult:
type: object
required:
- type
- channelId
- title
- handle
- url
- description
- subscriberCount
- verified
- rssUrl
- thumbnails
properties:
type:
type: string
enum:
- channel
channelId:
type: string
description: UC… channel ID.
title:
type:
- string
- 'null'
description: Channel name.
handle:
type:
- string
- 'null'
description: Channel @handle, e.g. @TED.
url:
type: string
format: uri
description:
type:
- string
- 'null'
description: Channel description snippet.
subscriberCount:
type:
- string
- 'null'
description: Subscriber count as YouTube shows it, e.g. 26M subscribers.
verified:
type:
- boolean
- 'null'
description: Whether the channel is verified; null when unknown.
rssUrl:
type: string
format: uri
description: The channel's YouTube RSS feed.
thumbnails:
type: array
items:
$ref: '#/components/schemas/Thumbnail'
description: Can be empty.
SearchResults:
type: object
required:
- results
- result_count
properties:
results:
type: array
maxItems: 50
items:
oneOf:
- $ref: '#/components/schemas/SearchVideoResult'
- $ref: '#/components/schemas/SearchChannelResult'
discriminator:
propertyName: type
mapping:
video: '#/components/schemas/SearchVideoResult'
channel: '#/components/schemas/SearchChannelResult'
result_count:
type: integer
description: Number of items in results.
PaymentRequiredError:
type: object
required:
- detail
- code
properties:
detail:
type: object
required:
- reason
- required
- available
- message
- action_label
- action_url
- plans
properties:
reason:
type: string
enum:
- insufficient_credits
required:
type: integer
description: 'Credits the call needs: its cost, or 1 for a free operation.'
available:
type: integer
description: Spendable credits on the account.
message:
type: string
description: The shortfall in numbers ("This call needs 20 credits; you have 5."), or that the credits have run out, then whether you need a plan, a top-up or an updated payment method.
action_label:
type: string
description: Label for the suggested next step.
action_url:
type: string
format: uri
description: Billing page for the suggested next step.
alt_action_label:
type: string
description: 'Monthly plans only: a second option, the upgrade to Annual.'
alt_action_url:
type: string
format: uri
description: Where alt_action_label leads.
checkout_url:
type: string
format: uri
description: 'Accounts without a plan only: a checkout for checkout_plan that opens without signing in, so it works from any browser, including the one inside an AI app. Valid for 7 days and only for this account. Absent for active or paused plans, which use action_url.'
checkout_plan:
type: string
enum:
- monthly
- annual
description: The plan checkout_url buys. Present whenever checkout_url is.
plans:
type: object
description: Current price and credits of each plan.
required:
- monthly
- annual
properties:
monthly:
$ref: '#/components/schemas/PlanOffer'
annual:
$ref: '#/components/schemas/PlanOffer'
code:
type: string
enum:
- insufficient_credits
SearchVideoResult:
type: object
required:
- type
- videoId
- title
- channelId
- channelTitle
- channelHandle
- channelVerified
- lengthText
- viewCountText
- publishedTimeText
- hasCaptions
- thumbnails
properties:
type:
type: string
enum:
- video
videoId:
type: string
description: 11-character YouTube video ID.
title:
type:
- string
- 'null'
description: Video title.
channelId:
type:
- string
- 'null'
description: UC… channel ID.
channelTitle:
type:
- string
- 'null'
description: Channel name.
channelHandle:
type:
- string
- 'null'
description: Channel @handle, e.g. @TED.
channelVerified:
type:
- boolean
- 'null'
description: Whether the channel is verified; null when unknown.
lengthText:
type:
- string
- 'null'
description: Duration as YouTube shows it, e.g. 3:33.
viewCountText:
type:
- string
- 'null'
description: View count as YouTube shows it, e.g. 1.5B views.
publishedTimeText:
type:
- string
- 'null'
description: Age as YouTube shows it, e.g. 14 years ago.
hasCaptions:
type:
- boolean
- 'null'
description: true when the video has creator captions; null when unknown. Auto-generated captions may exist either way.
thumbnails:
type: array
items:
$ref: '#/components/schemas/Thumbnail'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: API key (tk_live_…)
description: 'API key from the dashboard, sent as `Authorization: Bearer tk_live_…`.'
externalDocs:
description: API reference
url: https://youtubetranscriptapi.com/docs/api