Skip to content

YouTube API and MCP

YouTube provides video, channel and playlist data, with authorized access to a user's subscriptions and playlists. An agent can read channel data, comments and playlists for video research and account reporting. Connect your YouTube account once with OAuth in Longwave; agents act only on that account.

Add to Longwave

Add YouTube to your agent

Paste this into Claude Code or a terminal. Then run /mcp to sign in.

functions
18
access
Connect account
tasks
6

Use YouTube on Longwave

  1. Download Longwave or open app.longwave.run.
  2. Connect your YouTube account once. Agents then act on that account, and only that account.
  3. Ask for the result in any thread, for example: “Collect comments for a video feedback report”. The agent picks the YouTube function and calls it.

Use YouTube in Claude Code, Codex, Cursor or ChatGPT

Add the Longwave MCP server once. It carries 2,593 functions across 103 tools, including YouTube, and asks you to sign in on first use.

Why call YouTube through Longwave

  • One sign-in to YouTube, shared by every harness and device you use.
  • One MCP server for 103 tools, so your agent setup does not grow a key and a server per vendor.
  • Spending limits per key and per account, checked before a paid call is made.
  • Each call is recorded with the provider, the cost and the result, and can be read again from another device.

YouTube functions

Function Price
List my YouTube playlists List one bounded page of playlists owned by the connected YouTube account. youtube.playlists.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
Add a YouTube playlist item Add one existing video to a playlist that the connected account can edit. youtube.playlist-items.insert
Included within the connected account's API quota or product plan; no separate per-call fee published.
Delete a YouTube playlist item Remove one playlist item by its playlist item ID; the video itself remains available. youtube.playlist-items.delete
Included within the connected account's API quota or product plan; no separate per-call fee published.
List YouTube channel activity Read one page of activity for a specified channel. Deprecated channel bulletins are unavailable. youtube.activities.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
Get a YouTube channel profile Read profile, upload-playlist identity and public statistics for one specified channel, without audit details. youtube.channels.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
List YouTube channel sections Read the sections for one specified channel, subject to the bounded response size. youtube.channel-sections.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
List replies to a YouTube comment Read one page of replies to one comment in plain text. The declared force-ssl OAuth scope requires task-specific consent. youtube.comments.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
List comments on a YouTube video Read one page of top-level comment threads for a video. Replies require the separate comments read. Task-specific force-ssl consent is required. youtube.comment-threads.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
List YouTube interface languages Read supported interface languages with optional localization of their names. youtube.languages.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
List YouTube content regions Read supported content regions with optional localization of their names. youtube.regions.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
List YouTube channel subscriptions Read one page of subscriptions for a specified channel when its privacy settings permit access. youtube.subscriptions.list
Included within the connected account's API quota or product plan; no separate per-call fee published.
Search YouTube videos Returns one page of YouTube videos matching the supplied search query. youtube.videos.search
Included within the connected account's API quota or product plan; no separate per-call fee published.
Get a YouTube video Read public metadata, content details and statistics for one specified video. youtube.videos.get
Included within the connected account's API quota or product plan; no separate per-call fee published.
Read daily YouTube analytics Read daily views, watch time, engagement and subscriber changes for the connected channel or one video. youtube.analytics.daily
See vendor pricing
Read analytics for top YouTube videos Rank the connected channel’s videos by views and read their watch time, engagement and subscriber changes. youtube.analytics.top-videos
See vendor pricing
Read YouTube traffic source analytics Read views and watch time by traffic source for the connected channel or one video. youtube.analytics.traffic-sources
See vendor pricing
Read YouTube video retention Read audience watch ratio and relative retention across one video owned by the connected channel. youtube.analytics.retention
See vendor pricing
Read YouTube revenue estimates Read daily estimated revenue and ad revenue in USD for a connected YouTube Partner Program channel. Requires monetary read consent. youtube.analytics.revenue
See vendor pricing

Prices are YouTube's published rates. Source: YouTube pricing.

Use cases

Questions people ask

How does YouTube charge API quota?

YouTube assigns a quota cost to each API method. A request can consume quota even when it returns an error. YouTube documentation

Does YouTube commentThreads return every reply?

A comment thread can include only a subset of its replies. Use comments.list with the parent comment ID to retrieve additional replies. YouTube documentation

How does Longwave access my YouTube account?

You sign in to YouTube once and approve the permissions the functions need. Longwave stores the token encrypted and uses it only for calls you or your agents make. Disconnect it at any time in settings.

How do I use YouTube in Claude Code?

Add the Longwave MCP server once with claude mcp add --transport http longwave https://api.longwave.run/v1/mcp/tasks, sign in, and ask for what you need. Claude finds the right YouTube function and calls it.

Use YouTube in Longwave

Ask any Longwave thread for the result, or add Longwave to Claude Code, Codex, Cursor or ChatGPT.

Add to Longwave