Skip to main content
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>"
}
'
{
  "is_short": true,
  "video_type": "short",
  "width": 1080,
  "height": 1920,
  "aspect_ratio": 1.778,
  "duration_seconds": 33
}

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 form youtube.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 > width on the best available video format
  • video_type is "live" when the URL is a live stream, otherwise "short" when vertical, otherwise "video"
  • duration_seconds is returned for context but does not affect the decision

Header Parameters

x-api-key
string
required
Your API key for authentication

Request

url
string
required
The YouTube URL to classify. Accepts every YouTube URL form: watch?v=, youtu.be/, /shorts/, /embed/. URLs from other platforms return 400.

Response

is_short
boolean
true when the video is vertical (height greater than width).
video_type
string
One of "short", "video", or "live".
width
integer
Width in pixels of the best available video format. May be null if no video-bearing format is exposed.
height
integer
Height in pixels of the best available video format. May be null if no video-bearing format is exposed.
aspect_ratio
number
height / width. Values greater than 1.0 mean vertical. May be null when dimensions are missing.
duration_seconds
integer
Total video duration in seconds. Informational only — not used in the classification.

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"
  }'

Success Response

{
  "is_short": true,
  "video_type": "short",
  "width": 1080,
  "height": 1920,
  "aspect_ratio": 1.778,
  "duration_seconds": 33
}

Error Responses

{
  "error": "Not a YouTube URL"
}
The 400 response covers two cases: the URL is not a recognised YouTube URL, or the video exists but is permanently unavailable (private, deleted, region-blocked, channel terminated). The 401 response covers two cases: no x-api-key header was sent, or the key is invalid / revoked. The 502 response means a transient upstream issue (proxy hiccup, YouTube error). 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

  • Latency: typically 2–3 seconds.
  • 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; storage and bandwidth are not charged for this call.