Media Extract
Premium · 5 creditsExtract metadata, format details, and thumbnail URLs from video and audio content. Powered by yt-dlp.
POST /api/media-extract
Section titled “POST /api/media-extract”Parameters
Section titled “Parameters”| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Video or audio URL |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
title | string | Media title |
duration | number | Duration in seconds |
uploader | string | Uploader or channel name |
upload_date | string | Upload date |
view_count | integer | View count |
like_count | integer | Like count |
description | string | Description (max 2000 characters) |
thumbnail | string | Thumbnail URL |
webpage_url | string | Original page URL |
extractor | string | Platform extractor used |
formats | array | Available formats (max 10) |
formats[].format_id | string | Format identifier |
formats[].ext | string | File extension |
formats[].resolution | string | Resolution |
formats[].vcodec | string | Video codec |
formats[].acodec | string | Audio codec |
formats[].filesize | integer | File size in bytes |
formats[].tbr | number | Total bitrate |
Example
Section titled “Example”curl -X POST https://morso.dev/api/media-extract \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'{ "title": "Rick Astley - Never Gonna Give You Up", "duration": 212, "uploader": "Rick Astley", "upload_date": "2009-10-25", "view_count": 1500000000, "like_count": 15000000, "description": "The official video for \"Never Gonna Give You Up\" by Rick Astley...", "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg", "webpage_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "extractor": "youtube", "formats": [ { "format_id": "137", "ext": "mp4", "resolution": "1920x1080", "vcodec": "avc1.640028", "acodec": "none", "filesize": 52428800, "tbr": 2500.0 }, { "format_id": "140", "ext": "m4a", "resolution": "audio only", "vcodec": "none", "acodec": "mp4a.40.2", "filesize": 3500000, "tbr": 128.0 } ]}Errors
Section titled “Errors”- 400 — Missing URL, yt-dlp unavailable, or extraction timeout.
See Errors for the standard error shape.