ScavioScavio
ProductPricingDocs
Sign InGet Started

Documentation

  • Introduction
  • Quickstart
  • Google Search API
  • YouTube API
  • Amazon API
  • Walmart API
  • Reddit API
  • TikTok API
  • OpenClaw Integration
  • MCP Integration
  • n8n Integration
  • Country Codes
  • Rate Limits
  • Errors

YouTube API

The YouTube API lets you search YouTube and retrieve video metadata through a single unified interface. Each endpoint returns structured JSON with credit usage tracking.

Endpoints

EndpointDescription
POST /api/v1/youtube/searchSearch YouTube with filters (date, duration, type, quality)
POST /api/v1/youtube/metadataGet structured metadata for a video (views, likes, tags, description)

Authentication

HeaderValueRequired
AuthorizationBearer YOUR_API_KEYYes
Content-Typeapplication/jsonYes

YouTube Search

Bash
POST https://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

ParameterTypeDefaultDescription
searchstring--Required. Search query (1-500 chars).
upload_datestring--Filter by upload date. One of: last_hour, today, this_week, this_month, this_year
typestring--Filter by result type. One of: video, channel, playlist
durationstring--Filter by video duration. One of: short (under 4 min), medium (4-20 min), long (over 20 min)
sort_bystringrelevanceSort order. One of: relevance, date, view_count, rating
hdbooleanfalseHD videos only
4kbooleanfalse4K videos only
subtitlesbooleanfalseVideos with subtitles/captions only
creative_commonsbooleanfalseCreative Commons licensed videos only
livebooleanfalseLive streams only
hdrbooleanfalseHDR videos only
360booleanfalse360-degree videos only
3dbooleanfalse3D videos only
locationbooleanfalseVideos with location metadata only
vr180booleanfalseVR180 videos only

Example

curl -X POST 'https://api.scavio.dev/api/v1/youtube/search' \
  -H 'Authorization: Bearer sk_live_your_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "search": "langchain tutorial",
    "type": "video",
    "duration": "medium",
    "sort_by": "view_count",
    "upload_date": "this_year"
  }'

Response Example

JSON
{
  "data": {
    "results": [
      {
        "videoId": "sVcwVQRHIc8",
        "title": { "runs": [{ "text": "Learn RAG From Scratch - Python AI Tutorial" }] },
        "longBylineText": { "runs": [{ "text": "freeCodeCamp.org" }] },
        "publishedTimeText": { "simpleText": "1 year ago" },
        "lengthText": { "simpleText": "2:33:11" },
        "viewCountText": { "simpleText": "1,258,310 views" },
        "thumbnail": { "thumbnails": [{ "url": "https://i.ytimg.com/vi/sVcwVQRHIc8/hq720.jpg", "width": 360, "height": 202 }] }
      }
    ],
    "search": "langchain tutorial"
  },
  "response_time": 1230,
  "credits_used": 1,
  "credits_remaining": 999
}

Video Metadata

Bash
POST https://api.scavio.dev/api/v1/youtube/metadata

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.

Request Body

ParameterTypeDescription
video_idstringRequired. YouTube video ID (e.g. dQw4w9WgXcQ).

Example

curl -X POST 'https://api.scavio.dev/api/v1/youtube/metadata' \
  -H 'Authorization: Bearer sk_live_your_key' \
  -H 'Content-Type: application/json' \
  -d '{"video_id": "sVcwVQRHIc8"}'

Response Example

JSON
{
  "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",
    "channel_url": "https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ",
    "uploader": "freeCodeCamp.org",
    "uploader_id": "@freecodecamp",
    "uploader_url": "https://www.youtube.com/@freecodecamp",
    "video_id": "sVcwVQRHIc8",
    "is_live": false,
    "age_limit": 0,
    "thumbnails": [
      {
        "url": "https://i.ytimg.com/vi/sVcwVQRHIc8/maxresdefault.jpg",
        "width": 1280,
        "height": 720
      }
    ],
    "formats": []
  },
  "response_time": 890,
  "credits_used": 1,
  "credits_remaining": 998
}

Response Format

All YouTube endpoints return a consistent response wrapper:

FieldTypeDescription
dataobject | nullThe response payload. Shape depends on the endpoint. Search returns {results, search}; metadata returns the video object. null if the request failed upstream.
response_timenumberServer-side response time in milliseconds
credits_usednumberNumber of credits consumed by this request
credits_remainingnumberCredits remaining in your current billing period

Error Responses

StatusDescription
401Unauthorized -- missing or invalid API key
429Rate or usage limit exceeded for your plan
502Upstream error -- retry after a short delay
503Upstream unavailable -- retry later

See Errors for the full error reference and retry best practices.

Related

  • Quickstart -- get your API key and make your first request
  • Google Search API -- search Google with structured SERP data
  • Amazon API -- search products and get details by ASIN
  • Rate Limits -- limits per plan tier
  • Errors -- error codes and handling
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy