Is Short
curl --request POST \
--url https://api.tornadoapi.io/is-short \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.tornadoapi.io/is-short"
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/is-short', 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/is-short",
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/is-short"
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/is-short")
.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/is-short")
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{
"is_short": true,
"video_type": "short",
"width": 1080,
"height": 1920,
"aspect_ratio": 1.778,
"duration_seconds": 33
}
{
"is_short": false,
"video_type": "video",
"width": 1920,
"height": 1080,
"aspect_ratio": 0.5625,
"duration_seconds": 213
}
{
"is_short": false,
"video_type": "live",
"width": 1920,
"height": 1080,
"aspect_ratio": 0.5625,
"duration_seconds": 0
}
Metadata
Is Short
Detect whether a YouTube URL is a Short (vertical) or a regular video
POST
/
is-short
Is Short
curl --request POST \
--url https://api.tornadoapi.io/is-short \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.tornadoapi.io/is-short"
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/is-short', 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/is-short",
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/is-short"
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/is-short")
.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/is-short")
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{
"is_short": true,
"video_type": "short",
"width": 1080,
"height": 1920,
"aspect_ratio": 1.778,
"duration_seconds": 33
}
{
"is_short": false,
"video_type": "video",
"width": 1920,
"height": 1080,
"aspect_ratio": 0.5625,
"duration_seconds": 213
}
{
"is_short": false,
"video_type": "live",
"width": 1920,
"height": 1080,
"aspect_ratio": 0.5625,
"duration_seconds": 0
}
Overview
Classify a YouTube URL as a Short (vertical) or a regular video by inspecting the actual video dimensions. No download is performed. This is more reliable than checking the URL pattern: a URL of the formyoutube.com/watch?v=... can still be a Short in disguise (and vice versa). Only the real video dimensions tell the truth.
How the classification works
is_short = height > widthon the best available video formatvideo_typeis"live"when the URL is a live stream, otherwise"short"when vertical, otherwise"video"duration_secondsis returned for context but does not affect the decision
video_type: "live" even before it starts. When dimensions are unavailable for that live, dimension fields are null and is_short is false.
If the lightweight extraction cannot classify the video, the API tries the full native extractor with a new proxy session. An ordinary video whose dimensions remain unknown returns 502 instead of a guessed classification.
Header Parameters
Request
The YouTube URL to classify. Recognizes supported YouTube URL forms including
watch?v=, youtu.be/, /shorts/, /embed/. URLs from other platforms return 400.Response
Width in pixels of the best available video format. May be
null for a confirmed live stream with no available video format.Height in pixels of the best available video format. May be
null for a confirmed live stream with no available video format.height / width. Values greater than 1.0 mean vertical. May be null when dimensions are missing.Examples
curl -X POST "https://api.tornadoapi.io/is-short" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/shorts/SXHMnicI6Pg"
}'
const response = await fetch('https://api.tornadoapi.io/is-short', {
method: 'POST',
headers: {
'x-api-key': 'sk_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.youtube.com/watch?v=gUmlkXlhZo8'
})
});
const result = await response.json();
if (result.is_short) {
console.log(`Short: ${result.width}x${result.height}, ${result.duration_seconds}s`);
} else {
console.log(`Regular video: ${result.video_type}`);
}
import requests
response = requests.post(
'https://api.tornadoapi.io/is-short',
headers={'x-api-key': 'sk_your_api_key'},
json={'url': 'https://www.youtube.com/watch?v=gUmlkXlhZo8'}
)
result = response.json()
print(f"Type: {result['video_type']}")
print(f"Dimensions: {result['width']}x{result['height']}")
print(f"Aspect ratio: {result['aspect_ratio']}")
Success Response
{
"is_short": true,
"video_type": "short",
"width": 1080,
"height": 1920,
"aspect_ratio": 1.778,
"duration_seconds": 33
}
{
"is_short": false,
"video_type": "video",
"width": 1920,
"height": 1080,
"aspect_ratio": 0.5625,
"duration_seconds": 213
}
{
"is_short": false,
"video_type": "live",
"width": 1920,
"height": 1080,
"aspect_ratio": 0.5625,
"duration_seconds": 0
}
Error Responses
{
"error": "Not a YouTube URL"
}
{
"error": "Video is private"
}
{
"error": "Missing API key"
}
{
"error": "Invalid API Key"
}
{
"error": "Unable to determine video dimensions from YouTube, please retry"
}
x-api-key header was sent, or the key is invalid / revoked.
The 502 response means the extractor could not establish a classification (proxy issue, YouTube error, timeout, or missing dimensions). Retry after a short delay.
Use Cases
Conditional routing
Pick a different quality preset, container, or storage folder based on whether the video is a Short.Pre-filtering a batch
When ingesting a creator’s catalog, separate Shorts from full videos before queueing downloads.UI hints
Show a different player or thumbnail aspect ratio in your front-end as soon as the URL is pasted.Notes
- Extraction budgets: up to 6 seconds for lightweight extraction and 20 seconds for the full native fallback when needed.
- No server-side cache: if you call the endpoint repeatedly for the same URL, consider caching the response on your side.
- No download: only video information is fetched; this path updates API-call counters but does not emit media-transfer billing.
Was this page helpful?