# AnyAPI YouTube Search

> AnyAPI YouTube Search is a paid API for AI agents from api.getanyapi.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12, last successful call 2026-07-11).

Searches YouTube for videos matching a query, with optional sorting and date filtering, returning video metadata including titles, channels, views, and URLs.

## Facts

- Endpoint: POST https://api.getanyapi.com/v1/run/youtube.search?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Last successful call: 2026-07-11
- Success rate: 80% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 15
- Tags: x402
- Canonical page: https://www.zero.xyz/c/anyapi-youtube-search-396034cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TpPCyYsMTwhJUTBSVafq5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability anyapi-youtube-search-396034cd -d '<json body>'
```

Example prompt: Search YouTube for 'Python machine learning tutorial' sorted by view count, filtering to videos uploaded in the last month, and give me the top results with their titles, channels, and view counts.

## When to prefer this

Use this endpoint when you need structured YouTube video search results including metadata (titles, channels, views, duration, publish time) without building your own YouTube scraper or managing API keys. Prefer it over YouTube Data API v3 when you want pay-per-call pricing without quota management, or when you need simple pagination via continuation tokens.

## Known failure modes

- No results found (found: false, data: null) when query matches nothing
- Invalid sortBy value causing unexpected ordering or error
- Invalid uploadDate filter value causing filter to be ignored or error
- Pagination failure if cursor token is stale or malformed
- Rate limiting or quota exhaustion from underlying YouTube data source
- Network timeout on slow queries

## How this service works

1,200+ scraping and data APIs behind one key. Pay per request in real dollars. No subscriptions, nothing monthly, nothing to cancel.

## Output

Returns a list of YouTube videos with their IDs, URLs, titles, channel names, view counts, video lengths, and published times, along with a boolean indicating whether results were found and the USD cost of the call.

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/anyapi-youtube-search-396034cd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.getanyapi.com](https://www.zero.xyz/host/api.getanyapi.com/llms.txt)
