Search YouTube videos, channels, playlists and shorts
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.youtube.search({ query: "rust tutorial" });
console.log(result.data.results);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.youtube.search(query="rust tutorial")
print(result["data"]["results"])
curl -X POST https://api.stophy.dev/v1/youtube/search \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"query":"rust tutorial"}'
stophy youtube search "rust tutorial"
{
"success": true,
"data": {
"results": [
{
"type": "video",
"videoId": "Wc0ZJo06oAw",
"videoUrl": "https://www.youtube.com/watch?v=Wc0ZJo06oAw",
"title": "The Ultimate Rust Beginners Guide (2026)",
"channelId": "UCt6XPuD8u3YjvybuT-Xnj5A",
"channelName": "SBJake",
"channelUrl": "https://www.youtube.com/channel/UCt6XPuD8u3YjvybuT-Xnj5A",
"channelUsername": "SBJake",
"durationSeconds": 422,
"views": 545124,
"thumbnailUrl": "https://i.ytimg.com/vi/Wc0ZJo06oAw/hqdefault.jpg",
"isShort": false,
"isLive": false,
"publishedAt": "2025-09-30T13:12:21.000Z"
},
{
"type": "video",
"videoId": "BpPEoZW5IiY",
"videoUrl": "https://www.youtube.com/watch?v=BpPEoZW5IiY",
"title": "Learn Rust Programming - Complete Course 🦀",
"channelId": "UC8butISFwT-Wl7EV0hUK0BQ",
"channelName": "freeCodeCamp.org",
"channelUrl": "https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ",
"channelUsername": "freecodecamp",
"durationSeconds": 50350,
"views": 1248090,
"thumbnailUrl": "https://i.ytimg.com/vi/BpPEoZW5IiY/hqdefault.jpg",
"isShort": false,
"isLive": false,
"publishedAt": "2023-10-01T01:33:57.000Z"
}
],
"cursor": "EqIDEg1ydXN0IHR1dG9yaWFs…"
},
"creditsUsed": 1,
"requestId": "2fe9dbad-fc48-4890-9751-0b24b596035b"
}
Endpoints
More ways to call it
Get what a YouTube video says, from its captions
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.youtube.transcript({ videoUrl: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" });
console.log(result.data.text);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.youtube.transcript(video_url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
print(result["data"]["text"])
curl -X POST https://api.stophy.dev/v1/youtube/transcript \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"videoUrl":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
stophy youtube transcript --videoUrl "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Get a profile’s bio, stats and a page of its videos
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.tiktok.profile({ username: "khaby.lame" });
console.log(result.data.results);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.tiktok.profile(username="khaby.lame")
print(result["data"]["results"])
curl -X POST https://api.stophy.dev/v1/tiktok/profile \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"username":"khaby.lame"}'
stophy tiktok profile --username khaby.lame
YouTube search, video details and transcripts work without a key. A YouTube transcript costs 1 credit and comes from the captions. TikTok and Instagram transcripts cost 1 credit when the video has captions and 2 credits plus 1 credit per 10 seconds of audio when it does not: see Credits and billing. TikTok videos over 3 minutes can’t be transcribed. YouTube charts cost 1 credit per 10 results.