Get Metadata
curl --request POST \
--url https://api.tornadoapi.io/metadata \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.tornadoapi.io/metadata"
payload = { "url": "<string>" }
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.tornadoapi.io/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tornadoapi.io/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tornadoapi.io/metadata"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tornadoapi.io/metadata")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"duration": 213.0,
"width": 1920,
"height": 1080,
"extractor": "YouTube",
"uploader": "Rick Astley",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"description": "The official video for Never Gonna Give You Up...",
"view_count": 1500000000,
"like_count": 15000000,
"upload_date": "20091025",
"filesize_approx": 52428800
}
Metadata
Get Metadata
Extract video metadata without downloading
POST
/
metadata
Get Metadata
curl --request POST \
--url https://api.tornadoapi.io/metadata \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.tornadoapi.io/metadata"
payload = { "url": "<string>" }
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.tornadoapi.io/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tornadoapi.io/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tornadoapi.io/metadata"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tornadoapi.io/metadata")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"duration": 213.0,
"width": 1920,
"height": 1080,
"extractor": "YouTube",
"uploader": "Rick Astley",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"description": "The official video for Never Gonna Give You Up...",
"view_count": 1500000000,
"like_count": 15000000,
"upload_date": "20091025",
"filesize_approx": 52428800
}
Overview
Extract metadata (title, duration, thumbnail, etc.) from a video URL without actually downloading the video. Useful for preview, validation, or getting video information before creating a download job.Header Parameters
string
required
Your API key for authentication
Request
string
required
The video URL to extract metadata from
Response
All metadata fields below may benull when the source does not expose them. A successful lookup is a metadata snapshot, not a guarantee that a later download will succeed. Successful results can be cached (default five minutes, configurable).
string
Video title
number
Video duration in seconds
integer
Video width in pixels
integer
Video height in pixels
string
Platform name (e.g., “YouTube”, “Vimeo”)
string
Channel or uploader name
string
URL to the video thumbnail
string
Video description
integer
Number of views
integer
Number of likes
string
Upload date in YYYYMMDD format
integer
Approximate file size in bytes
Examples
curl -X POST "https://api.tornadoapi.io/metadata" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}'
const response = await fetch('https://api.tornadoapi.io/metadata', {
method: 'POST',
headers: {
'x-api-key': 'sk_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
})
});
const metadata = await response.json();
console.log(`Title: ${metadata.title}`);
console.log(`Duration: ${metadata.duration}s`);
console.log(`Resolution: ${metadata.width}x${metadata.height}`);
import requests
response = requests.post(
'https://api.tornadoapi.io/metadata',
headers={'x-api-key': 'sk_your_api_key'},
json={'url': 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'}
)
metadata = response.json()
print(f"Title: {metadata['title']}")
print(f"Duration: {metadata['duration']}s")
Success Response
{
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"duration": 213.0,
"width": 1920,
"height": 1080,
"extractor": "YouTube",
"uploader": "Rick Astley",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"description": "The official video for Never Gonna Give You Up...",
"view_count": 1500000000,
"like_count": 15000000,
"upload_date": "20091025",
"filesize_approx": 52428800
}
Error Responses
{
"error": "Failed to extract metadata",
"details": "Video unavailable"
}
{
"error": "Missing x-api-key header"
}
{
"error": "Invalid API Key"
}
{
"error": "Failed to extract metadata"
}
503 with JSON retry_after: 2; extraction timeout returns 504. Malformed URLs and unsupported YouTube playlist/channel-only inputs can return 400 before extraction.
Use Cases
Preview Before Download
Get video information before creating a download job to show users what they’re about to download.Validate URLs
Check if a URL is valid and supported before adding it to a batch.Get Thumbnail
Extract the thumbnail URL to display in your UI without downloading the full video.Estimate Storage
Usefilesize_approx, when non-null, as a source estimate. It is not a bound on the encoded output size.Was this page helpful?