Skip to main content
GET
/
metadata
Node.js
import { Supadata } from '@supadata/js';

const supadata = new Supadata({
  apiKey: 'YOUR_API_KEY',
});

// TikTok video, can be also YouTube, Instagram, Twitter, Facebook
const tiktokMetadata = await supadata.metadata({
  url: 'https://www.tiktok.com/@user/video/1234567890',
});
console.log(tiktokMetadata);
{
  "platform": "youtube",
  "type": "video",
  "id": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Amazing Video Title",
  "description": "Check out this amazing content! #awesome",
  "author": {
    "displayName": "John Doe",
    "username": "username",
    "avatarUrl": "https://example.com/avatar.jpg",
    "verified": true
  },
  "stats": {
    "likes": 5000,
    "comments": 200,
    "shares": 100,
    "views": 50000
  },
  "media": {
    "type": "<string>",
    "duration": 30,
    "thumbnailUrl": "https://example.com/thumb.jpg"
  },
  "tags": [
    "funny",
    "cats",
    "viral"
  ],
  "createdAt": "2024-01-15T10:30:00Z",
  "additionalData": {}
}

Authorizations

x-api-key
string
header
required

Query Parameters

url
string<uri>
required

URL to any supported internet media. Supports YouTube videos, TikTok videos, Instagram reels/posts, Twitter/X posts, Facebook videos, and more.

Response

Metadata retrieved successfully

platform
enum<string>
required

Platform where the media is hosted

Available options:
youtube,
tiktok,
instagram,
twitter,
facebook
type
enum<string>
required

Type of media content

Available options:
video,
image,
carousel,
post
Example:

"video"

id
string
required

Unique media identifier from the platform

Example:

"dQw4w9WgXcQ"

url
string

Canonical URL to the media

Example:

"https://www.youtube.com/watch?v=dQw4w9WgXcQ"

title
string | null

Media title

Example:

"Amazing Video Title"

description
string | null

Media description or caption

Example:

"Check out this amazing content! #awesome"

author
object

Author/creator information

stats
object

Engagement statistics. null values indicate the metric is unavailable or not applicable for the platform.

media
object

Media-specific data, discriminated by type field (video, image, carousel, or post)

tags
string[]

Tags, hashtags, or keywords associated with the media

Example:
["funny", "cats", "viral"]
createdAt
string

Creation/publish timestamp (ISO 8601 format)

Example:

"2024-01-15T10:30:00Z"

additionalData
object

Platform-specific additional data