Skip to the content

Scraper API

YouTube

youtube.searchAvailable

YouTube search

The videos, Shorts, channels and playlists YouTube lists for the query, in its order; or, with type movie, the films of YouTube Movies & TV with their genre, year and credits.

Give it a search query.

1 unit a record, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a record
Inputs
3, 1 required
Record
27 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/youtube.search/runs

{
"input": {
"query": "how to weld aluminum"
}
}

sent, and answered

a record of the run27 fields

{
type: "video"
position: 1
id: "jtvOkI_pvMI"
url: "https://www.youtube.com/watch?v=jtvOkI_pvMI"
title: "How to \"Weld\" Aluminum Without a Welder"
channel_name: "Make Something"
channel_id: "UCtaykeSsGhtn2o2BsPm-rsw"
channel_url: "https://www.youtube.com/@MakeSomething"
channel_handle: "@MakeSomething"
… 18 more fields

ok1 unit a record

A record this scraper returned for this input. The first 9 of its 27 fields are set down here; the whole record is below.

youtube.com
The page YouTube search reads, as a browser shows it
The page this scraper reads, photographed in a browser on 18 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

See who ranks for a query
The videos, channels and playlists YouTube returns for a search, in their order, with views, duration and the channel behind each.
Research a topic
Run the searches your audience makes and read what already answers them: titles, lengths, view counts and how recently each was published.
Find creators in a niche
Search by subject and collect the channels that appear, with their subscriber counts, for a first list to look at.

What you send

A search query. These are its 3 inputs, as its schema has them.

querystring Required
What to search YouTube for.
max_resultsinteger Optional
The most results to return. Results load about 20 at a time, so a larger number takes longer; fewer come back when YouTube has no more.Default 20
typestring Optional
Only results of this kind (YouTube's own Type filter). Leave out for the mixed results YouTube shows by default.

A request, ready to send

It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.

# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/youtube.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"how to weld aluminum"}}'

# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
from enrichednow import EnrichedNow

client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY

# Start a run, wait for it to end, and get its records
result = client.scrape("youtube.search", {"query": "how to weld aluminum"})
print(result.run.id, result.run.status, result.run.record_count)

# Read its records: pages are fetched as you go
for record in result.records:
    print(record)

Install it with pip install enrichednow, then save as run.py and run python3 run.py

import EnrichedNow from "enrichednow";

const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY

// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("youtube.search", { query: "how to weld aluminum" });
console.log(run.id, run.status, run.record_count);

// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);

Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

package main

import (
	"context"
	"fmt"
	"log"
	"time"

	enrichednow "github.com/enrichednow/enrichednow-go"
)

func main() {
	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
	defer cancel()

	// Start a run, wait for it to end, and get its records
	run, records, err := client.Scrape(ctx, "youtube.search", map[string]any{"query": "how to weld aluminum"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(run.ID, run.Status, run.RecordCount)

	// Read its records: pages are fetched as you go
	for records.Next() {
		fmt.Println(string(records.Current()))
	}
	if err := records.Err(); err != nil {
		log.Fatal(err)
	}
}

Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;

public class Run {
    public static void main(String[] args) {
        EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY

        // Start a run, wait for it to end, and get its records
        ScrapeResult result = client.scrape("youtube.search", Map.of("query", "how to weld aluminum"));
        System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());

        // Read its records: pages are fetched as you go
        for (Map<String, Object> record : result.records()) {
            System.out.println(record);
        }
    }
}

Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

enrichednow run youtube.search --input 'query=how to weld aluminum'

Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

What comes back

The videos, Shorts, channels and playlists YouTube lists for the query, in its order; or, with type movie, the films of YouTube Movies & TV with their genre, year and credits. A record has 27 fields. One we could not read is null, never an empty string or a zero.

A record youtube.search returned
{
  "type": "video",
  "position": 1,
  "id": "jtvOkI_pvMI",
  "url": "https://www.youtube.com/watch?v=jtvOkI_pvMI",
  "title": "How to \"Weld\" Aluminum Without a Welder",
  "channel_name": "Make Something",
  "channel_id": "UCtaykeSsGhtn2o2BsPm-rsw",
  "channel_url": "https://www.youtube.com/@MakeSomething",
  "channel_handle": "@MakeSomething",
  "channel_verified": true,
  "published_text": "11y ago",
  "duration_text": "2:17",
  "duration_seconds": 137,
  "view_count_text": "10,140,636 views",
  "view_count": 10140636,
  "view_count_exact": true,
  "is_live": false,
  "live_viewers": null,
  "subscriber_count_text": null,
  "subscriber_count": null,
  "video_count_text": null,
  "video_count": null,
  "description_snippet": "Brazing aluminum with a propane torch and brazing rods. Watch the full build of the lift top coffee table: ...",
  "badges": [],
  "thumbnails": [
    {
      "url": "https://i.ytimg.com/vi/jtvOkI_pvMI/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD34IkJi-oRpvyds-hK_yGt8CJtjg",
      "width": 360,
      "height": 202
    },
    {
      "url": "https://i.ytimg.com/vi/jtvOkI_pvMI/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAjEh_pzlpRFbjizHwK0qCVZjCFkQ",
      "width": 720,
      "height": 404
    }
  ],
  "movie_details": null,
  "movie_credits": []
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

The fields of a record

typestring
What the result is: a video, a short (a YouTube Short), a channel, a playlist, or a film YouTube sells, rents or shows with ads. A course, a podcast or a show is returned as a playlist.
positioninteger
Its place on the page, from 1, counting every result returned.
idstring
The video id, channel id (UC…) or playlist id.
urlstring
Its address on YouTube: youtube.com/watch?v=<id> for a video, /shorts/<id> for a Short, /channel/<id> for a channel, /playlist?list=<id> for a playlist.
titlestring or null
The title as shown; for a channel, its name.
channel_namestring or null
The channel that published it; for a channel result, the channel itself.
channel_idstring or null
The id (UC…) of that channel; null where the result names no channel (a Short in a shelf).
channel_urlstring or null
That channel's address, as the page links it: by its handle (youtube.com/@name) where it has one.
channel_handlestring or null
@name, when the page links the channel by its handle.
channel_verifiedboolean or null
The channel shows a verified or official-artist badge; null where the result names no channel.
published_textstring or null
When it was published, as shown ("11y ago").
duration_textstring or null
The length as shown ("12:44").
duration_secondsinteger or null
The length in seconds, read from duration_text; null where the result shows no length.
view_count_textstring or null
The views as shown ("10,140,636 views", "511K views").
view_countinteger or null
The views as a number, when the text reads as one.
view_count_exactboolean or null
True when YouTube showed the count in full, false when it showed it rounded (511K).
is_liveboolean or null
A live stream that is on air now.
live_viewersinteger or null
People watching now, for a live stream.
subscriber_count_textstring or null
For a channel: its subscribers as shown ("71.1K subscribers").
subscriber_countinteger or null
For a channel: the shown figure as a number (YouTube rounds it to three figures).
video_count_textstring or null
For a playlist or a channel: its number of videos as shown ("80 videos", "16 lessons", "42 episodes").
video_countinteger or null
The number in video_count_text, when the text reads as one.
description_snippetstring or null
The lines of description shown under the result.
badgeslist of strings
The labels shown on the result ("LIVE", "New", "4K", "CC").
thumbnailslist of objects
The result's thumbnail (for a channel, its picture), in the sizes the page lists, smallest first.Each holds url, width, height.
movie_detailsstring or null
For a film: its genre and year as shown ("Action & adventure • 2016").
movie_creditslist of strings
For a film: the credits as shown ("Actors: …", "Director: …").

The whole schema, in its reference

Units and limits

Counted per record
Billed per record: a run that returns data costs 1 unit for each record it returns.
A miss costs nothing
A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
What bounds a run
A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.

What it does not do

  • Up to 100 results a run. Results load about 20 at a time, so asking for more takes longer.

The bounds its schema sets

max_results
1 to 100; 20 unless you say otherwise
type
video, channel, playlist, short, movie

Scraper API pricing: how units workThe five ways a run ends

Questions

What does YouTube search return?

The videos, Shorts, channels and playlists YouTube lists for the query, in its order; or, with type movie, the films of YouTube Movies & TV with their genre, year and credits. A record has 27 fields, among them type, position, id, url, title and channel_name. A value that could not be read is null, never an empty string or a zero.

What do I send?

A search query. The input query is required. Optional: max_results and type.

How is it counted?

Billed per record: a run that returns data costs 1 unit for each record it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.

How much does one run return?

Its schema sets these bounds: max_results 1 to 100 (20 unless you say otherwise); type video, channel, playlist, short, movie. A run may take up to 5 minutes.

What does it not do?

Up to 100 results a run. Results load about 20 at a time, so asking for more takes longer.

How long are the records kept, and in what format do they come?

Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.

Can an AI assistant call it?

Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id youtube.search and the same input. It costs what the same API call costs.

Used in these playbooks

A playbook runs YouTube search as one of its steps and hands back the finished list. Its runs of this scraper cost what they cost here, and the playbook adds nothing.

  • Marketing

    Influencer Discovery

    Creators who make videos about your topic, with followers, views, engagement, their links and a published business email.

  • Finance

    Social Sentiment

    How often the tickers and brands you follow are mentioned on social sources, in what tone, and how both moved since the last run.

YouTube

YouTube's public pages, as a visitor who is not signed in sees them.

  • YouTube video

    youtube.video

    A YouTube video's address, or its id. Its title, description, channel, dates, length, views, likes, comment count, tags, hashtags, chapters and caption languages.

  • YouTube channel

    youtube.channel

    A YouTube channel's address, handle or id. Its name, description, subscribers, video count, country, join date, total views, links, avatar and banner.

  • YouTube channel videos

    youtube.channel_videos

    A YouTube channel's address, handle or id. The videos on the channel's Videos tab, newest first.

  • YouTube channel Shorts

    youtube.channel_shorts

    A YouTube channel's address, handle or id. The Shorts on the channel's Shorts tab, newest first: title, views and cover image.

  • YouTube channel live streams

    youtube.channel_streams

    A YouTube channel's address, handle or id. The streams on the channel's Live tab: on air now, scheduled and past, with viewers, views and length.

  • YouTube channel playlists

    youtube.channel_playlists

    A YouTube channel's address, handle or id. The playlists the channel lists on its Playlists tab: title, number of videos and cover image.

  • YouTube playlist

    youtube.playlist

    A YouTube playlist's address, or its id. The videos in the playlist, in its order: title, length, views, age and thumbnail.

  • YouTube transcript

    youtube.transcript

    A YouTube video's address, or its id, and optionally a language. The video's captions as timed segments and as one text, with the language, whether they are auto-generated, and every language the video offers.

  • YouTube comments

    youtube.comments

    A YouTube video's address, or its id. The comments under the video, top or newest first, with replies if you ask for them: text, likes, reply count, time, pinned and hearted marks, and the author's channel.

  • YouTube Music search

    youtube.music_search

    Words to search YouTube Music for: a song, an artist, an album. The top result and the songs, videos, albums, singles, artists, playlists and episodes YouTube Music lists, each with its kind, title, artists, the plays or audience shown, the year for an album, and its address.

YouTube on the line-up

Where
Worldwide

Run it on an input of your own.

Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.