# YouTube video search API for your agent

YouTube video search API for an agent: it sends a keyword to a catalog endpoint and reads video title, link and view count back. Several providers sell the call, so the agent tries the cheapest first. You pay per call, and a failed call costs nothing.

## What this does

A YouTube search shows what people watch for a topic. Your agent sends a keyword and reads back the videos with their views, dates, durations and channels. It tells you which angles are crowded, which are old and which channels own a topic.

One provider returns videos, channels, playlists, Shorts and live streams in one search, with filters for upload date, duration and sort order. Another focuses on videos and takes a country and a language code. A third returns the organic YouTube results as live tasks, in the format of an SEO data provider.

You give: a keyword. Example: home espresso setup.

## What differs between providers

- Scrape Creators API (scrapecreators-youtube-search): returns videos, channels, playlists, Shorts, shelves and live streams, with filters for upload date, duration, type and sort order.
- TikHub (tikhub-api-youtube-web-search-video): searches videos with an order, a country code and a language code, and pages with a token.
- DataForSEO (dataforseo-youtube-organic-advanced): returns YouTube video search results live, as a task array.

## Before you start

- Say which result type you want. A broad search returns videos, channels and playlists together, and filtering to videos keeps the list clean.
- Set the upload window. Old videos with a million views and new ones with ten thousand answer different questions.
- Set the country and language on providers that take them. Results differ by market.

## Prompt

Use looot to search YouTube for home espresso setup and return the title, channel, views, publish date and duration of the top results, newest and most viewed first. 1. Set up https://looot.ai/skill.md. 2. Search the catalog for each step and check its price before you call. 3. Run the cheapest endpoint that fits. 4. Show the results as a table and the total cost.

## Steps and providers

- Search YouTube: scrapecreators, tikhub, dataforseo. 1 call per search.

## What comes back

- Video title and link
- View count
- Publish date
- Duration
- Channel

## The request and what comes back

Each run is one POST to /v1/runs with an endpoint id and an input. These are illustrative calls with generic values. The run's result holds the provider's own fields.

- Scrape Creators API: {"endpointId":"scrapecreators-youtube-search","input":{"query":"home espresso setup"},"wait":30}
- TikHub: {"endpointId":"tikhub-api-youtube-web-search-video","input":{"search_query":"home espresso setup"},"wait":30}

## What can I learn from the results?

Which angles are crowded, which videos are old but still rank and which channels own a topic. Your agent can sort by views per day since upload to find the videos that outperform.

## Can I find Shorts?

The first provider returns Shorts in its results, and the catalog has an endpoint that searches Shorts only. Ask your agent to look it up and show the price first.

## How do I search YouTube videos by keyword through an API?

Send the keyword to a YouTube search endpoint. Your agent reads the videos back with the title, channel, views and date. Add filters for upload date or duration to narrow the list.

## Can I search for channels instead of videos?

Yes. The first provider's search returns channels as well as videos, and another endpoint in the catalog searches channels only. See the creator search page.

## Can I filter by upload date?

Yes, on the provider that supports it. You can restrict a search to recent uploads, which is the filter that matters most for trend work.

## How many results come back per call?

A page of results, with a token to fetch the next one. Your agent pages until it has the number you asked for, and each page is billed as a call.

## How much does one search cost?

You pay per call, and the price depends on the provider your agent picks. This page reads the cheapest live price from the catalog and shows no number when the catalog is unreachable.

## Do I pay when a youtube video search call fails?

No. A call that fails at the provider costs nothing, and your agent can retry it or send it to another provider.

## Do I need an account with each youtube video search provider?

No. One looot key reaches every provider in the catalog. You top up once, and each call is billed at the price shown before it runs.

## How do I call youtube video search from code?

Send a POST to /v1/runs with the endpoint id, the input and a new idempotency key, and your looot token in the Authorization header. With wait set to 30, the answer comes back in the response when the run ends within 30 seconds. Otherwise poll GET /v1/runs/<runId>.

## Can I run youtube video search on a schedule?

That needs scheduled runs, not available yet. Run it by hand whenever you want fresh results.

## Do I pay while my agent is idle?

No. looot bills per call, and nothing runs while your agent is idle.

## Related pages

- /use-cases/youtube-channel-stats-api
- /use-cases/youtube-transcript-api
- /use-cases/tiktok-search-api

## Last reviewed

2026-10-04. The cost per 1,000 search runs is read live from the catalog on the web page.
