Quick Start
Request
Response
Specification
Endpoint
GET https://api.supadata.ai/v1/metadata
Each request requires an x-api-key header with your API key available after signing up. Get your API key here.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | URL of the media to get metadata from. Must be YouTube, TikTok, Instagram, or X (Twitter). It is recommended to encode the URL before sending it as a query parameter. |
Response Format
The API returns a unified metadata schema with platform-specific fields.Error Codes
The API returns HTTP status codes and error codes. See this page for more details.Supported URL Formats
The metadata endpoint supports various media URLs, eg: YouTube:https://www.youtube.com/watch?v=dQw4w9WgXcQhttps://youtu.be/dQw4w9WgXcQhttps://www.youtube.com/embed/dQw4w9WgXcQhttps://www.youtube.com/shorts/dQw4w9WgXcQhttps://www.youtube.com/live/dQw4w9WgXcQ
https://www.tiktok.com/@username/video/7234567890123456789https://vm.tiktok.com/AAAAZZZZZhttps://m.tiktok.com/v/7234567890123456789
https://www.instagram.com/reel/C1234567890https://www.instagram.com/p/C1234567890https://www.instagram.com/tv/C1234567890
https://twitter.com/username/status/1234567890123456789https://x.com/username/status/1234567890123456789
Base Schema
All metadata responses share a common base schema regardless of platform. Here are the important details:- type: Acts as a discriminator that determines the structure of the
mediafield (see Media Types below) - title and description: May be
nullfor some platforms or content types - stats:
nullvalues indicate the metric is unavailable or not applicable for the platform. - createdAt: ISO 8601 formatted timestamp
- additionalData: Contains platform-specific fields not included in the base schema
Media Types
Themedia field structure varies based on the type discriminator:
- Video:
duration,thumbnailUrl - Image:
url - Carousel:
items(array of video/image objects) - Post: no additional fields
Platform-Specific Fields
Different platforms and media types may include additional fields in theadditionalData object, for example:
- Channel information for YouTube
- Music/sound information for TikTok
- Retweet/quote information for X (Twitter)
Platform-specific fields in
additionalData may vary and are subject to
change based on platform API availability.