YouTube API

YouTube Search API

Run a YouTube search and get the results as JSON, with the sorting and filters the site itself offers.

  • 100 free credits
  • No card needed
  • No Google Cloud project or OAuth
curl "https://pipefetch.com/v1/youtube/search?q=web+scraping+tutorial&limit=20" \
  -H "x-api-key: YOUR_API_KEY"
The response

What you get

  • Up to 40 results per search, in YouTube's order
  • Videos, Shorts, channels or playlists
  • Title, link, description snippet, duration, views and publish time
  • The channel of every result, with its verification flag
200 OK · application/json
{
  "data": {
    "query": "web scraping tutorial",
    "results": [
      {
        "type": "video",
        "id": "QhD015WUMxE",
        "url": "https://www.youtube.com/watch?v=QhD015WUMxE",
        "title": "Beginners Guide To Web Scraping with Python - All You Need To Know",
        "description": "The web is full of data. Lots and lots of data. Data prime for scraping. But manually going to a website and copying and pasting the ...",
        "publishedAt": "2022-05-19T14:34:23.927Z",
        "publishedAtPrecision": "estimated",
        "durationSeconds": 456,
        "viewCount": 491436,
        "viewCountIsExact": true,
        "isLive": false,
        "thumbnailUrl": "https://i.ytimg.com/vi/QhD015WUMxE/hq720.jpg",
        "position": 1,
        "channel": {
          "id": "UCZDA1kA3y3EIg25BpcHSpwQ",
          "name": "Tinkernut",
          "handle": "@Tinkernut",
          "url": "https://www.youtube.com/@Tinkernut",
          "isVerified": true
        }
      },
      {
        "type": "video",
        "id": "hHQlcnubuFI",
        "url": "https://www.youtube.com/watch?v=hHQlcnubuFI",
        "title": "Learn Web Scraping in 5 Minutes (NO PRIOR KNOWLEDGE)",
        "description": "Get Rid of IP Blocking for just $1 with DataImpulse: ...",
        "publishedAt": "2026-03-04T12:19:23.927Z",
        "publishedAtPrecision": "estimated",
        "durationSeconds": 293,
        "viewCount": 191388,
        "viewCountIsExact": true,
        "isLive": false,
        "thumbnailUrl": "https://i.ytimg.com/vi/hHQlcnubuFI/hq720.jpg",
        "position": 2,
        "channel": {
          "id": "UCFVteOob_YXJHPaGTqlDV2Q",
          "name": "CodeHead",
          "handle": "@codehead01",
          "url": "https://www.youtube.com/@codehead01",
          "isVerified": true
        }
      }
    ]
  },
  "credits": {
    "used": 1,
    "remaining": 99
  }
}
Reference

One GET request

Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.

GET/v1/youtube/search

Costs 1 credit per request. Only requests that return data are charged.

Parameters

NameTypeDescription
qrequired string The search query.
limitoptional integer How many results to return. Default: 20. From 1 to 40.
typeoptional string Kind of result. One of: video, short, channel, playlist, all. Default: video.
sortoptional string Result order. One of: relevance, popularity, newest, mostViewed. Default: relevance.
uploadedoptional string Only results uploaded within this period. One of: hour, today, week, month, year.
countryoptional string Two-letter country code the search is run for.
langoptional string Interface language code for titles and labels.

Good to know

  • A search with no results answers 404 no_results and costs nothing.

Open the reference

Use cases

What people build with it

  • Keyword and topic research

    See what ranks for a query and how those videos perform.

  • Brand monitoring

    Sort by newest and limit to today to catch new videos that mention your brand.

  • Finding creators

    Search with type=channel to build a list of channels on a topic.

Pricing

Buy credits once. Use them whenever.

This endpoint costs 1 credit per request, and a request that returns no data costs nothing. Move the slider to see what your volume costs.

5,000requests a month
5005,00050,000250,000
5,000video transcripts
5,000searches or video lookups
100,000comments

One credit is one request that returns data. Requests that return nothing are free.

Best fit
Builder pack
12,000 credits, one-time payment
$29once
  • $2.42 per 1,000 requests
  • About $12.08 a month at this pace
  • Lasts about 2.4 months at this pace
  • Credits never expire
Start with 100 free credits

See all packs and what a credit buys

FAQ

Questions and answers

How is this different from search in the official YouTube Data API?

By default the official API lets a project make 100 search.list calls a day; search has its own allowance, separate from the 10,000 daily units for other calls. Here a search costs 1 credit and there is no daily cap.

Are the results the same as on youtube.com?

They are what YouTube returns to a signed-out visitor in the country and language you pass. Personalised results do not apply.

What if a search finds nothing?

The request answers 404 no_results and costs nothing.

What does a search cost?

One request costs 1 credit. Credit packs start at $9 for 3,000 credits, never expire, and a request that returns no data is not charged. New accounts get 100 free credits without a card.

Guides

Step-by-step guides

More

More YouTube APIs

Make your first request in a minute

Sign in, copy your key and call an endpoint. Your account starts with 100 free credits.