Search YouTube videos
YouTubeYouTube videos for search keywords, or from YouTube links (search results, channel, playlist or video URLs): title, views, likes, comments count, duration, channel, date.
Get a YouTube transcript
YouTubeFull transcripts (captions) of YouTube videos, with timestamps: one per video link, in the language you ask for when the video has it.
List YouTube comments
YouTubeComments on YouTube videos or Shorts: text, likes, replies count, author, date. Sorted by top or latest.
Get YouTube channel videos
YouTubeVideos from YouTube channels (handles such as @MrBeast, or channel URLs): title, views, likes, comments count, duration, date.
Get YouTube Shorts
YouTubeShorts from YouTube channels: title, views, likes, comments, date.
Hand it to your AI agent
Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.
Use the Lovely Router YouTube data tools to get data for me. They return JSON and are billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools.md and https://lovelyrouter.com/docs/tools/run.md and https://lovelyrouter.com/docs/api/tools.md
- Tools for this:
- `youtube-search`: Search YouTube videos ($0.00125 / video)
- `youtube-transcript`: Get a YouTube transcript ($0.002475 / transcript)
- `youtube-comments`: List YouTube comments ($0.00125 / comment + $0.0025 / call)
- `youtube-channel`: Get YouTube channel videos ($0.00125 / video)
- `youtube-shorts`: Get YouTube Shorts ($0.00125 / short)
- Run: POST https://lovelyrouter.com/v1/tools/<id>/run with `{"input": {...}, "max_results": N}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Each tool takes its own input fields: read them with GET https://lovelyrouter.com/v1/tools/<id> (public, no key needed) before the first run.
- If you support MCP, you can instead connect the server https://lovelyrouter.com/mcp (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <describe the data you need and the output format>Run one from code
How runs, polling and billing work →curl https://lovelyrouter.com/v1/tools/youtube-search/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{"input":{"keywords":["espresso tutorial"],"maxItems":5},"max_results":10}'Each tool page lists its input fields and an example input. Agents can use every tool over MCP: MCP server
Frequently asked questions
What data can I get from YouTube?
5 tools: Search YouTube videos, Get a YouTube transcript, List YouTube comments, Get YouTube channel videos, Get YouTube Shorts. Each returns JSON and has its own page with its input fields and price.
Is this a YouTube scraper?
Yes. If you searched for a YouTube scraper, a YouTube data API or a YouTube channel scraper, this is it: Search results, channel videos, Shorts, comments and transcripts from YouTube, as JSON.
How much does it cost to scrape YouTube?
Each tool has its own price per result, from $0.0013. You pay only for results delivered, from a prepaid balance with no subscription.
Do I need a YouTube account or API key?
No. You call the tools with your Lovely Router API key and get JSON back; there is nothing to set up on YouTube.
Can AI agents use these tools?
Yes. Connect Claude Code, Cursor or any MCP client to the Lovely Router MCP server and the agent picks the right tool with suggest_tools and runs it with run_tool.
Can I use the data any way I like?
You are responsible for using the data lawfully, including privacy law when results contain personal data. See the Acceptable Use Policy.