Playground Sign in Start free
Recipe Social and video

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.

recipe=youtube/listing
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'
200 OK · JSON
{
    "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

FieldTypeExample
videoslist of 3+ items
videos[].durationtext1:32
videos[].imageimage URLhttps://i.ytimg.com/vi/UYhKDweME3A/hq720.jpg
videos[].publishedtext12y ago
videos[].titletextHow To Cook The Perfect Pasta | Gordon Ramsay
videos[].urlURLhttps://www.youtube.com/watch?v=UYhKDweME3A
videos[].viewstext12,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"
        }
    ]
}

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'

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.

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 typeCredits a pagePer 1,000, StarterPer 1,000, Pro
Search results, Detail page5$0.82$0.50

See all plans

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.

Get YouTube data as JSON today.

5,000 free credits for 7 days. No card.