Publish youtube_search_extended tool and request guide
Browse filesFiles changed (10)
- LICENSEAdded+21
- README.md+72-6
- app.jsAdded+75
- example.jsonAdded+505
- index.html+20-17
- input-schema.jsonAdded+251
- requirements.txtAdded+2
- style.css+1-28
- task.jsonAdded+22
- tool.pyAdded+23
123456789101112131415161718192021MIT License
Copyright (c) 2026 FlashData contributors
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112---title: Youtube Extended Search Flashdataemoji: 📉colorFrom: pinkcolorTo: graysdk: staticpinned: falselicense: mitshort_description: YouTube extended research discovery---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778---title: "YouTube extended research discovery"emoji: 🔎colorFrom: bluecolorTo: indigosdk: staticapp_file: index.htmlpinned: falselicense: mittags:- smolagents- tool- flashdata- youtube-search-extended---# YouTube extended research discovery — FlashDataExplore a broader set of YouTube videos when a small reading list is insufficient. Request a larger topic sample, retain IDs and source channels, then deduplicate and filter it for your research criteria.**Try this task:** Collect a larger candidate set of battery recycling videos for manual review.[FlashData youtube search extended 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) · [Create a FlashData account](https://flashdata.dev/signup)## Run itOpen the Space to edit a request and inspect a documentation response sample. The interactive page runs locally in your browser; it does not send a FlashData query or collect an API key. The Python tool runs in your own process.Use Python 3.10 or newer. Install the pinned dependencies:```shpython -m pip install "smolagents==1.26.0" "langchain-flashdata==0.2.1"```Create an API key in the FlashData console, fund the required credits, and supply the key in your local environment. Review `tool.py` before enabling remote code execution.```pythonimport getpassimport osfrom smolagents import load_toolos.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)```This is a native smolagents Tool with typed task inputs. Add the loaded tool to your own agent; model choice, prompts and model fees remain under your control. Direct calls above do not need a model.## Inputs| Parameter | Type | Required / default | Details || --- | --- | --- | --- || `query` | string | Required | YouTube search query, between 1 and 2,000 characters. || `max_results` | integer | 20 | Requested result limit, up to 700. minimum=1, maximum=700 || `filters` | object | None | filters |Optional `None` values are omitted; the documented adapter defaults apply.Full validation rules are in `input-schema.json`.## Output and next stepThe useful data is at `results.0.results`. Relevant fields: `videoId`, `title`, `channel`, `uploadDate`, `duration`.Use returned IDs to build a review queue. Record the search query and date; the result set is not a complete census of YouTube.The Space includes a recorded documentation example and its original request. It is not a fresh result for the task prompt above. Optional fields may be absent.## Costs, limits and failuresUp to 700 requested results, default 20; fewer may be available. This is a separate API source with a separate rate, not pagination for standard search.The tool is MIT licensed. It is free to install. **FlashData API calls are paid**; installation does not include free data queries. Check current [FlashData pricing](https://flashdata.dev/pricing) and your console balance. Platform, model and customer storage charges are separate. Each search/page is a separate request; Extended Search has its own rate. Downloads are charged by delivered data volume.An uncertain timeout can still represent a charged request. Check Jobs in the FlashData console before trying again; this integration does not automatically retry paid submissions. A 401 means the key was rejected, 402 means insufficient credits, and 429 means a rate or quota limit.[Get started with this FlashData capability](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)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475const byId = id => document.getElementById(id);const pythonLiteral = value => { if (value === null) return 'None'; if (typeof value === 'boolean') return value ? 'True' : 'False'; if (Array.isArray(value)) return `[${value.map(pythonLiteral).join(', ')}]`; if (typeof value === 'object') return `{${Object.entries(value).map(([k,v]) => `${JSON.stringify(k)}: ${pythonLiteral(v)}`).join(', ')}}`; return JSON.stringify(value);};
const [task, example, schema] = await Promise.all(['task.json','example.json','input-schema.json'].map(async file => { const response = await fetch(file); if (!response.ok) throw new Error(`Unable to load ${file}`); return response.json();}));
document.title = task.title;for (const key of ['title','scenario','task','next','limit']) byId(key).textContent = task[key];byId('docs').href = `https://flashdata.dev/docs/sources/${task.source}?utm_source=hugging-face&utm_medium=integration&utm_campaign=intent_gtm_2026q4&utm_content=${task.slug}`;byId('source').href = `https://huggingface.co/spaces/${task.repo_id}/blob/main/tool.py`;byId('readme').href = `https://huggingface.co/spaces/${task.repo_id}/blob/main/README.md`;byId('parameters').value = JSON.stringify(task.input,null,2);byId('response').value = JSON.stringify(example.response,null,2);byId('sample-request').textContent = JSON.stringify(example.request,null,2);
function generate() { try { const args = JSON.parse(byId('parameters').value); if (!args || Array.isArray(args) || typeof args !== 'object') throw new Error('Enter a JSON object.'); const allowed = task.source === 'youtube_download' ? ['operation','parameters','job_id'] : Object.keys(schema.properties); if (Object.keys(args).some(key => !allowed.includes(key))) throw new Error('Use only the documented inputs; keep credentials in your local environment.'); const code = [ '# Install: python -m pip install smolagents==1.26.0 langchain-flashdata==0.2.1', 'import getpass', 'import os', 'from smolagents import load_tool', '', 'os.environ["FLASHDATA_API_KEY"] = getpass.getpass("FlashData API key: ")', ...(task.source === 'youtube_download' && args.operation === 'submit' ? ['os.environ["FLASHDATA_DOWNLOAD_STORAGE"] = getpass.getpass("Customer storage JSON: ")'] : []), `tool = load_tool(${JSON.stringify(task.repo_id)}, trust_remote_code=True)`, `result = tool(**${pythonLiteral(args)})`, 'print(result)' ]; byId('python').textContent = code.join('\n'); byId('input-status').textContent = 'Python call generated. The tool validates full parameter constraints before a request.'; } catch (error) { byId('python').textContent = ''; byId('input-status').textContent = error.message; }}
function inspect() { byId('results').replaceChildren(); try { const response = JSON.parse(byId('response').value); const selected = task.path.split('.').reduce((value, key) => value?.[key], response); if (selected === undefined || selected === null) throw new Error(`No value at ${task.path}. Check the response format; failed or pending requests may have different fields.`); const rows = Array.isArray(selected) ? selected : [selected]; byId('response-status').textContent = `${rows.length} item(s) at ${task.path}. Showing up to 10.`; for (const row of rows.slice(0,10)) { const card = document.createElement('div'); card.className = 'result'; const fields = typeof row === 'object' && row !== null ? task.fields.filter(key => Object.hasOwn(row,key)) : []; if (!fields.length) { const p=document.createElement('p'); p.className='field'; p.textContent=typeof row === 'string' ? row : JSON.stringify(row); card.append(p); } for (const key of fields) { const line=document.createElement('p'); line.className='field'; const label=document.createElement('b'); label.textContent=key+': '; line.append(label); const value=row[key]; if (typeof value === 'string' && /^https?:\/\//.test(value)) { const link=document.createElement('a'); link.href=value; link.textContent=value; link.target='_blank'; link.rel='noopener noreferrer'; line.append(link); } else line.append(document.createTextNode(typeof value === 'object' ? JSON.stringify(value) : String(value))); card.append(line); } byId('results').append(card); } } catch (error) { byId('response-status').textContent=error.message; }}
byId('generate').addEventListener('click',generate);byId('inspect').addEventListener('click',inspect);generate(); inspect();123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505{ "request": { "source": "youtube_search_extended", "query": "python", "params": { "max_results": 20 } }, "response": { "source": "youtube_search_extended", "status": "done", "results": [ { "results": [ { "videoId": "K5KVEU3aaeQ", "title": "Python Full Course for Beginners", "channel": "Programming with Mosh", "channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA", "channelUrl": "https://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA", "duration": 7341, "durationString": "2:02:21", "viewCount": 7565956, "uploadDate": null, "description": "Master Python from scratch No fluff\u2014just clear, practical coding skills to kickstart your journey! Want to dive deeper? - Check\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAXbPvWkQhvRSOYWD6mp9EVbfWSYg", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAbeaIhlZJzT49VmWFTFrL3rCq--Q", "width": 720, "height": 404 } ] }, { "videoId": "kqtD5dpn9C8", "title": "Python for Beginners - Learn Coding with Python in 1 Hour", "channel": "Programming with Mosh", "channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA", "channelUrl": "https://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA", "duration": 3606, "durationString": "1:00:06", "viewCount": 25317327, "uploadDate": null, "description": "Learn Python basics in just 1 hour! Perfect for beginners interested in AI and coding. \u26a1 Plus, get 6 months of PyCharm FREE with\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/kqtD5dpn9C8/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD1iLVjsmE_gK2uZS887LgyThzx4Q", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/kqtD5dpn9C8/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDoYD4sT1l-1w5fEUQt6pdtsKdfLQ", "width": 720, "height": 404 } ] }, { "videoId": "_uQrJ0TkZlc", "title": "Python Full Course for Beginners", "channel": "Programming with Mosh", "channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA", "channelUrl": "https://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA", "duration": 22447, "durationString": "6:14:07", "viewCount": 49011589, "uploadDate": null, "description": "Learn Python for AI, machine learning, and web development with this beginner-friendly course! Get 6 months of PyCharm\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/_uQrJ0TkZlc/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCQfkbApoaN-_QBOuiyHzWJOiziEA", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/_uQrJ0TkZlc/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCpUFKfUMVNbg8mqTcZ8UdSUjpilw", "width": 720, "height": 404 } ] }, { "videoId": "ix9cRaBkVe0", "title": "Python Full Course for free \ud83d\udc0d", "channel": "Bro Code", "channelId": "UC4SVo0Ue36XCfOyb5Lh1viQ", "channelUrl": "https://www.youtube.com/channel/UC4SVo0Ue36XCfOyb5Lh1viQ", "duration": 43200, "durationString": "12:00:00", "viewCount": 12232736, "uploadDate": null, "description": "python #tutorial #beginners Python tutorial for beginners' full course 2024 *Learn Python in 1 HOUR*\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/ix9cRaBkVe0/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDxOlqOI0ajJHiDKDJKd2mEyl6o8Q", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/ix9cRaBkVe0/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAOFhprL8-MOLlhL-mAmfQX14h3JA", "width": 720, "height": 404 } ] }, { "videoId": "PLNcg_FV9n7qZGfFl2ANI_zISzNp257Lwn", "title": "Python Ultimate Course", "channel": "Data with Baraa", "channelId": "UC8_RSKwbU1OmZWNEoLV1tQg", "channelUrl": "https://www.youtube.com/channel/UC8_RSKwbU1OmZWNEoLV1tQg", "duration": null, "durationString": null, "viewCount": null, "uploadDate": null, "description": null, "thumbnails": [ { "url": "https://i.ytimg.com/vi/Rq5gJVxz55Q/hq720.jpg?sqp=-oaymwEXCOgCEMoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD0DGP1Fz2uVeT1N4KayechjJWXQQ", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/Rq5gJVxz55Q/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC8xiDHYd35tCqjtIe7zAdNiJV-TQ", "width": 720, "height": 404 } ] }, { "videoId": "ygXn5nV5qFc", "title": "Python for AI - Full Beginner Course", "channel": "Dave Ebbelaar", "channelId": "UCn8ujwUInbJkBhffxqAPBVQ", "channelUrl": "https://www.youtube.com/channel/UCn8ujwUInbJkBhffxqAPBVQ", "duration": 18931, "durationString": "5:15:31", "viewCount": 1526371, "uploadDate": null, "description": "Learn Python from scratch and start building real AI applications. This is the fastest, beginner-friendly course Python for AI\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/ygXn5nV5qFc/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAWOQBeND4JW5j_bzYI-BmsTplkfQ", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/ygXn5nV5qFc/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBYZK-1TMdAyhLC18-i_BcFkw1TBA", "width": 720, "height": 404 } ] }, { "videoId": "9Hku_7e-JSk", "title": "3\u5c0f\u65f6\u8d85\u5feb\u901f\u5165\u95e8Python | \u52a8\u753b\u6559\u5b66\u30102025\u65b0\u7248\u3011\u3010\u81ea\u5b66Python\u6559\u7a0b\u3011\u3010\u96f6\u57fa\u7840Python\u3011", "channel": "\u6797\u7c92\u7c92\u5440", "channelId": "UCpHMIMmvmBTfr-IefM2mu3A", "channelUrl": "https://www.youtube.com/channel/UCpHMIMmvmBTfr-IefM2mu3A", "duration": 11459, "durationString": "3:10:59", "viewCount": 379257, "uploadDate": null, "description": "\u628aPython\u6559\u7a0b\u505a\u6210\u52a8\u753b\u7247\u4e86\uff0c\u6559\u5b66\u901a\u4fd7\u6613\u61c22025\u6700\u65b0\u7248\uff0c\u5b66\u5b8c\u5165\u95e8\u7f16\u7a0b\uff5e \u5982\u679c\u4f60\u9700\u8981\u8fdb\u9636\u5b66\u4e60Python\uff0c\u6b22\u8fce\u4e86\u89e3\u66f4\u591a\u6211\u5236\u4f5c\u7684\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/9Hku_7e-JSk/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAQyFmKTug_SY679Uy6_D5TvsipfA", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/9Hku_7e-JSk/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDkae8uL5ujOK-rzpcNGOt030lhPA", "width": 720, "height": 404 } ] }, { "videoId": "nLRL_NcnK-4", "title": "Harvard CS50\u2019s Introduction to Programming with Python \u2013 Full University Course", "channel": "freeCodeCamp.org and CS50", "channelId": null, "channelUrl": null, "duration": 57468, "durationString": "15:57:48", "viewCount": 9040599, "uploadDate": null, "description": "Learn Python programming from Harvard University. It dives more deeply into the design and implementation of web apps with\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/nLRL_NcnK-4/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAJas_Ng-a8m7MaZy4pFXEtg32wrg", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/nLRL_NcnK-4/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLA5lx7Ejw4EXmM_Vlc1_bZ3RLKQ7g", "width": 720, "height": 404 } ] }, { "videoId": "Rq5gJVxz55Q", "title": "Python Full Course for Beginners (13 Hours) \u2013 From Zero to Hero", "channel": "Data with Baraa", "channelId": "UC8_RSKwbU1OmZWNEoLV1tQg", "channelUrl": "https://www.youtube.com/channel/UC8_RSKwbU1OmZWNEoLV1tQg", "duration": 46973, "durationString": "13:02:53", "viewCount": 1060826, "uploadDate": null, "description": "Learn Python from scratch in this complete 13-hour course designed for beginners who want to build real programming\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/Rq5gJVxz55Q/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAuu4tzXeRYigoVzfQEk-yj5Cxpqg", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/Rq5gJVxz55Q/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBPqpz9uFFxOdUMDarDkzaSL2_KRQ", "width": 720, "height": 404 } ] }, { "videoId": "wUSDVGivd-8", "title": "Python for Data Analytics - Full Course for Beginners", "channel": "Luke Barousse", "channelId": "UCLLw7jmFsvfIVaUFsLs8mlQ", "channelUrl": "https://www.youtube.com/channel/UCLLw7jmFsvfIVaUFsLs8mlQ", "duration": 40181, "durationString": "11:09:41", "viewCount": 1549508, "uploadDate": null, "description": "FREE Course Files & Project https://lukeb.co/python_repo Supporter Access: Problems, Certificate, & More\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/wUSDVGivd-8/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLA85GvFR4YuxTeBj67gS7sT8KkPug", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/wUSDVGivd-8/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLB8qopEPMx651G_KsmN1CSWxlDeIQ", "width": 720, "height": 404 } ] }, { "videoId": "PL-osiE80TeTt2d9bfVyTiXJA-UTHn6WwU", "title": "Python Tutorials", "channel": "Corey Schafer", "channelId": "UCCezIgC97PvUuR4_gbFUs5g", "channelUrl": "https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g", "duration": null, "durationString": null, "viewCount": null, "uploadDate": null, "description": null, "thumbnails": [ { "url": "https://i.ytimg.com/vi/YYXdXT2l-Gg/hq720.jpg?sqp=-oaymwEXCOgCEMoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC5xC1ZF2J_u3-jTNz_q31gOoerkw", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/YYXdXT2l-Gg/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLB62tKrSiLOsKgSqTEWX05gsbf03g", "width": 720, "height": 404 } ] }, { "videoId": "PLsyeobzWxl7poL9JTVyndKe62ieoN-MZ3", "title": "Python for Beginners (Full Course) | Programming Tutorial", "channel": "Telusko", "channelId": "UC59K-uG2A5ogwIrHw4bmlEg", "channelUrl": "https://www.youtube.com/channel/UC59K-uG2A5ogwIrHw4bmlEg", "duration": null, "durationString": null, "viewCount": null, "uploadDate": null, "description": null, "thumbnails": [ { "url": "https://i.ytimg.com/vi/QXeEoD0pB3E/hq720.jpg?sqp=-oaymwEXCOgCEMoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCWPAZkJp7z57q2H_k4GCVXz5DUFw", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/QXeEoD0pB3E/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLB0rOknPZGuoCIf-6EgHKR1A6TxTA", "width": 720, "height": 404 } ] }, { "videoId": "PLsyeobzWxl7omDoEYrrf3oXvXxa6MPgek", "title": "Python Tutorial 2026 | Complete Python Course (Beginner to Advanced) | Telusko", "channel": "Telusko", "channelId": "UC59K-uG2A5ogwIrHw4bmlEg", "channelUrl": "https://www.youtube.com/channel/UC59K-uG2A5ogwIrHw4bmlEg", "duration": null, "durationString": null, "viewCount": null, "uploadDate": null, "description": null, "thumbnails": [ { "url": "https://i.ytimg.com/vi/YZkyL-f-YXY/hq720.jpg?sqp=-oaymwEXCOgCEMoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBd7YDpnC51Ceyhi7EkLd0UnfPc9w", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/YZkyL-f-YXY/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDqwreruXZFgiuPOpWxK28x1IQUMQ", "width": 720, "height": 404 } ] }, { "videoId": "6GuyMZ-cSzE", "title": "Python Tutorial for AI: Everything You Need in 2 Hours", "channel": "codebasics", "channelId": "UCh9nVJoWXmFb7sLApWGcLPQ", "channelUrl": "https://www.youtube.com/channel/UCh9nVJoWXmFb7sLApWGcLPQ", "duration": 7373, "durationString": "2:02:53", "viewCount": 196330, "uploadDate": null, "description": "This Python mini-course is built by keeping in mind the use case of AI. Any AI aspirant who wants to learn AI using Python or want\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/6GuyMZ-cSzE/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCKgWxeLOO6aMMqu89Wsax4Ccu85g", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/6GuyMZ-cSzE/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDV9Hi0PoMSxKSGNDSd4Io7JMiH-w", "width": 720, "height": 404 } ] }, { "videoId": "rfscVS0vtbw", "title": "Learn Python - Full Course for Beginners [Tutorial]", "channel": "freeCodeCamp.org", "channelId": "UC8butISFwT-Wl7EV0hUK0BQ", "channelUrl": "https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ", "duration": 16012, "durationString": "4:26:52", "viewCount": 49285279, "uploadDate": null, "description": "This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/rfscVS0vtbw/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD-9-7sK2ChwTaU2oDci15jO7wEDg", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/rfscVS0vtbw/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLABBQtpk83-Gm8-IgPAiGlTtrLH9w", "width": 720, "height": 404 } ] }, { "videoId": "xAcTmDO6NTI", "title": "Lecture 1: Introduction to CS and Programming Using Python", "channel": "MIT OpenCourseWare", "channelId": "UCEBb1b_L6zDS3xTUrIALZOw", "channelUrl": "https://www.youtube.com/channel/UCEBb1b_L6zDS3xTUrIALZOw", "duration": 3810, "durationString": "1:03:30", "viewCount": 2296795, "uploadDate": null, "description": "MIT 6.100L Introduction to CS and Programming using Python, Fall 2022 Instructor: Ana Bell View the complete course:\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/xAcTmDO6NTI/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDZ5a1dBlEdpB7Xmrvg164lDqjy1Q", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/xAcTmDO6NTI/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBQapxSAyS3sQq1FtatNJ0ja36MFA", "width": 720, "height": 404 } ] }, { "videoId": "PLdo5W4Nhv31bZSiqiOL5ta39vSnBxpOPT", "title": "Python Full Course", "channel": "Jenny's Lectures CS IT", "channelId": "UCM-yUTYGmrNvKOCcAl21g3w", "channelUrl": "https://www.youtube.com/channel/UCM-yUTYGmrNvKOCcAl21g3w", "duration": null, "durationString": null, "viewCount": null, "uploadDate": null, "description": null, "thumbnails": [ { "url": "https://i.ytimg.com/vi/6i3EGqOBRiU/hq720.jpg?sqp=-oaymwEXCOgCEMoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLA8vm9XyKYbEzPwshASn00OZzfvBw", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/6i3EGqOBRiU/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCuzoXzg904azzFqkMR6VN_9vPdjA", "width": 720, "height": 404 } ] }, { "videoId": "b093aqAZiPU", "title": "\ud83d\udc69\u200d\ud83d\udcbb Python for Beginners Tutorial", "channel": "Kevin Stratvert", "channelId": "UCfJT_eYDTmDE-ovKaxVE1ig", "channelUrl": "https://www.youtube.com/channel/UCfJT_eYDTmDE-ovKaxVE1ig", "duration": 3801, "durationString": "1:03:21", "viewCount": 4592374, "uploadDate": null, "description": "In this step-by-step Python for beginner's tutorial, learn how you can get started programming in Python. In this video, I assume\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/b093aqAZiPU/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBMc52n3VeviTzlhsRCemDDz8l1Ow", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/b093aqAZiPU/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBG6MYAXELGegdhLlZJPKwwLierDA", "width": 720, "height": 404 } ] }, { "videoId": "Y8Tko2YC5hA", "title": "What is Python? Why Python is So Popular?", "channel": "Programming with Mosh", "channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA", "channelUrl": "https://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA", "duration": 247, "durationString": "4:07", "viewCount": 2341508, "uploadDate": null, "description": "What is Python? This short video explains it in 4 minutes. Python Tutorial for Beginners: https://youtu.be/_uQrJ0TkZlc Python\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/Y8Tko2YC5hA/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLC9k_U_x1CBmU1p1YwHz-TTyPBLpg", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/Y8Tko2YC5hA/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAHduruMh6QwyHhLnNsE9WwQSQjxg", "width": 720, "height": 404 } ] }, { "videoId": "VchuKL44s6E", "title": "Python As Fast as Possible - Learn Python in ~75 Minutes", "channel": "Tech With Tim", "channelId": "UC4JX40jDee_tINbkjycV4Sg", "channelUrl": "https://www.youtube.com/channel/UC4JX40jDee_tINbkjycV4Sg", "duration": 4781, "durationString": "1:19:41", "viewCount": 2255229, "uploadDate": null, "description": "GET MY FREE SOFTWARE DEVELOPMENT GUIDE https://training.techwithtim.net/free-guide This python tutorial aims to teach\u00a0...", "thumbnails": [ { "url": "https://i.ytimg.com/vi/VchuKL44s6E/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLB6udnq8elg0jaxG5wKibJxNCLkPA", "width": 360, "height": 202 }, { "url": "https://i.ytimg.com/vi/VchuKL44s6E/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLB5Ob2qlI0bsygtt2fHQlnsF7yiaQ", "width": 720, "height": 404 } ] } ], "totalResults": 20, "query": "python" } ], "usage": { "credits": 0.05 }, "created_at": "2026-09-16T07:41:46.808Z" }}12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>12345678910111213141516171819202122<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>FlashData research tool</title><link rel="stylesheet" href="style.css"></head><body><main><header><a href="https://flashdata.dev" class="brand">FLASHDATA</a><span>Research tools for AI agents</span></header><section class="intro"><p class="eyebrow">SMOLAGENTS TOOL · PYTHON</p><h1 id="title">Loading tool…</h1><p id="scenario"></p><a id="docs" class="cta">Get an API key and read the docs ↗</a></section><div class="grid"><section class="panel"><h2>Build a request</h2><p id="task"></p><label for="parameters">Tool inputs (JSON)</label><textarea id="parameters" spellcheck="false"></textarea><button id="generate" type="button">Generate Python call</button><p id="input-status" role="status"></p><pre><code id="python"></code></pre><p class="hint">Run this code in your Python environment. Your API key is entered there, not on this page.</p></section><section class="panel"><h2>Inspect the response</h2><p class="hint">This is a recorded documentation sample, not a live response to the request on the left. You can paste your own response JSON to explore its fields.</p><details><summary>Original sample request</summary><pre id="sample-request"></pre></details><label for="response">Response JSON</label><textarea id="response" spellcheck="false"></textarea><button id="inspect" type="button">Inspect results</button><p id="response-status" role="status"></p><div id="results"></div></section></div><section class="panel next"><h2>Use the result</h2><p id="next"></p><h3>Limits and costs</h3><p id="limit"></p><p>The tool is free to install. <strong>FlashData API calls are paid.</strong> Platform, model and customer storage costs are separate. No API or model call is made by this page. <a href="https://flashdata.dev/pricing">Check pricing ↗</a></p><p>For an uncertain timeout, check Jobs before retrying a paid submission. Download jobs must be read with their saved ID; do not submit again while pending.</p></section><footer><a id="source">Review tool.py</a><a id="readme">Installation and input reference</a><span>MIT licensed integration · FlashData API terms apply separately</span></footer></main><script type="module" src="app.js"></script></body></html>
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251{ "$defs": { "YouTubeSearchFilters": { "additionalProperties": false, "description": "Optional YouTube search filters, including feature flags.", "properties": { "duration": { "anyOf": [ { "enum": [ "<4", "4-20", ">20" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Duration" }, "sort_by": { "anyOf": [ { "enum": [ "rating", "relevance", "view_count", "upload_date" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Sort By" }, "type": { "anyOf": [ { "enum": [ "video", "channel", "playlist", "movie" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "upload_date": { "anyOf": [ { "enum": [ "today", "last_hour", "this_week", "this_month", "this_year" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Upload Date" }, "360": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "360" }, "3d": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "3D" }, "4k": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "4K" }, "creative_commons": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Creative Commons" }, "hd": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Hd" }, "hdr": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Hdr" }, "live": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Live" }, "location": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Location" }, "purchased": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Purchased" }, "subtitles": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Subtitles" }, "vr180": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Vr180" } }, "title": "YouTubeSearchFilters", "type": "object" } }, "additionalProperties": false, "description": "Larger searches have a separate source and rate; count is not guaranteed.", "properties": { "query": { "description": "YouTube search query, between 1 and 2,000 characters.", "maxLength": 2000, "minLength": 1, "title": "Query", "type": "string" }, "max_results": { "default": 20, "description": "Requested result limit, up to 700.", "maximum": 700, "minimum": 1, "title": "Max Results", "type": "integer" }, "filters": { "anyOf": [ { "$ref": "#/$defs/YouTubeSearchFilters" }, { "type": "null" } ], "default": null } }, "required": [ "query" ], "title": "YouTubeExtendedSearchInput", "type": "object"}12smolagents==1.26.0langchain-flashdata==0.2.112345678910111213141516171819202122232425262728body {padding: 2rem;font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;}h1 {font-size: 16px;margin-top: 0;}p {color: rgb(107, 114, 128);font-size: 15px;margin-bottom: 10px;margin-top: 5px;}.card {max-width: 620px;margin: 0 auto;padding: 16px;border: 1px solid lightgray;border-radius: 16px;}.card p:last-child {margin-bottom: 0;}1:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;color:#14243b;background:#f4f7fb;font-synthesis:none}*{box-sizing:border-box}body{margin:0}main{max-width:1240px;margin:auto;padding:32px}a{color:#175bc1;text-underline-offset:3px}header{display:flex;align-items:center;gap:24px;border-bottom:1px solid #dce3ed;padding-bottom:24px;color:#64748b;font-size:14px}.brand{font-size:21px;letter-spacing:.1em;font-weight:850;text-decoration:none;color:#123364}.intro{max-width:900px;padding:52px 0 38px}.eyebrow{font-size:12px;letter-spacing:.13em;font-weight:750;color:#4977aa}h1{font-size:clamp(28px,4vw,46px);line-height:1.12;letter-spacing:-.035em;margin:18px 0}h2{font-size:22px;margin:0 0 14px}h3{font-size:17px;margin:28px 0 8px}p{line-height:1.65}.intro>p:not(.eyebrow){font-size:18px;color:#4d6077}.cta{display:inline-block;background:#164f9b;color:white;padding:12px 18px;border-radius:7px;text-decoration:none;font-weight:600;margin-top:12px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.panel{background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:26px;min-width:0;box-shadow:0 5px 20px #12336405}.hint{color:#61738b;font-size:13px}label{display:block;font-size:13px;font-weight:650;margin:20px 0 8px}textarea{display:block;width:100%;height:190px;resize:vertical;border:1px solid #cbd6e6;border-radius:7px;padding:13px;font:13px/1.55 ui-monospace,SFMono-Regular,monospace;color:#253c58;background:#fbfcff}button{margin-top:12px;border:1px solid #b5c9e4;border-radius:7px;background:#edf4ff;color:#164f9b;padding:10px 15px;cursor:pointer;font:600 14px inherit}button:hover{background:#dfecff}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f7fb;padding:15px;border-radius:7px;font:12px/1.6 ui-monospace,SFMono-Regular,monospace}details{font-size:13px}summary{cursor:pointer;color:#175bc1}.result{padding:14px 0;border-bottom:1px solid #e5ebf3}.result:first-child{padding-top:0}.field{font-size:13px;line-height:1.6;overflow-wrap:anywhere;margin:4px 0}.field b{color:#62758b;font-weight:500}.next{margin-top:22px}footer{display:flex;flex-wrap:wrap;gap:20px;padding:25px 0;color:#718096;font-size:12px}[role=status]{font-size:13px;color:#536b88}:focus-visible{outline:3px solid #7ea9ee;outline-offset:3px}@media(max-width:800px){main{padding:20px}.grid{grid-template-columns:1fr}.intro{padding-top:30px}header{flex-wrap:wrap;gap:8px}.panel{padding:20px}h1{font-size:32px}}
12345678910111213141516171819202122{ "slug": "youtube-extended-search-flashdata", "title": "YouTube extended research discovery \u2014 FlashData", "scenario": "Explore a broader set of YouTube videos when a small reading list is insufficient. Request a larger topic sample, retain IDs and source channels, then deduplicate and filter it for your research criteria.", "task": "Collect a larger candidate set of battery recycling videos for manual review.", "input": { "query": "battery recycling", "max_results": 100 }, "path": "results.0.results", "fields": [ "videoId", "title", "channel", "uploadDate", "duration" ], "next": "Use returned IDs to build a review queue. Record the search query and date; the result set is not a complete census of YouTube.", "limit": "Up to 700 requested results, default 20; fewer may be available. This is a separate API source with a separate rate, not pagination for standard search.", "source": "youtube_search_extended", "repo_id": "flashdata-dev/youtube-extended-search-flashdata"}1234567891011121314151617181920212223from smolagents import Tool
class FlashDataTool(Tool): name = 'youtube_search_extended' description = 'Explore a broader set of YouTube videos when a small reading list is insufficient. Request a larger topic sample, retain IDs and source channels, then deduplicate and filter it for your research criteria. Up to 700 requested results, default 20; fewer may be available. This is a separate API source with a separate rate, not pagination for standard search. Uses paid FlashData API credits. Never automatically retry an uncertain submission; check Jobs first.' inputs = {'filters': {'description': 'Optional YouTube filters: duration, sort_by, type, upload_date and ' 'boolean feature flags. See the input validation schema in the ' 'documentation for supported values. Default: None.', 'nullable': True, 'type': 'object'}, 'max_results': {'description': 'Requested result limit, up to 700. minimum: 1. maximum: 700. ' 'Default: 20.', 'nullable': True, 'type': 'integer'}, 'query': {'description': 'YouTube search query, between 1 and 2,000 characters.', 'type': 'string'}} output_type = 'object'
def forward(self, query: str, max_results: int = 20, filters: dict | None = None) -> dict: from langchain_flashdata import FlashDataYouTubeExtendedSearch values = {'query': query, 'max_results': max_results, 'filters': filters} return FlashDataYouTubeExtendedSearch().invoke({key: value for key, value in values.items() if value is not None})LICENSEAdded+21
README.md+72-6
app.jsAdded+75
example.jsonAdded+505
index.html+20-17
input-schema.jsonAdded+251
requirements.txtAdded+2
style.css+1-28
task.jsonAdded+22
tool.pyAdded+23