flashdata-dev's picture
Track FlashData signup and pricing referrals
d6367f3 verified
|
Raw History Blame Contribute Delete
3.22 kB
---
title: "YouTube Extended Search"
short_description: "Search YouTube and request up to 700 video results."
emoji: "🔎"
colorFrom: "blue"
colorTo: "indigo"
sdk: "static"
app_file: "index.html"
pinned: false
license: "mit"
tags:
- smolagents
- tool
- flashdata
- youtube-search-extended
---
# YouTube Extended Search
Search YouTube for larger result sets, requesting up to 700 videos per query. Retrieve video IDs and available titles, channels, dates and durations.
[API documentation](https://flashdata.dev/docs/sources/youtube_search_extended?utm_source=hugging-face&utm_medium=integration&utm_campaign=intent_gtm_2026q4&utm_content=youtube-extended-search-flashdata) · [Get an API key](https://flashdata.dev/signup?utm_source=hugging-face&utm_medium=integration&utm_campaign=intent_gtm_2026q4&utm_content=youtube_search_extended-task) · [Pricing](https://flashdata.dev/pricing?utm_source=hugging-face&utm_medium=integration&utm_campaign=intent_gtm_2026q4&utm_content=youtube_search_extended-task)
Requires your own FlashData API key and paid Credits. The Python tool is free to install.
## Try the inputs
Edit the JSON in this Space, generate a Python call, and inspect the included sample response or paste your own JSON. This page runs locally in your browser; it does not run a data query or collect your API key.
## Run with Python
Use Python 3.10 or newer:
```sh
python -m pip install "smolagents==1.26.0" "langchain-flashdata==0.2.1"
```
Review [tool.py](tool.py) before enabling `trust_remote_code`. Run locally with your key:
```python
import getpass
import os
from smolagents import load_tool
os.environ["FLASHDATA_API_KEY"] = getpass.getpass("FlashData API key: ")
tool = load_tool("flashdata-dev/youtube-extended-search-flashdata", trust_remote_code=True)
result = tool(**{'max_results': 100, 'query': 'battery recycling'})
print(result)
```
The same loaded tool can be used with smolagents. A direct Python call does not require a model.
## Inputs
| Parameter | Required / default | Details |
| --- | --- | --- |
| `query` | Required | YouTube search query, between 1 and 2,000 characters. |
| `max_results` | 20 | Requested result limit, up to 700. minimum=1, maximum=700 |
| `filters` | None | filters |
See [input-schema.json](input-schema.json) for full validation rules. Optional `None` values are omitted; adapter defaults apply.
## Output
Read `results.0.results`. Fields: `videoId`, `title`, `channel`, `uploadDate`, `duration`. Optional fields may be absent.
[example.json](example.json) contains a recorded response and its original request, not a new result for the input shown in the Space.
## Limits and cost
Default 20, maximum 700 requested results; fewer may be available. Extended Search has separate pricing and is not standard-search pagination.
Each data request uses FlashData Credits. Check [current pricing](https://flashdata.dev/pricing?utm_source=hugging-face&utm_medium=integration&utm_campaign=intent_gtm_2026q4&utm_content=youtube_search_extended-task) before running. Any model or hosting charges are separate.
For an uncertain timeout, check your FlashData Jobs before retrying; this tool does not automatically retry paid submissions.