The YouTube API lets you search YouTube, retrieve video metadata, extract transcripts, and check trainability -- all through a single unified interface. Each endpoint returns structured JSON with credit usage tracking.
Endpoints
Endpoint
Description
POST /api/v1/youtube/search
Search YouTube with filters (date, duration, type, quality)
POST /api/v1/youtube/metadata
Get structured metadata for a video (views, likes, tags, description)
POST /api/v1/youtube/transcript
Extract the transcript/captions for a video
POST /api/v1/youtube/trainability
Check if a video can be used for AI training
Authentication
Header
Value
Required
Authorization
Bearer YOUR_API_KEY
Yes
Content-Type
application/json
Yes
YouTube Search
Bash
POSThttps://api.scavio.dev/api/v1/youtube/search
Search YouTube and get structured results. Supports filtering by upload date, duration, result type, video quality, and more.
Request Body
Parameter
Type
Default
Description
search
string
--
Required. Search query (1-500 chars).
upload_date
string
--
Filter by upload date. One of: last_hour, today, this_week, this_month, this_year
type
string
--
Filter by result type. One of: video, channel, playlist
duration
string
--
Filter by video duration. One of: short (under 4 min), medium (4-20 min), long (over 20 min)
sort_by
string
relevance
Sort order. One of: relevance, date, view_count, rating
{"data":[{"videoId":"sVcwVQRHIc8","title":"Learn RAG From Scratch - Python AI Tutorial","channel":"freeCodeCamp.org","channelId":"UC8butISFwT-Wl7EV0hUK0BQ","publishedAt":"2024-04-17","duration":"2:33:11","viewCount":1258310,"thumbnail":"https://i.ytimg.com/vi/sVcwVQRHIc8/hq720.jpg","description":"Learn how to implement RAG from scratch..."}],"response_time":1.23,"credits_used":1,"credits_remaining":999}
Get structured metadata for a YouTube video including title, description, view count, like count, comment count, tags, thumbnails, upload date, channel info, and available formats.
{"data":{"title":"Learn RAG From Scratch - Python AI Tutorial","description":"Learn how to implement RAG from scratch...","upload_date":"20240417","duration":9191,"view_count":1258310,"like_count":23211,"comment_count":295,"categories":["Education"],"tags":["rag","langchain","python","llm"],"channel_id":"UC8butISFwT-Wl7EV0hUK0BQ","uploader":"freeCodeCamp.org","uploader_url":"https://www.youtube.com/@freecodecamp","is_live":false,"age_limit":0,"thumbnails":[{"url":"https://i.ytimg.com/vi/sVcwVQRHIc8/maxresdefault.jpg","width":1280,"height":720}]},"response_time":0.89,"credits_used":1,"credits_remaining":998}
Extract the transcript (captions/subtitles) for a YouTube video. Supports multiple languages and both auto-generated and uploader-provided transcripts.
Request Body
Parameter
Type
Default
Description
video_id
string
--
Required. YouTube video ID.
language
string
en
Transcript language code (e.g. en, es, fr, de).
transcript_origin
string
--
Transcript origin. Use auto_generated for auto-captions or uploader_provided for manual captions.
{"data":[{"text":"in this course you will learn how to build","start":0.0,"duration":3.2},{"text":"retrieval augmented generation from scratch","start":3.2,"duration":2.8},{"text":"straight from a LangChain software engineer","start":6.0,"duration":3.1}],"response_time":1.45,"credits_used":1,"credits_remaining":997}
Check if a YouTube video has transcripts available and is suitable for AI training purposes. Returns information about transcript availability, license, and training eligibility.