Fill these in to personalise every example on this page. Nothing is sent anywhere.
API reference
Every public endpoint, parameter and response object of the SPVD API. New here? Start with the API guide.
Conventions
- All endpoints are
GETrequests with parameters in the query string. Remember to URL-encode values such asurl. - Every data endpoint returns the same envelope,
ExtractionResult. Checkerrorfirst. - Empty query values (
?lang=) are treated as not provided. csv<T>means a comma-separated list, e.g.renderableFormats=720p,1080p. Duplicates are ignored.- Unknown enum values are rejected with HTTP
400.
| Header | Value |
|---|---|
X-RapidAPI-Key | Your API key from the API marketplace. |
X-RapidAPI-Host | The API host shown on the marketplace, e.g. spvd-v3-plus.p.rapidapi.com. |
Utility endpoints
These endpoints need no API key.
Health checkno auth
/healthReturns {"status":"ok"} when the service is up. Does not consume credits.
Returns: {"status": "ok"}
const res = await fetch("https://api-host/health");
const data = await res.json();
console.log(data);import requests
data = requests.get("https://api-host/health", timeout=30).json()
print(data)<?php
$data = json_decode(file_get_contents("https://api-host/health"), true);
print_r($data);curl "https://api-host/health"OpenAPI spec (all platforms)no auth
/openapiCombined OpenAPI 3 document for every platform, with tags grouped per platform. Import it into Postman, Insomnia or any code generator.
Returns: OpenAPI 3 JSON document.
const res = await fetch("https://api-host/openapi");
const data = await res.json();
console.log(data);import requests
data = requests.get("https://api-host/openapi", timeout=30).json()
print(data)<?php
$data = json_decode(file_get_contents("https://api-host/openapi"), true);
print_r($data);curl "https://api-host/openapi"OpenAPI spec listno auth
/openapi/platformsLists the per-platform specs that are available and where to download them.
Returns: { combined, platforms: [{ id, name, title, version, endpoints, url }] }
const res = await fetch("https://api-host/openapi/platforms");
const data = await res.json();
console.log(data);import requests
data = requests.get("https://api-host/openapi/platforms", timeout=30).json()
print(data)<?php
$data = json_decode(file_get_contents("https://api-host/openapi/platforms"), true);
print_r($data);curl "https://api-host/openapi/platforms"OpenAPI spec (one platform)no auth
/openapi/{platform}OpenAPI 3 document for a single platform, e.g. /openapi/youtube or /openapi/tiktok.json.
| Parameter | Type | Description |
|---|---|---|
platformrequired | path | Platform id as listed by /openapi/platforms: youtube, instagram, facebook, tiktok, … |
Returns: OpenAPI 3 JSON document, or 404 for an unknown platform.
const res = await fetch("https://api-host/openapi/youtube");
const data = await res.json();
console.log(data);import requests
data = requests.get("https://api-host/openapi/youtube", timeout=30).json()
print(data)<?php
$data = json_decode(file_get_contents("https://api-host/openapi/youtube"), true);
print_r($data);curl "https://api-host/openapi/youtube"YouTube
Video details1–2 credits
/youtube/v3/video/detailsEverything about a single video: downloadable video and audio streams, optional merged MP4 render configs, title, thumbnail, channel, transcript and extended metadata.
| Parameter | Type | Description |
|---|---|---|
videoIdrequired | string | 11-character YouTube video ID, e.g. dQw4w9WgXcQ. |
renderableFormatsoptional | csv<RenderableFormat> | Comma-separated qualities to prepare as merged MP4 files, e.g. 720p,1080p or highres. See renderable formats. Adds 1 credit when at least one render config is returned. |
urlAccessoptional | enum | normal (default): direct stream links, fastest. proxied: links are relayed through the API to avoid 403 errors in restricted networks; slower downloads. Costs 2 credits. |
getTranscriptoptional | enum | true to include the transcript. Default false. |
transcriptLanguageoptional | string | Transcript language to return. Must be one of the values listed in metadata.transcript.languages. Defaults to the video's primary track. |
fieldsoptional | csv<Field> | Include or exclude parts of the response, e.g. contents.videos,metadata.author or -metadata.additionalData. See field filtering. |
countryCodeoptional | string | Two-letter country code (case-insensitive) used for geo-specific content, e.g. us, gb, or worldwide. See country codes. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Costs 2 credits when urlAccess=proxied or when at least one render config is returned; otherwise 1. The two do not stack.
Returns: contents[0].videos, contents[0].audios, contents[0].renderableVideos; metadata.title, thumbnailUrl, author, transcript, additionalData (duration, view count, keywords, captions, storyboards, end screen…).
const params = new URLSearchParams({
videoId: "dQw4w9WgXcQ",
renderableFormats: "720p,1080p",
getTranscript: "true",
});
const res = await fetch(`https://api-host/youtube/v3/video/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/video/details",
params={
"videoId": "dQw4w9WgXcQ",
"renderableFormats": "720p,1080p",
"getTranscript": "true",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"videoId" => "dQw4w9WgXcQ",
"renderableFormats" => "720p,1080p",
"getTranscript" => "true",
]);
$ch = curl_init("https://api-host/youtube/v3/video/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/video/details" \
--data-urlencode "videoId=dQw4w9WgXcQ" \
--data-urlencode "renderableFormats=720p,1080p" \
--data-urlencode "getTranscript=true" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Video comments1 credit
/youtube/v3/video/commentsTop-level comments for a video, or replies to one comment. Paginated.
| Parameter | Type | Description |
|---|---|---|
videoIdrequired | string | YouTube video ID. |
commentIdoptional | string | Return replies to this comment instead of top-level comments. |
sortByoptional | enum | TOP_COMMENTS or NEWEST_FIRST. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.comments (comment threads, header, counts) and metadata.comments.nextToken.
const params = new URLSearchParams({
videoId: "dQw4w9WgXcQ",
sortBy: "NEWEST_FIRST",
});
const res = await fetch(`https://api-host/youtube/v3/video/comments?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/video/comments",
params={
"videoId": "dQw4w9WgXcQ",
"sortBy": "NEWEST_FIRST",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"videoId" => "dQw4w9WgXcQ",
"sortBy" => "NEWEST_FIRST",
]);
$ch = curl_init("https://api-host/youtube/v3/video/comments?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/video/comments" \
--data-urlencode "videoId=dQw4w9WgXcQ" \
--data-urlencode "sortBy=NEWEST_FIRST" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Community post details1 credit
/youtube/v3/post/detailsA single community post (text, images, polls, shared videos).
| Parameter | Type | Description |
|---|---|---|
postIdrequired | string | Post ID (starts with Ug). |
channelIdrequired | string | ID of the channel that published the post. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.post.
const params = new URLSearchParams({
postId: "UgkxPOST_ID",
channelId: "UCxxxxxxxxxxxxxxxxxxxxxx",
});
const res = await fetch(`https://api-host/youtube/v3/post/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/post/details",
params={
"postId": "UgkxPOST_ID",
"channelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"postId" => "UgkxPOST_ID",
"channelId" => "UCxxxxxxxxxxxxxxxxxxxxxx",
]);
$ch = curl_init("https://api-host/youtube/v3/post/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/post/details" \
--data-urlencode "postId=UgkxPOST_ID" \
--data-urlencode "channelId=UCxxxxxxxxxxxxxxxxxxxxxx" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Community post comments1 credit
/youtube/v3/post/commentsComments on a community post. Paginated.
| Parameter | Type | Description |
|---|---|---|
postIdrequired | string | Post ID. |
channelIdrequired | string | Channel ID of the post. |
sortByoptional | enum | TOP_COMMENTS or NEWEST_FIRST. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.comments and metadata.comments.nextToken.
const params = new URLSearchParams({
postId: "UgkxPOST_ID",
channelId: "UCxxxxxxxxxxxxxxxxxxxxxx",
});
const res = await fetch(`https://api-host/youtube/v3/post/comments?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/post/comments",
params={
"postId": "UgkxPOST_ID",
"channelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"postId" => "UgkxPOST_ID",
"channelId" => "UCxxxxxxxxxxxxxxxxxxxxxx",
]);
$ch = curl_init("https://api-host/youtube/v3/post/comments?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/post/comments" \
--data-urlencode "postId=UgkxPOST_ID" \
--data-urlencode "channelId=UCxxxxxxxxxxxxxxxxxxxxxx" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Playlist1 credit
/youtube/v3/playlistPlaylist information and its videos, page by page.
| Parameter | Type | Description |
|---|---|---|
playlistIdrequired | string | Playlist ID, e.g. PLxxxxxxxx. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
countryCodeoptional | string | Two-letter country code (case-insensitive) used for geo-specific content, e.g. us, gb, or worldwide. See country codes. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.playlist.info, metadata.playlist.videos, metadata.playlist.messages, metadata.playlist.nextToken.
const params = new URLSearchParams({
playlistId: "PLrAXtmRdnEQy6nuLMt20JyowgskgQGfXH",
});
const res = await fetch(`https://api-host/youtube/v3/playlist?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/playlist",
params={
"playlistId": "PLrAXtmRdnEQy6nuLMt20JyowgskgQGfXH",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"playlistId" => "PLrAXtmRdnEQy6nuLMt20JyowgskgQGfXH",
]);
$ch = curl_init("https://api-host/youtube/v3/playlist?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/playlist" \
--data-urlencode "playlistId=PLrAXtmRdnEQy6nuLMt20JyowgskgQGfXH" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Search (all types)1 credit
/youtube/v3/searchMixed search results: videos, channels, playlists, shorts and more.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Search terms. |
uploadDateoptional | enum | all (default), today, week, month, year. |
prioritizeoptional | enum | relevance (default) or popularity. |
durationoptional | enum | all (default), under_three_mins, three_to_twenty_mins, over_twenty_mins. |
featuresoptional | csv<enum> | Any of 360, 3d, 4k, creative_commons, hd, hdr, live, location, purchased, subtitles, vr180. |
sortByoptional | enum | Deprecated. relevance, rating, upload_date, view_count. Use prioritize and uploadDate instead. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.additionalData.searchResults → results, estimated_results, nextToken.
const params = new URLSearchParams({
query: "lofi hip hop",
uploadDate: "month",
});
const res = await fetch(`https://api-host/youtube/v3/search?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/search",
params={
"query": "lofi hip hop",
"uploadDate": "month",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"query" => "lofi hip hop",
"uploadDate" => "month",
]);
$ch = curl_init("https://api-host/youtube/v3/search?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/search" \
--data-urlencode "query=lofi hip hop" \
--data-urlencode "uploadDate=month" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Search videos1 credit
/youtube/v3/search/videoSearch restricted to videos.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Search terms. |
uploadDateoptional | enum | all (default), today, week, month, year. |
prioritizeoptional | enum | relevance (default) or popularity. |
durationoptional | enum | all (default), under_three_mins, three_to_twenty_mins, over_twenty_mins. |
featuresoptional | csv<enum> | Any of 360, 3d, 4k, creative_commons, hd, hdr, live, location, purchased, subtitles, vr180. |
sortByoptional | enum | Deprecated. relevance, rating, upload_date, view_count. Use prioritize and uploadDate instead. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.additionalData.searchResults.
const params = new URLSearchParams({
query: "programming tutorial",
prioritize: "popularity",
duration: "over_twenty_mins",
});
const res = await fetch(`https://api-host/youtube/v3/search/video?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/search/video",
params={
"query": "programming tutorial",
"prioritize": "popularity",
"duration": "over_twenty_mins",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"query" => "programming tutorial",
"prioritize" => "popularity",
"duration" => "over_twenty_mins",
]);
$ch = curl_init("https://api-host/youtube/v3/search/video?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/search/video" \
--data-urlencode "query=programming tutorial" \
--data-urlencode "prioritize=popularity" \
--data-urlencode "duration=over_twenty_mins" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Search channels1 credit
/youtube/v3/search/channelSearch restricted to channels.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Search terms. |
uploadDateoptional | enum | all (default), today, week, month, year. |
prioritizeoptional | enum | relevance (default) or popularity. |
durationoptional | enum | all (default), under_three_mins, three_to_twenty_mins, over_twenty_mins. |
featuresoptional | csv<enum> | Any of 360, 3d, 4k, creative_commons, hd, hdr, live, location, purchased, subtitles, vr180. |
sortByoptional | enum | Deprecated. relevance, rating, upload_date, view_count. Use prioritize and uploadDate instead. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.additionalData.searchResults.
const params = new URLSearchParams({
query: "cooking",
});
const res = await fetch(`https://api-host/youtube/v3/search/channel?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/search/channel",
params={
"query": "cooking",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"query" => "cooking",
]);
$ch = curl_init("https://api-host/youtube/v3/search/channel?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/search/channel" \
--data-urlencode "query=cooking" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Search playlists1 credit
/youtube/v3/search/playlistSearch restricted to playlists.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Search terms. |
uploadDateoptional | enum | all (default), today, week, month, year. |
prioritizeoptional | enum | relevance (default) or popularity. |
durationoptional | enum | all (default), under_three_mins, three_to_twenty_mins, over_twenty_mins. |
featuresoptional | csv<enum> | Any of 360, 3d, 4k, creative_commons, hd, hdr, live, location, purchased, subtitles, vr180. |
sortByoptional | enum | Deprecated. relevance, rating, upload_date, view_count. Use prioritize and uploadDate instead. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.additionalData.searchResults.
const params = new URLSearchParams({
query: "workout mix",
});
const res = await fetch(`https://api-host/youtube/v3/search/playlist?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/search/playlist",
params={
"query": "workout mix",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"query" => "workout mix",
]);
$ch = curl_init("https://api-host/youtube/v3/search/playlist?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/search/playlist" \
--data-urlencode "query=workout mix" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Search movies1 credit
/youtube/v3/search/movieSearch restricted to movies.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Search terms. |
uploadDateoptional | enum | all (default), today, week, month, year. |
prioritizeoptional | enum | relevance (default) or popularity. |
durationoptional | enum | all (default), under_three_mins, three_to_twenty_mins, over_twenty_mins. |
featuresoptional | csv<enum> | Any of 360, 3d, 4k, creative_commons, hd, hdr, live, location, purchased, subtitles, vr180. |
sortByoptional | enum | Deprecated. relevance, rating, upload_date, view_count. Use prioritize and uploadDate instead. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.additionalData.searchResults.
const params = new URLSearchParams({
query: "documentary",
});
const res = await fetch(`https://api-host/youtube/v3/search/movie?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/search/movie",
params={
"query": "documentary",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"query" => "documentary",
]);
$ch = curl_init("https://api-host/youtube/v3/search/movie?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/search/movie" \
--data-urlencode "query=documentary" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Search suggestions1 credit
/youtube/v3/search/suggestionsAutocomplete suggestions for a partial query.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Partial search text. |
previousQueryoptional | string | The user's previous query, for more relevant suggestions. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.additionalData.searchSuggestions.
const params = new URLSearchParams({
query: "javascri",
});
const res = await fetch(`https://api-host/youtube/v3/search/suggestions?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/search/suggestions",
params={
"query": "javascri",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"query" => "javascri",
]);
$ch = curl_init("https://api-host/youtube/v3/search/suggestions?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/search/suggestions" \
--data-urlencode "query=javascri" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Channel details1 credit
/youtube/v3/channel/detailsChannel profile: name, handle, description, avatar, banner, subscriber and video counts, links.
| Parameter | Type | Description |
|---|---|---|
channelIdrequired | string | Channel ID (starts with UC). Use Channel ID from handle if you only have @handle. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.channel.
const params = new URLSearchParams({
channelId: "UCX6OQ3DkcsbYNE6H8uQQuVA",
});
const res = await fetch(`https://api-host/youtube/v3/channel/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/channel/details",
params={
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"channelId" => "UCX6OQ3DkcsbYNE6H8uQQuVA",
]);
$ch = curl_init("https://api-host/youtube/v3/channel/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/channel/details" \
--data-urlencode "channelId=UCX6OQ3DkcsbYNE6H8uQQuVA" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Channel videos / shorts / lives1 credit
/youtube/v3/channel/videosA channel's uploads of one type, newest first. Paginated.
| Parameter | Type | Description |
|---|---|---|
channelIdrequired | string | Channel ID. |
contentTyperequired | enum | videos, shorts or livestreams. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.channel.<contentType>.contents and …nextToken.
const params = new URLSearchParams({
channelId: "UCX6OQ3DkcsbYNE6H8uQQuVA",
contentType: "shorts",
});
const res = await fetch(`https://api-host/youtube/v3/channel/videos?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/channel/videos",
params={
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"contentType": "shorts",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"channelId" => "UCX6OQ3DkcsbYNE6H8uQQuVA",
"contentType" => "shorts",
]);
$ch = curl_init("https://api-host/youtube/v3/channel/videos?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/channel/videos" \
--data-urlencode "channelId=UCX6OQ3DkcsbYNE6H8uQQuVA" \
--data-urlencode "contentType=shorts" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Channel playlists / releases / podcasts1 credit
/youtube/v3/channel/playlistsA channel's playlists, music releases or podcasts. Paginated.
| Parameter | Type | Description |
|---|---|---|
channelIdrequired | string | Channel ID. |
contentTyperequired | enum | playlists, releases or podcasts. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.channel.<contentType>.contents and …nextToken.
const params = new URLSearchParams({
channelId: "UCX6OQ3DkcsbYNE6H8uQQuVA",
contentType: "playlists",
});
const res = await fetch(`https://api-host/youtube/v3/channel/playlists?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/channel/playlists",
params={
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"contentType": "playlists",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"channelId" => "UCX6OQ3DkcsbYNE6H8uQQuVA",
"contentType" => "playlists",
]);
$ch = curl_init("https://api-host/youtube/v3/channel/playlists?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/channel/playlists" \
--data-urlencode "channelId=UCX6OQ3DkcsbYNE6H8uQQuVA" \
--data-urlencode "contentType=playlists" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Channel community posts1 credit
/youtube/v3/channel/postsA channel's community posts. Paginated.
| Parameter | Type | Description |
|---|---|---|
channelIdrequired | string | Channel ID. |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.channel.posts.contents and metadata.channel.posts.nextToken.
const params = new URLSearchParams({
channelId: "UCX6OQ3DkcsbYNE6H8uQQuVA",
});
const res = await fetch(`https://api-host/youtube/v3/channel/posts?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/channel/posts",
params={
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"channelId" => "UCX6OQ3DkcsbYNE6H8uQQuVA",
]);
$ch = curl_init("https://api-host/youtube/v3/channel/posts?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/channel/posts" \
--data-urlencode "channelId=UCX6OQ3DkcsbYNE6H8uQQuVA" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Channel ID from handle1 credit
/youtube/v3/channel/id-from-handleResolve an @handle to its channel ID.
| Parameter | Type | Description |
|---|---|---|
handlerequired | string | Channel handle, with or without @, e.g. @MrBeast. |
Returns: metadata.channel.channelId.
const params = new URLSearchParams({
handle: "@MrBeast",
});
const res = await fetch(`https://api-host/youtube/v3/channel/id-from-handle?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/channel/id-from-handle",
params={
"handle": "@MrBeast",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"handle" => "@MrBeast",
]);
$ch = curl_init("https://api-host/youtube/v3/channel/id-from-handle?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/channel/id-from-handle" \
--data-urlencode "handle=@MrBeast" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Hashtag feed1 credit
/youtube/v3/hashtagVideos published under a hashtag. Paginated.
| Parameter | Type | Description |
|---|---|---|
tagrequired | string | Hashtag without # (case-insensitive). |
nextTokenoptional | string | Opaque pagination token from the previous page. Valid for about 15 minutes. Omit for the first page. |
langoptional | string | Two-letter language code used for localized text, e.g. en, fr, pt. See language codes. |
Returns: metadata.hashtag.contents and metadata.hashtag.nextToken.
const params = new URLSearchParams({
tag: "programming",
});
const res = await fetch(`https://api-host/youtube/v3/hashtag?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/youtube/v3/hashtag",
params={
"tag": "programming",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"tag" => "programming",
]);
$ch = curl_init("https://api-host/youtube/v3/hashtag?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/youtube/v3/hashtag" \
--data-urlencode "tag=programming" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Post / reel details1 credit
/instagram/v3/media/post/detailsMedia of a post, reel or carousel: videos, audio tracks, images and optional render configs, plus caption, owner and comments preview.
| Parameter | Type | Description |
|---|---|---|
shortcoderequired | string | The code in the post URL: instagram.com/p/C0j2L9yS9-Z/ or /reel/…/. |
renderableFormatsoptional | csv<RenderableFormat> | Comma-separated qualities to prepare as single MP4 files with audio, e.g. 720p or highres. See renderable formats. |
countryCodeoptional | string | Two-letter country code (case-insensitive) used for geo-specific content, e.g. us, gb, or worldwide. See country codes. |
Returns: One contents[] entry per carousel item (videos, audios, images, renderableVideos); metadata.title (caption), thumbnailUrl, author, comments, additionalData.
const params = new URLSearchParams({
shortcode: "C0j2L9yS9-Z",
renderableFormats: "highres",
});
const res = await fetch(`https://api-host/instagram/v3/media/post/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/instagram/v3/media/post/details",
params={
"shortcode": "C0j2L9yS9-Z",
"renderableFormats": "highres",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"shortcode" => "C0j2L9yS9-Z",
"renderableFormats" => "highres",
]);
$ch = curl_init("https://api-host/instagram/v3/media/post/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/instagram/v3/media/post/details" \
--data-urlencode "shortcode=C0j2L9yS9-Z" \
--data-urlencode "renderableFormats=highres" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Audio (reels using a sound)1 credit
/instagram/v3/media/audio/detailsReels that use a given original sound or music track, with their media.
| Parameter | Type | Description |
|---|---|---|
audioIdrequired | string | The ID in instagram.com/reels/audio/123456789/. |
Returns: contents[] (one per reel) and metadata.additionalData (audio/track info).
const params = new URLSearchParams({
audioId: "1234567890123456",
});
const res = await fetch(`https://api-host/instagram/v3/media/audio/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/instagram/v3/media/audio/details",
params={
"audioId": "1234567890123456",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"audioId" => "1234567890123456",
]);
$ch = curl_init("https://api-host/instagram/v3/media/audio/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/instagram/v3/media/audio/details" \
--data-urlencode "audioId=1234567890123456" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Profile details5 credits
/instagram/v3/user/profile/detailsPublic profile of an account: bio, profile picture, follower/following/post counts, verification and category.
| Parameter | Type | Description |
|---|---|---|
usernamerequired | string | Instagram username without @. |
Costs 5 credits per successful request.
Returns: metadata.author.
const params = new URLSearchParams({
username: "instagram",
});
const res = await fetch(`https://api-host/instagram/v3/user/profile/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/instagram/v3/user/profile/details",
params={
"username": "instagram",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"username" => "instagram",
]);
$ch = curl_init("https://api-host/instagram/v3/user/profile/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/instagram/v3/user/profile/details" \
--data-urlencode "username=instagram" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"User ID from username5 credits
/instagram/v3/user/profile/id-from-usernameResolve a username to its numeric user ID.
| Parameter | Type | Description |
|---|---|---|
usernamerequired | string | Instagram username without @. |
Costs 5 credits per successful request.
Returns: metadata.author.userId, metadata.author.username.
const params = new URLSearchParams({
username: "instagram",
});
const res = await fetch(`https://api-host/instagram/v3/user/profile/id-from-username?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/instagram/v3/user/profile/id-from-username",
params={
"username": "instagram",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"username" => "instagram",
]);
$ch = curl_init("https://api-host/instagram/v3/user/profile/id-from-username?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/instagram/v3/user/profile/id-from-username" \
--data-urlencode "username=instagram" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Post / video / reel details1 credit
/facebook/v3/post/detailsMedia of a public post, video, watch link or reel: SD/HD progressive files, separate DASH video and audio streams, photos and optional render configs.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Public Facebook URL. You may paste text that contains a link; the first URL found is used. Must be a Facebook link. |
renderableFormatsoptional | csv<RenderableFormat> | Comma-separated qualities to prepare as single MP4 files with audio, e.g. 720p or highres. See renderable formats. |
Returns: contents[] with videos (native_hd, native_sd and per-resolution streams), audios, images, renderableVideos; metadata.title, thumbnailUrl, author, additionalData.
const params = new URLSearchParams({
url: "https://www.facebook.com/watch/?v=1234567890",
renderableFormats: "720p",
});
const res = await fetch(`https://api-host/facebook/v3/post/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/facebook/v3/post/details",
params={
"url": "https://www.facebook.com/watch/?v=1234567890",
"renderableFormats": "720p",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.facebook.com/watch/?v=1234567890",
"renderableFormats" => "720p",
]);
$ch = curl_init("https://api-host/facebook/v3/post/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/facebook/v3/post/details" \
--data-urlencode "url=https://www.facebook.com/watch/?v=1234567890" \
--data-urlencode "renderableFormats=720p" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Profile details1 credit
/facebook/v3/profile/detailsPublic profile or page information.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Public Facebook URL. You may paste text that contains a link; the first URL found is used. Must be a Facebook link. |
Returns: metadata.author.
const params = new URLSearchParams({
url: "https://www.facebook.com/zuck",
});
const res = await fetch(`https://api-host/facebook/v3/profile/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/facebook/v3/profile/details",
params={
"url": "https://www.facebook.com/zuck",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.facebook.com/zuck",
]);
$ch = curl_init("https://api-host/facebook/v3/profile/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/facebook/v3/profile/details" \
--data-urlencode "url=https://www.facebook.com/zuck" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Profile ID1 credit
/facebook/v3/profile/idResolve a profile or page URL to its numeric ID.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Public Facebook URL. You may paste text that contains a link; the first URL found is used. Must be a Facebook link. |
Returns: metadata.author.profileId.
const params = new URLSearchParams({
url: "https://www.facebook.com/zuck",
});
const res = await fetch(`https://api-host/facebook/v3/profile/id?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/facebook/v3/profile/id",
params={
"url": "https://www.facebook.com/zuck",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.facebook.com/zuck",
]);
$ch = curl_init("https://api-host/facebook/v3/profile/id?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/facebook/v3/profile/id" \
--data-urlencode "url=https://www.facebook.com/zuck" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Profile “About”1 credit
/facebook/v3/profile/aboutThe public About section of a profile or page.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Public Facebook URL. You may paste text that contains a link; the first URL found is used. Must be a Facebook link. |
Returns: metadata.author.about.
const params = new URLSearchParams({
url: "https://www.facebook.com/zuck",
});
const res = await fetch(`https://api-host/facebook/v3/profile/about?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/facebook/v3/profile/about",
params={
"url": "https://www.facebook.com/zuck",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.facebook.com/zuck",
]);
$ch = curl_init("https://api-host/facebook/v3/profile/about?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/facebook/v3/profile/about" \
--data-urlencode "url=https://www.facebook.com/zuck" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Profile reels1 credit
/facebook/v3/profile/reelsReels published by a profile or page.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Public Facebook URL. You may paste text that contains a link; the first URL found is used. Must be a Facebook link. |
Returns: metadata.author.reels.
const params = new URLSearchParams({
url: "https://www.facebook.com/zuck",
});
const res = await fetch(`https://api-host/facebook/v3/profile/reels?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/facebook/v3/profile/reels",
params={
"url": "https://www.facebook.com/zuck",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.facebook.com/zuck",
]);
$ch = curl_init("https://api-host/facebook/v3/profile/reels?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/facebook/v3/profile/reels" \
--data-urlencode "url=https://www.facebook.com/zuck" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Profile photos1 credit
/facebook/v3/profile/photosPublic photos of a profile or page.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Public Facebook URL. You may paste text that contains a link; the first URL found is used. Must be a Facebook link. |
Returns: metadata.author.photos.
const params = new URLSearchParams({
url: "https://www.facebook.com/zuck",
});
const res = await fetch(`https://api-host/facebook/v3/profile/photos?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/facebook/v3/profile/photos",
params={
"url": "https://www.facebook.com/zuck",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.facebook.com/zuck",
]);
$ch = curl_init("https://api-host/facebook/v3/profile/photos?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/facebook/v3/profile/photos" \
--data-urlencode "url=https://www.facebook.com/zuck" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"TikTok
Post details1 credit
/tiktok/v3/post/detailsVideo in every available quality, photo-mode images, the sound, and a render config to extract the audio as a file.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Public TikTok video or photo post URL (short vm.tiktok.com links work too). |
Returns: contents[0].videos (main file + each bitrate), images (photo posts), audios, renderableAudios; metadata.title, thumbnailUrl, author, additionalData (stats, music, hashtags…).
const params = new URLSearchParams({
url: "https://www.tiktok.com/@username/video/7300000000000000000",
});
const res = await fetch(`https://api-host/tiktok/v3/post/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/tiktok/v3/post/details",
params={
"url": "https://www.tiktok.com/@username/video/7300000000000000000",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.tiktok.com/@username/video/7300000000000000000",
]);
$ch = curl_init("https://api-host/tiktok/v3/post/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/tiktok/v3/post/details" \
--data-urlencode "url=https://www.tiktok.com/@username/video/7300000000000000000" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"User details1 credit
/tiktok/v3/user/detailsPublic profile and statistics of a TikTok account.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Profile URL, e.g. https://www.tiktok.com/@username. |
Returns: metadata.title, thumbnailUrl, author.user, author.stats, author.statsV2, additionalData.
const params = new URLSearchParams({
url: "https://www.tiktok.com/@tiktok",
});
const res = await fetch(`https://api-host/tiktok/v3/user/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/tiktok/v3/user/details",
params={
"url": "https://www.tiktok.com/@tiktok",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"url" => "https://www.tiktok.com/@tiktok",
]);
$ch = curl_init("https://api-host/tiktok/v3/user/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/tiktok/v3/user/details" \
--data-urlencode "url=https://www.tiktok.com/@tiktok" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Dailymotion
Video details1 credit
/dailymotion/v3/video/detailsStreaming variants of a video plus render configs that turn a stream into a normal MP4 (video) or M4A (audio) file.
| Parameter | Type | Description |
|---|---|---|
videoIdrequired | string | ID in dailymotion.com/video/x8abc12 or dai.ly/x8abc12. |
renderableFormatsoptional | csv<RenderableFormat> | Qualities to convert to MP4. Use heights such as 380, 480, 720, 1080 (matched against the stream labels) or lowres / midres / highres / all. |
countryCodeoptional | string | Country to fetch from. If omitted and the video is geo-restricted, an allowed country is picked automatically. |
The videos links are HLS playlists (.m3u8). To get a single downloadable file, use a renderableVideos or renderableAudios item.
Returns: contents[0].videos (HLS playlists, labelled like hls-720), renderableVideos, renderableAudios; metadata.title, thumbnailUrl, additionalData.
const params = new URLSearchParams({
videoId: "x8abc12",
renderableFormats: "720",
});
const res = await fetch(`https://api-host/dailymotion/v3/video/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/dailymotion/v3/video/details",
params={
"videoId": "x8abc12",
"renderableFormats": "720",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"videoId" => "x8abc12",
"renderableFormats" => "720",
]);
$ch = curl_init("https://api-host/dailymotion/v3/video/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/dailymotion/v3/video/details" \
--data-urlencode "videoId=x8abc12" \
--data-urlencode "renderableFormats=720" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Pin details1 credit
/pinterest/v3/pin/detailsImages (every size) and videos of a pin, including multi-page idea/story pins.
| Parameter | Type | Description |
|---|---|---|
pinIdrequired | string | Numeric ID in pinterest.com/pin/1234567890/. |
countryCodeoptional | string | Two-letter country code (case-insensitive) used for geo-specific content, e.g. us, gb, or worldwide. See country codes. |
Returns: One contents[] entry per story page (images, videos) followed by the main image with all size variants; metadata.title, thumbnailUrl, author (pinner, originPinner, nativeCreator), additionalData.
const params = new URLSearchParams({
pinId: "1234567890123456789",
});
const res = await fetch(`https://api-host/pinterest/v3/pin/details?${params}`, {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
});
const data = await res.json();
if (data.error) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import requests
res = requests.get(
"https://api-host/pinterest/v3/pin/details",
params={
"pinId": "1234567890123456789",
},
headers={
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "api-host",
},
timeout=120,
)
data = res.json()
if data["error"]:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$query = http_build_query([
"pinId" => "1234567890123456789",
]);
$ch = curl_init("https://api-host/pinterest/v3/pin/details?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: api-host",
],
]);
$data = json_decode(curl_exec($ch), true);
if ($data["error"]) {
throw new RuntimeException($data["error"]["code"] . ": " . $data["error"]["message"]);
}
print_r($data);curl --get "https://api-host/pinterest/v3/pin/details" \
--data-urlencode "pinId=1234567890123456789" \
--header "X-RapidAPI-Key: YOUR_API_KEY" \
--header "X-RapidAPI-Host: api-host"Render URLs
Every successful renderable item carries a renderConfig with three URLs. They need no API key and cost no extra credits. Use them exactly as returned; the host and path are opaque and may change.
Start renderno auth
{renderConfig.executionUrl}Starts the render, or attaches to it if it is already running or finished. Safe to call repeatedly.
| HTTP | Meaning |
|---|---|
202 | New render started. Body: RenderStartResponse with status: "queued". |
200 | The render already exists (running or done). Body: RenderStartResponse with status: "already_exists". |
4xx / 5xx | The URL was modified or is invalid, or a temporary server problem. Request a fresh renderConfig or retry. |
const res = await fetch(renderConfig.executionUrl);
const start = await res.json(); // 202 = new job, 200 = already exists
console.log(start.jobId, start.status);import requests
start = requests.get(render_config["executionUrl"], timeout=60).json()
print(start["jobId"], start["status"])<?php
$start = json_decode(file_get_contents($renderConfig["executionUrl"]), true);
echo $start["jobId"], " ", $start["status"], PHP_EOL;curl "$EXECUTION_URL"Status stream (WebSocket)no auth
{renderConfig.statusUrl}Open a WebSocket; the server sends a RenderStatusEvent as a JSON text frame about every second and closes the connection after done, failed or not_found. The client does not need to send anything.
const ws = new WebSocket(renderConfig.statusUrl);
ws.onmessage = (event) => {
const job = JSON.parse(event.data);
console.log(job.status, job.progress);
if (job.status === "done") console.log("Download:", job.output.url);
if (job.status === "failed" || job.status === "not_found") console.error(job.error);
};# pip install websockets
import asyncio, json, websockets
async def watch(url):
async with websockets.connect(url) as ws:
async for message in ws:
job = json.loads(message)
print(job["status"], job.get("progress"))
if job["status"] in ("done", "failed", "not_found"):
return job
job = asyncio.run(watch(render_config["statusUrl"]))<?php
// composer require textalk/websocket:^1.5
require __DIR__ . "/vendor/autoload.php";
$client = new WebSocket\Client($renderConfig["statusUrl"], ["timeout" => 900]);
while (true) {
$job = json_decode($client->receive(), true);
echo $job["status"], " ", $job["progress"] ?? "", PHP_EOL;
if (in_array($job["status"], ["done", "failed", "not_found"], true)) {
break;
}
}
$client->close();Status stream (Server-Sent Events)no auth
{renderConfig.sseStatusUrl}A GET request that stays open and streams text/event-stream. Each event's data line is a JSON RenderStatusEvent. The stream ends after a final status.
function watchRender(sseUrl) {
return new Promise((resolve, reject) => {
const events = new EventSource(sseUrl);
events.onmessage = (event) => {
const job = JSON.parse(event.data);
console.log(job.status, job.progress);
if (job.status === "done") { events.close(); resolve(job.output); }
if (job.status === "failed" || job.status === "not_found") { events.close(); reject(new Error(job.error)); }
};
});
}
const output = await watchRender(renderConfig.sseStatusUrl);
console.log("Download:", output.url);import json, requests
def watch_render(sse_url):
with requests.get(sse_url, stream=True, timeout=900) as stream:
for line in stream.iter_lines(decode_unicode=True):
if not line or not line.startswith("data:"):
continue
job = json.loads(line[5:])
print(job["status"], job.get("progress"))
if job["status"] == "done":
return job["output"]
if job["status"] in ("failed", "not_found"):
raise RuntimeError(job.get("error"))
output = watch_render(render_config["sseStatusUrl"])
print("Download:", output["url"])<?php
function watchRender(string $sseUrl): array
{
$buffer = "";
$final = null;
$ch = curl_init($sseUrl);
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ["Accept: text/event-stream"],
CURLOPT_TIMEOUT => 900,
CURLOPT_WRITEFUNCTION => function ($ch, string $chunk) use (&$buffer, &$final) {
$buffer .= $chunk;
while (($pos = strpos($buffer, "\n\n")) !== false) {
$event = substr($buffer, 0, $pos);
$buffer = substr($buffer, $pos + 2);
foreach (explode("\n", $event) as $line) {
if (!str_starts_with($line, "data:")) {
continue;
}
$job = json_decode(trim(substr($line, 5)), true);
echo $job["status"], " ", $job["progress"] ?? "", PHP_EOL;
if (in_array($job["status"], ["done", "failed", "not_found"], true)) {
$final = $job;
return 0; // stop reading, the job has finished
}
}
}
return strlen($chunk);
},
]);
curl_exec($ch);
if ($final === null) {
throw new RuntimeException("Status stream ended unexpectedly");
}
if ($final["status"] !== "done") {
throw new RuntimeException($final["error"] ?? "Render failed");
}
return $final["output"];
}
$output = watchRender($renderConfig["sseStatusUrl"]);
echo "Download: ", $output["url"], PHP_EOL;curl -N "$SSE_STATUS_URL"
# data: {"job_id":"…","status":"downloading_inputs","progress":22,"output":null,"error":null,…}
# data: {"job_id":"…","status":"done","progress":100,"output":{"url":"https://…","size":98234112,"sizeText":"93.68 MB",…},…}Objects
ExtractionResult
The envelope returned by every data endpoint.
| Field | Type | Description |
|---|---|---|
error | Error | null | null on success. When set, treat the rest of the body as empty. |
contents | ExtractedContent[] | undefined | Downloadable media. One entry per media item (a carousel or multi-page pin has several). Absent for metadata-only endpoints (search, comments, profiles…). |
metadata | ContentMetadata | Everything that is not a file: title, author, lists, search results… |
notes | string[] | undefined | Human-readable notes, e.g. how many credits the request cost. |
{
"error": null,
"contents": [ { "videos": [], "audios": [], "renderableVideos": [] } ],
"metadata": { "title": "…", "thumbnailUrl": "…", "author": {} },
"notes": ["Endpoint cost: 1 credit."]
}ExtractedContent
Media for one item. Each list is present only when that kind of media exists.
| Field | Type | Description |
|---|---|---|
videos | MediaItem[] | Video files or streams. Check metadata.has_audio: many high-quality streams are video-only. |
audios | MediaItem[] | Audio-only streams. |
images | MediaItem[] | Images / photos / thumbnails in the available sizes. |
renderableVideos | RenderableMediaItem[] | Qualities you asked for with renderableFormats that can be rendered into one MP4 with audio. See Render URLs. |
renderableAudios | RenderableMediaItem[] | Audio that can be extracted into a standalone file (TikTok, Dailymotion). |
MediaItem
| Field | Type | Description |
|---|---|---|
label | string | Human-readable quality, e.g. 1080p, 720p60, native_hd, 1080x1350, medium 128KBps english. |
url | string | Temporary download/stream link. Do not store it long-term: request the endpoint again when it expires (typically 403 or 410). |
repId | string | Stable identifier of this representation, useful as a cache key or React key. |
metadata | MediaMetadata | Technical details. |
MediaMetadata
Always contains the fields below. Platform-specific extras (bitrate, fps, codecs, itag, audio_quality, language…) are passed through as well.
| Field | Type | Description |
|---|---|---|
mime_type | string | e.g. video/mp4; codecs="avc1.640028", audio/mp4, image/jpeg. |
width, height | number | Pixel size (0 for audio). |
has_audio | boolean | Whether the file contains an audio track. |
content_length | number | undefined | Size in bytes when known. |
content_length_text | string | undefined | Readable size, e.g. 45.2 MB (YouTube). |
RenderableMediaItem
Either a success item (has renderConfig) or an error item (has error). Always check which one you received.
| Field | Type | Description |
|---|---|---|
label | string | The quality or format this item is for. |
renderConfig | RenderConfig | Success only. URLs to start and watch the render. |
repId | string | Success only. Identifier of the render; it is also the jobId you see in render status events. |
metadata | MediaMetadata | Success only. Details of the resulting file (has_audio: true, combined content_length). |
error | string | Error only. Why this format could not be prepared, e.g. not available, over your plan's size limit, or beyond your plan's number of renderables. |
[
{
"label": "1080p",
"repId": "a1b2c3…",
"renderConfig": {
"executionUrl": "https://render-host/…",
"statusUrl": "wss://render-host/…",
"sseStatusUrl": "https://render-host/…"
},
"metadata": { "mime_type": "video/mp4; codecs=\"avc1.640028, mp4a.40.2\"", "width": 1920, "height": 1080, "has_audio": true, "content_length": 98234112 }
},
{ "label": "2160p", "error": "No available video for format '2160p' within the subscription size limit." }
]RenderConfig
| Field | Type | Description |
|---|---|---|
executionUrl | string (https) | Call with GET to start (or re-attach to) the render. No API key needed; the URL itself is the credential, so keep it private. |
statusUrl | string (wss) | WebSocket that streams progress events until the job is done or failed. |
sseStatusUrl | string (https) | Same events as Server-Sent Events, for environments without WebSockets. |
Treat all three URLs as opaque: use them exactly as returned and don't build them yourself.
ContentMetadata
All fields are optional; which ones appear depends on the endpoint (see Returns on each endpoint).
| Field | Type | Description |
|---|---|---|
title | string | Title, caption or description. |
thumbnailUrl | string | Best available thumbnail/cover image. |
author | object | Creator, channel owner or profile data. |
comments | object | Comments (with nextToken when paginated). |
playlist | object | info, videos, messages, nextToken. |
channel | object | Channel profile, or lists keyed by content type (videos, shorts, posts…). |
post | object | Community post. |
hashtag | object | contents, nextToken. |
transcript | TranscriptInfo | Transcript (YouTube video details). |
additionalData | object | Everything else the platform exposes (statistics, dates, keywords, search results…). Shapes follow the source platform and can gain fields over time. |
TranscriptInfo
| Field | Type | Description |
|---|---|---|
languages | string[] | Available transcript languages. Pass one as transcriptLanguage. Returned even when getTranscript is false. |
selectedLanguage | string | Language of the returned transcript. |
transcript | object | Transcript content as timed text segments. |
error | string | Set when the transcript could not be fetched (the rest of the response is still valid). |
RenderStartResponse
Returned by executionUrl.
| Field | Type | Description |
|---|---|---|
jobId | string | Render job id (same as the renderable item's repId). |
status | queued | already_exists | Whether a new render started or an existing one was found. |
message | string | Human-readable summary. |
statusUrl | string (wss) | WebSocket status stream (same as renderConfig.statusUrl). |
sseStatusUrl | string (https) | Server-Sent Events status stream. |
{
"jobId": "a1b2c3…",
"status": "queued",
"message": "Job accepted for processing.",
"statusUrl": "wss://render-host/…",
"sseStatusUrl": "https://render-host/…"
}RenderStatusEvent
| Field | Type | Description |
|---|---|---|
job_id | string | Render job id. |
status | enum | pending, queued, downloading_inputs, processing, uploading_output, done, failed. See job statuses. |
progress | integer | Overall progress, 0–100. |
output | RenderOutput | null | Set when status is done. |
error | string | null | Reason, when status is failed. |
created_at | string (date-time) | When the render was first created. |
expires_at | string (date-time) | When the render and its file are deleted. |
{
"job_id": "a1b2c3…",
"status": "done",
"progress": 100,
"output": {
"url": "https://…",
"size": 98234112,
"sizeText": "93.68 MB",
"key": "…"
},
"error": null,
"created_at": "2026-09-23T12:00:00.000Z",
"expires_at": "2026-09-23T13:00:00.000Z"
}If no render exists for the id (never started, or expired), a single event is sent and the stream closes:
{ "id": "a1b2c3…", "status": "not_found", "error": "Job with ID 'a1b2c3…' not found." }RenderOutput
| Field | Type | Description |
|---|---|---|
url | string (https) | Download link for the finished file, valid until expires_at. Browsers save it with a readable file name. |
size | integer | File size in bytes. |
sizeText | string | Readable size, e.g. 93.68 MB. |
key | string | Internal file reference. Don't rely on its format. |
Error
| Field | Type | Description |
|---|---|---|
message | string | Human-readable description. |
code | string | Stable machine-readable code. See error codes. |
statusCode | number | null | Suggested HTTP status, when relevant. |
{
"error": { "message": "videoId not found.", "code": "params_not_found", "statusCode": null }
}Paginated list
List endpoints return the page items together with a nextToken. Pass it back unchanged to get the next page; it is null on the last page.
{
"error": null,
"metadata": {
"channel": {
"videos": {
"contents": [ /* items */ ],
"nextToken": "eyJpdGVyYXRpb24…" // null when there are no more pages
}
}
}
}Enums
RenderableFormat
| Value | Meaning |
|---|---|
lowres | Smallest quality that fits your plan. |
midres | The middle quality among those that fit your plan. |
highres | Largest quality that fits your plan's size limit. |
all | Every distinct resolution, lowest first, up to your plan's renderable count. |
all_highres | Every distinct resolution, highest first, up to your plan's renderable count. |
| Platform | Specific values |
|---|---|
| YouTube | 144p, 240p, 360p, 480p, 720p, 720p60, 1080p, 1080p60, 1440p, 1440p60, 2160p, 2160p60, and HDR variants such as 1080p60 HDR (URL-encode the space as %20). Must match a video label exactly. |
| Instagram, Facebook | 144p, 240p, 360p, 480p, 720p, 1080p. |
| Dailymotion | Heights such as 240, 380, 480, 720, 1080; matched against stream labels like hls-720. |
Only the first N requested formats are prepared, where N is your plan's renderable limit; the rest come back as error items. Formats larger than your plan's size limit are skipped. See plans.
Field
Used by fields on YouTube video details. Prefix with - to exclude.
contentscontents.videoscontents.audioscontents.imagescontents.renderableVideoscontents.renderableAudiosmetadatametadata.authormetadata.commentsmetadata.playlistmetadata.channelmetadata.postmetadata.hashtagmetadata.transcriptmetadata.additionalData
Other enums
| Parameter | Values |
|---|---|
urlAccess | normal · proxied |
getTranscript | true · false |
sortBy (comments) | TOP_COMMENTS · NEWEST_FIRST |
contentType (channel videos) | videos · shorts · livestreams |
contentType (channel playlists) | playlists · releases · podcasts |
uploadDate | all · today · week · month · year |
prioritize | relevance · popularity |
duration | all · under_three_mins · three_to_twenty_mins · over_twenty_mins |
features | 360 · 3d · 4k · creative_commons · hd · hdr · live · location · purchased · subtitles · vr180 |
Countries & languages
countryCode accepts ISO 3166-1 alpha-2 codes (any case) plus worldwide. lang accepts two-letter ISO 639-1 codes (lowercase is applied for you).
250 country codes
ad · Andorraae · United Arab Emiratesaf · Afghanistanag · Antigua and Barbudaai · Anguillaal · Albaniaam · Armeniaao · Angolaaq · Antarcticaar · Argentinaas · American Samoaat · Austriaau · Australiaaw · Arubaax · Åland Islandsaz · Azerbaijanba · Bosnia and Herzegovinabb · Barbadosbd · Bangladeshbe · Belgiumbf · Burkina Fasobg · Bulgariabh · Bahrainbi · Burundibj · Beninbl · Saint Barthélemybm · Bermudabn · Bruneibo · Boliviabq · Caribbean Netherlandsbr · Brazilbs · Bahamasbt · Bhutanbv · Bouvet Islandbw · Botswanaby · Belarusbz · Belizeca · Canadacc · Cocos (Keeling) Islandscd · DR Congocf · Central African Republiccg · Republic of the Congoch · Switzerlandci · Ivory Coastck · Cook Islandscl · Chilecm · Camerooncn · Chinaco · Colombiacr · Costa Ricacu · Cubacv · Cape Verdecw · Curaçaocx · Christmas Islandcy · Cypruscz · Czechiade · Germanydj · Djiboutidk · Denmarkdm · Dominicado · Dominican Republicdz · Algeriaec · Ecuadoree · Estoniaeg · Egypteh · Western Saharaer · Eritreaes · Spainet · Ethiopiafi · Finlandfj · Fijifk · Falkland Islandsfm · Micronesiafo · Faroe Islandsfr · Francega · Gabongb · United Kingdomgd · Grenadage · Georgiagf · French Guianagg · Guernseygh · Ghanagi · Gibraltargl · Greenlandgm · Gambiagn · Guineagp · Guadeloupegq · Equatorial Guineagr · Greecegs · South Georgiagt · Guatemalagu · Guamgw · Guinea-Bissaugy · Guyanahk · Hong Konghm · Heard Island and McDonald Islandshn · Hondurashr · Croatiaht · Haitihu · Hungaryid · Indonesiaie · Irelandil · Israelim · Isle of Manin · Indiaio · British Indian Ocean Territoryiq · Iraqir · Iranis · Icelandit · Italyje · Jerseyjm · Jamaicajo · Jordanjp · Japanke · Kenyakg · Kyrgyzstankh · Cambodiaki · Kiribatikm · Comoroskn · Saint Kitts and Neviskp · North Koreakr · South Koreakw · Kuwaitky · Cayman Islandskz · Kazakhstanla · Laoslb · Lebanonlc · Saint Luciali · Liechtensteinlk · Sri Lankalr · Liberials · Lesotholt · Lithuanialu · Luxembourglv · Latvialy · Libyama · Moroccomc · Monacomd · Moldovame · Montenegromf · Saint Martinmg · Madagascarmh · Marshall Islandsmk · North Macedoniaml · Malimm · Myanmarmn · Mongoliamo · Macaump · Northern Mariana Islandsmq · Martiniquemr · Mauritaniams · Montserratmt · Maltamu · Mauritiusmv · Maldivesmw · Malawimx · Mexicomy · Malaysiamz · Mozambiquena · Namibianc · New Caledoniane · Nigernf · Norfolk Islandng · Nigeriani · Nicaraguanl · Netherlandsno · Norwaynp · Nepalnr · Naurunu · Niuenz · New Zealandom · Omanpa · Panamape · Perupf · French Polynesiapg · Papua New Guineaph · Philippinespk · Pakistanpl · Polandpm · Saint Pierre and Miquelonpn · Pitcairn Islandspr · Puerto Ricops · Palestinept · Portugalpw · Palaupy · Paraguayqa · Qatarre · Réunionro · Romaniars · Serbiaru · Russiarw · Rwandasa · Saudi Arabiasb · Solomon Islandssc · Seychellessd · Sudanse · Swedensg · Singaporesh · Saint Helenasi · Sloveniasj · Svalbard and Jan Mayensk · Slovakiasl · Sierra Leonesm · San Marinosn · Senegalso · Somaliasr · Surinamess · South Sudanst · São Tomé and Príncipesv · El Salvadorsx · Sint Maartensy · Syriasz · Eswatinitc · Turks and Caicos Islandstd · Chadtf · French Southern Territoriestg · Togoth · Thailandtj · Tajikistantk · Tokelautl · Timor-Lestetm · Turkmenistantn · Tunisiato · Tongatr · Turkeytt · Trinidad and Tobagotv · Tuvalutw · Taiwantz · Tanzaniaua · Ukraineug · Ugandaum · United States Minor Outlying Islandsus · United Statesuy · Uruguayuz · Uzbekistanva · Vatican Cityvc · Saint Vincent and the Grenadinesve · Venezuelavg · British Virgin Islandsvi · U.S. Virgin Islandsvn · Vietnamvu · Vanuatuwf · Wallis and Futunaworldwide · Worldwidews · Samoaye · Yemenyt · Mayotteza · South Africazm · Zambiazw · Zimbabwe
148 language codes
aaafakamarayazbebgbibmbnbscacechcocscvcydadedvdzeeeleneseteufafffifjfofrfygagdglgngugvhahehihohrhthuhyhzidigisitjajvkakgkkklkmknkokukwkylalblglnloltlulvmbmgmhmimkmlmnmrmsmtmynanbndnenlnnnonrnyocomorpaplpsptqurmrnrorurwscsdsgsiskslsmsnsosqsrssstsusvswtatetgthtitktltntotrtstttyukuruzveviwoxhyozhzu