REST API · GET
RuTube Video API
RuTube videos and Shorts in several qualities up to 1080p: an HLS link for every resolution.
https://api.interapi.dev/api/v1/rutube
Price: 5 credits per successful response. 5xx is free, 4xx costs at most 1 credit. Pricing
What it does
Accepts rutube.ru/video/<id>/ and rutube.ru/shorts/<id>/ links. RuTube streams video over HLS, so media holds one .m3u8 link per quality (ext: m3u8, with quality and height), best first, plus the cover image with quality cover. Any HLS-capable player opens the playlist, and ffmpeg turns it into an MP4 file: ffmpeg -i "<url>" -c copy video.mp4. The response also carries title, description, author, and duration_sec.
- Videos and Shorts
- Up to 1080p, every quality
- One HLS (.m3u8) link per quality
- Title, author, duration
How to use it
- Copy a rutube.ru/video/… or rutube.ru/shorts/… link.
- GET /api/v1/rutube?url=…
- Response: media[] with an .m3u8 link per quality, the cover, title, and duration_sec.
Parameters
urlstringrequired- RuTube video link: rutube.ru/video/<id>/ or rutube.ru/shorts/<id>/.
Request example
curl -G "https://api.interapi.dev/api/v1/rutube" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "url=https://rutube.ru/video/0f774368d3ca94b073c47b6f7536ce8b/"import requests
resp = requests.get(
"https://api.interapi.dev/api/v1/rutube",
params={"url": "https://rutube.ru/video/0f774368d3ca94b073c47b6f7536ce8b/"},
headers={"X-API-Key": "YOUR_API_KEY"},
timeout=60,
)
resp.raise_for_status()
print(resp.json())const params = new URLSearchParams({ url: "https://rutube.ru/video/0f774368d3ca94b073c47b6f7536ce8b/" });
const resp = await fetch(`https://api.interapi.dev/api/v1/rutube?${params}`, {
headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());<?php
$query = http_build_query(["url" => "https://rutube.ru/video/0f774368d3ca94b073c47b6f7536ce8b/"]);
$ch = curl_init("https://api.interapi.dev/api/v1/rutube?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-API-Key: YOUR_API_KEY"],
CURLOPT_TIMEOUT => 60,
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);
Response example
{
"status": "success",
"platform": "InterAPI",
"title": "Синий трактор По полям | Учим цвета и как говорят животные",
"description": "По полям по полям Синий трактор едет к нам…",
"author": "Синий трактор - Песенки и мультики для детей",
"media": [
{
"type": "video",
"url": "https://river-6-603.rtbcdn.ru/hls-vod/…/37f9a4cfe6884173ab170777c282907b.mp4.m3u8",
"quality": "1080p",
"download_url": "https://river-6-603.rtbcdn.ru/hls-vod/…/37f9a4cfe6884173ab170777c282907b.mp4.m3u8",
"height": 1080,
"ext": "m3u8"
},
{
"type": "video",
"url": "https://river-6-603.rtbcdn.ru/hls-vod/…/cf123157ed2540b1b020ef1fb6de0c37.mp4.m3u8",
"quality": "720p",
"download_url": "https://river-6-603.rtbcdn.ru/hls-vod/…/cf123157ed2540b1b020ef1fb6de0c37.mp4.m3u8",
"height": 720,
"ext": "m3u8"
},
{
"type": "photo",
"url": "https://pic.rtbcdn.ru/video/…/7f11fa1b4b6ac3742d4dfe31a7304e68.jpg",
"quality": "cover",
"download_url": "https://pic.rtbcdn.ru/video/…/7f11fa1b4b6ac3742d4dfe31a7304e68.jpg"
}
],
"video_url": "https://river-6-603.rtbcdn.ru/hls-vod/…/37f9a4cfe6884173ab170777c282907b.mp4.m3u8",
"video_hd_url": "https://river-6-603.rtbcdn.ru/hls-vod/…/37f9a4cfe6884173ab170777c282907b.mp4.m3u8",
"music_url": null,
"thumbnail": "https://pic.rtbcdn.ru/video/…/7f11fa1b4b6ac3742d4dfe31a7304e68.jpg",
"duration_sec": 552,
"channel_url": null,
"duration_ms": 860
}duration_ms is server processing time. URLs in the example are shortened.
Test a request
Without a key — up to 30 requests per hour per IP. With your key, each request costs the API price in credits.
Paste a link and press Send. The response shows up here.