Lightweight YouTube Metadata API

Two read-only endpoints that return official youtube.com links and basic metadata — no media files, no third-party mirrors, no download links. Built for fast shared hosting with pretty URLs.

Search Videos

GET /api/search/{query}
GET

Returns up to 10 official YouTube results matching a search query.

FieldTypeDescription
titlestringVideo title
videoIdstring11-character YouTube video ID
urlstringOfficial watch URL
thumbnailstringHighest available thumbnail URL
durationstringVideo length, e.g. 12:34
channelstringChannel / uploader name

Try it live

Fetching results…

Video Details

GET /api/details/{videoId}
GET

Returns official metadata for a single video by its 11-character ID.

FieldTypeDescription
titlestringVideo title
videoIdstring11-character YouTube video ID
urlstringOfficial watch URL
thumbnailstringHighest available thumbnail URL
durationstringVideo length
channelstringChannel / uploader name
viewsstringRaw view count
uploadedstringPublish date (ISO 8601)
descriptionstringShort description

Try it live

Fetching details…

Usage Rules

  • Only official youtube.com URLs are ever returned — no direct media/stream links.
  • Both endpoints are read-only (GET) and rate-limited by your hosting environment.
  • Video IDs are validated as exactly 11 characters of [A-Za-z0-9_-].
  • Responses are plain JSON — no authentication required for this demo.

System Logs

GET /api/logs

Recent application log entries. Only available while DEBUG_MODE is true in config.php.

Loading logs…