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, views, duration 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 · 90.5% in 7 days

5,000 free credits for 21 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": {
        "videos": [
            {
                "title": "How To Cook The Perfect Pasta | Gordon Ramsay",
                "views": "12,110,378 views",
                "duration": "1:32"
            }
        ]
    },
    "success": true
}

YouTube API or the page data?

Official API: open

YouTube has an official API (YouTube Data API v3). Any developer with a Google Cloud project can get a key to search and read public videos, channels, playlists and comments within a daily quota. When you need the public page data instead (fields the API does not return, the official rate limits, or no developer key to apply for), the recipe gives it to you.

Source: YouTube Data API v3 on developers.google.com, checked November 6, 2026.

How to get YouTube data as JSON today

  1. Get a free API key: 5,000 free credits for 21 days, no card.
  2. Send any YouTube page URL with recipe=youtube to the Scrape API (the call).
  3. Get 10 fields as JSON, 5 credits a page, billed only when the call succeeds.

Ujeebu's YouTube recipe returns title, views, duration and 7 more fields from any public YouTube page as JSON: send the URL with recipe=youtube to the Scrape API, 5 credits a page, no YouTube account or partner approval needed.

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-19

{
    "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,110,378 views"
        },
        {
            "duration": "4:15",
            "image": "https://i.ytimg.com/vi/VnwNR5qR9ow/hq720.jpg",
            "published": "8y ago",
            "title": "How to Boil Pasta",
            "url": "https://www.youtube.com/watch?v=VnwNR5qR9ow",
            "views": "355,486 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

YouTube API vs scraping: which one should I use?

Use the official YouTube API when it returns what you need. Any developer with a Google Cloud project can get a key to search and read public videos, channels, playlists and comments within a daily quota. Use the page data when you need what the public page shows: Ujeebu's YouTube recipe returns title, views, duration and 7 more fields from any public YouTube page as JSON: send the URL with recipe=youtube to the Scrape API, 5 credits a page, no YouTube account or partner approval needed.

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, views, duration, image, published. 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, in one call: send recipe=youtube/search with query, sort and no URL. We build the YouTube search URL (returned in the Ujb-Url header), apply recipe=youtube/listing and answer its JSON, at the same credits as the page call. A missing or invalid parameter answers 400 naming it, and that call is free.

Get YouTube data as JSON today.

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