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}
Returns up to 10 official YouTube results matching a search query.
| Field | Type | Description |
|---|---|---|
| title | string | Video title |
| videoId | string | 11-character YouTube video ID |
| url | string | Official watch URL |
| thumbnail | string | Highest available thumbnail URL |
| duration | string | Video length, e.g. 12:34 |
| channel | string | Channel / uploader name |
Try it live
Fetching results…
Video Details
GET /api/details/{videoId}
Returns official metadata for a single video by its 11-character ID.
| Field | Type | Description |
|---|---|---|
| title | string | Video title |
| videoId | string | 11-character YouTube video ID |
| url | string | Official watch URL |
| thumbnail | string | Highest available thumbnail URL |
| duration | string | Video length |
| channel | string | Channel / uploader name |
| views | string | Raw view count |
| uploaded | string | Publish date (ISO 8601) |
| description | string | Short description |
Try it live
Fetching details…
Usage Rules
- Only official
youtube.comURLs 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…