YouTube scraper API: search results and detail pages as JSON
Send any YouTube page URL with recipe=youtube and get title, duration, image and 7 more fields as JSON. No selectors to write, no proxies to pick.
- 2 page types
- 10 fields
- 5 credits a page · $0.50 per 1,000
- Working · 91.2% in 7 days
5,000 free credits for 7 days, no card.
curl -G 'https://api.ujeebu.com/scrape' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://www.youtube.com/results?search_query=cooking+pasta' \
--data-urlencode 'recipe=youtube/listing'
{
"result": {
"title": "How To Cook The Perfect Pasta | Gordon Ramsay",
"duration": "1:32",
"published": "12y ago",
"views": "12,071,276 views"
},
"success": true
}
What you get from YouTube
The fields of each page type and a real sample from our last validation, shortened.
Search and listing pages recipe=youtube/listing 5 credits a page
| Field | Type | Example |
|---|---|---|
videos | list of 3+ items | |
videos[].duration | text | 1:32 |
videos[].image | image URL | https://i.ytimg.com/vi/UYhKDweME3A/hq720.jpg |
videos[].published | text | 12y ago |
videos[].title | text | How To Cook The Perfect Pasta | Gordon Ramsay |
videos[].url | URL | https://www.youtube.com/watch?v=UYhKDweME3A |
videos[].views | text | 12,071,276 views |
Sample answer, validated 2026-11-04
{
"videos": [
{
"duration": "1:32",
"image": "https://i.ytimg.com/vi/UYhKDweME3A/hq720.jpg",
"published": "12y ago",
"title": "How To Cook The Perfect Pasta | Gordon Ramsay",
"url": "https://www.youtube.com/watch?v=UYhKDweME3A",
"views": "12,071,276 views"
},
{
"duration": "0:15",
"image": "https://i.ytimg.com/vi/ADTGM3ODBbo/hq720.jpg",
"published": "1y ago",
"title": "You can never go wrong with this pasta!🤗 #viralshort #recipe #pasta #food",
"url": "https://www.youtube.com/watch?v=ADTGM3ODBbo",
"views": "5,192,296 views"
}
]
}
Detail pages recipe=youtube/detail 5 credits a page
| Field | Type | Example |
|---|---|---|
video.name | text | Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster) |
video.thumbnail | image URL | https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg |
video.uploaded | date | 2009-10-24T23:57:33-07:00 |
description | text | The official video for “Never Gonna Give You Up” by Rick Astley. Ne... |
image | image URL | https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg |
url | URL | https://www.youtube.com/watch?v=dQw4w9WgXcQ |
Sample answer, validated 2026-11-03
{
"video": {
"name": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"uploaded": "2009-10-24T23:57:33-07:00"
},
"description": "The official video for “Never Gonna Give You Up” by Rick Astley. Never: The Autobiography 📚 OUT NOW! Follow this link to get your copy and listen to Rick’s ...",
"image": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
One call
Send the page URL and the recipe name to the Scrape API. The recipe brings the extract rules and the settings that work on YouTube (JavaScript rendering).
curl -G 'https://api.ujeebu.com/scrape' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://www.youtube.com/results?search_query=cooking+pasta' \
--data-urlencode 'recipe=youtube/listing'
import os, requests
r = requests.get(
"https://api.ujeebu.com/scrape",
params={"url": "https://www.youtube.com/results?search_query=cooking+pasta", "recipe": "youtube/listing"},
headers={"ApiKey": os.environ["UJEEBU_API_KEY"]},
timeout=120,
)
print(r.json()["result"])
const params = new URLSearchParams({
url: "https://www.youtube.com/results?search_query=cooking+pasta",
recipe: "youtube/listing",
});
const res = await fetch(`https://api.ujeebu.com/scrape?${params}`, {
headers: { ApiKey: process.env.UJEEBU_API_KEY },
});
console.log((await res.json()).result);
The answer is {"result": {...}} with the headers Ujb-Recipe and Ujb-Credits. Other page types: recipe=youtube/detail, or recipe=youtube and the API picks the page type from the URL. Your own parameters always win over the recipe.
Search YouTube with parameters
Fill in the parameters and we build the YouTube search URL. The Playground and the Request builder do it for you.
| Parameter | Type | Values |
|---|---|---|
query required | string | Search words. |
sort | enum | relevance, newest, views, rating |
Works today: the built URL with recipe=youtube/listing (query=cooking pasta)
GET https://api.ujeebu.com/scrape?url=https%3A%2F%2Fwww.youtube.com%2Fresults%3Fsearch_query%3Dcooking%2520pasta&recipe=youtube%2Flisting
A single call with the parameters and no URL is coming to the API; it is not live yet. Search with parameters in the docs
What people build with YouTube data
Market research
Follow public company pages and job postings to see who grows and hires.
Learn more
Price
Same price as the page call, no fee for the recipe. Only successful responses are billed; blocked, timed-out and failed requests are free.
| Page type | Credits a page | Per 1,000, Starter | Per 1,000, Pro |
|---|---|---|---|
| Search results, Detail page | 5 | $0.82 | $0.50 |
FAQ
What does the YouTube recipe return?
JSON with 10 fields from search results (recipe=youtube/listing) and detail page (recipe=youtube/detail), for example title, duration, image, published, url. The answer is {"result": {...}} with the fields shown on this page.
How much does it cost to scrape YouTube?
5 credits a page ($0.50 per 1,000 on Pro, $0.82 on Starter). Same price as the page call, no fee for the recipe. Only successful responses are billed; blocked, timed-out and failed requests are free.
Do I need proxies or a headless browser?
No. The recipe brings the settings that work on YouTube: JavaScript rendering. Send only the URL and recipe=youtube/listing.
What happens when YouTube changes its pages?
We check YouTube every day and re-validate the recipe on real pages every week, then fix it when the site changes. Until a fix is live, the API answers 404 "the recipe has no working version" instead of empty data, and that call is free.
Can I search YouTube with parameters?
Yes. Fill in query, sort: we build the YouTube search URL, and the call is that URL with recipe=youtube/listing. A single call with the parameters and no URL is coming to the API; it is not live yet.
Related recipes
LinkedInSearch results, Detail page, Profile · 5 credits
X (Twitter)Profile · 5 credits
InstagramProfile · 5 credits
TikTokProfile · 5 credits
FacebookSearch results · 5 credits
BlueskyProfile · 5 credits
Logos and names belong to their owners. Ujeebu is not affiliated with YouTube.
Get YouTube data as JSON today.
5,000 free credits for 7 days. No card.