Skip to content
WagamiAI
ProductPricingDocsMCPCompareSupportSign inGet started
API reference · v1

WagamiAI API

YouTube data and image search over HTTPS. Send a JSON body and get JSON back, apart from the few endpoints that return file or picture bytes. There are 44 endpoints, all on one key, and each successful answer costs a fixed number of credits (Credits and billing).

What changed

Updates to the service, newest first. An entry that needs something from you says what to send. AI agents: read this section when you start, and again whenever an answer carries a notice field or an X-New-Address header.

  • 9 Nov 2026, performance and reliability improvements. General improvements to speed, reliability and answers. Nothing changes on your side.

Quick start

Base URL: https://wagamiai.com. Create an account, add credits, make a key in your client area, put it in an environment variable, then call any endpoint:

shell
export WAGAMI_KEY="ytg_…"
curl -X POST "https://wagamiai.com/v1/video" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ"}'
python
import os, requests

API = "https://wagamiai.com"
S = requests.Session()
S.headers["Authorization"] = f"Bearer {os.environ['WAGAMI_KEY']}"

r = S.post(f"{API}/v1/channel/videos", json={"ref": "@veritasium", "sort": "popular", "limit": 10})
r.raise_for_status()
for v in r.json()["items"]:
    print(v["views"], v["title"])

# pictures for any query
r = S.post(f"{API}/v1/images", json={"query": "mountain cabin at dusk", "layout": "wide", "limit": 10})
for img in r.json()["items"]:
    print(img["width"], img["height"], img["url"])
node
const API = "https://wagamiai.com";
const r = await fetch(`${API}/v1/search`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.WAGAMI_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ query: "f1 onboard", duration: "short", upload: "week", limit: 10 }),
});
const data = await r.json();
if (!r.ok || !(data.ok ?? data.success)) throw new Error(`${r.status} ${data.class ?? ""}: ${data.error}`);

A client in one file (no install)

Prefer not to write HTTP code? Fetch ytapi.py with your key (Python 3.8+, standard library only). It reads your key from WAGAMI_KEY (YTAPI_KEY works too) and the base URL from YTAPI_URL, waits out busy answers on its own, and saves media straight to disk. GET /v1 lists every endpoint.

shell
export YTAPI_URL="https://wagamiai.com" WAGAMI_KEY="ytg_…"
curl -fsS -H "Authorization: Bearer $WAGAMI_KEY" -o ytapi.py "$YTAPI_URL/v1/client"

python3 ytapi.py video dQw4w9WgXcQ
python3 ytapi.py search "deep sea documentary" --limit 5
python3 ytapi.py endpoints
python
from ytapi import Client, ApiError

api = Client()                       # reads WAGAMI_KEY / YTAPI_URL
print(api.video("dQw4w9WgXcQ")["video"]["title"])
api.clip("dQw4w9WgXcQ", 42, 52, "clip.mp4")   # media opens with your first payment

AI agents

An AI agent can set itself up from this page or from GET /v1 (the same steps as JSON under agent_setup). It needs one thing from you: an API key. With the key, GET /v1/setup returns that key's own setup as plain text: what it may call, its limits, and, once media is open for it, how to install the media add-on and the one tool that joins video, so clips and videos are fetched, joined and cut on that machine. The add-on itself is public (GET /v1/plugin, no key needed); only the calls it makes use the key.

  • Keep the key in the WAGAMI_KEY environment variable or an ignored .env file. Never print, log or commit it, and never send it to a browser.
  • Run the steps in order and stop on the first error.
  • Keep up by itself: when an answer has class addon_outdated or links_only, or carries addon_update, read GET /v1/setup again, follow it, and repeat the call. That is how changes are announced.
  • Give an agent its own key with a credit cap and only the access it needs (Your account), so it can never spend more than you planned.
shell
export WAGAMI_KEY="<your key>"          # PowerShell: $env:WAGAMI_KEY = "<your key>"
curl -s -H "Authorization: Bearer $WAGAMI_KEY" https://wagamiai.com/v1/limits   # the answer has "ok": true
curl -s -H "Authorization: Bearer $WAGAMI_KEY" https://wagamiai.com/v1/setup    # this key's setup: follow it

Without the add-on, your own code orders Clip, Video media or Audio with "delivery": "links" and joins the streams on its machine (Media links), or uses the developer client from GET /v1/client. If a call fails: 401 a wrong key; 402 out of credits or at the key's credit cap; 403 not enabled on the key; 429 a limit, so wait for Retry-After.

MCP for AI agents

Agents that speak the Model Context Protocol (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and other MCP clients) can use the API as tools, with nothing to install on our side. The address is https://wagamiai.com/mcp (Streamable HTTP, JSON answers) and it takes the same key as every other call, in the Authorization: Bearer header. Each tool runs the endpoint named beside it, with the same limits, access and prices; only answered calls are charged, and a refusal comes back to the agent as a tool error that says what to do (add credits, wait, fix an argument). Give the agent its own key with a credit cap (Your account).

Apps that connect by the address alone sign you in to your WagamiAI account instead of taking a key: No API key is needed. What the app uses is paid from your account's credits, at the same prices as a key.

Claude (web and desktop app) (Customize > Connectors)
1. Open Customize, then Connectors.
2. Press + Add, then Add custom connector.
3. Name it WagamiAI, paste the address https://wagamiai.com/mcp and press Continue.
4. Under Authentication keep Sign in now, leave OAuth client as it is, and press Add.
5. Sign in to your WagamiAI account and press Allow.
6. In a chat, press +, then Connectors, and switch WagamiAI on.

With a key in a header:

Claude Code
claude mcp add --transport http wagami https://wagamiai.com/mcp --header "Authorization: Bearer YOUR_WAGAMI_KEY"
Cursor (~/.cursor/mcp.json) and most other clients
{
  "mcpServers": {
    "wagami": {
      "url": "https://wagamiai.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WAGAMI_KEY"
      }
    }
  }
}
VS Code (.vscode/mcp.json)
{
  "servers": {
    "wagami": {
      "type": "http",
      "url": "https://wagamiai.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WAGAMI_KEY"
      }
    }
  }
}
Windsurf (mcp_config.json)
{
  "mcpServers": {
    "wagami": {
      "serverUrl": "https://wagamiai.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WAGAMI_KEY"
      }
    }
  }
}
Claude Desktop (claude_desktop_config.json, through mcp-remote; needs Node.js)
{
  "mcpServers": {
    "wagami": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://wagamiai.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer YOUR_WAGAMI_KEY"
      }
    }
  }
}

Tools

ToolWhat (endpoint)Credits
search_youtubeSearch YouTube (/v1/search)Costs 3 credits per 20 results returned (at least 3 when anything comes back); an answer with nothing in it costs nothing.
get_videoVideo details (/v1/video)Costs 3 credits a call.
get_videosMany videos at once (/v1/videos)Costs 1 credit per video answered (YouTube's own verdicts, such as removed, count; one we could not read costs nothing); an answer with nothing in it costs nothing.
get_channelChannel details (/v1/channel)Costs 3 credits a call.
get_channel_videosA channel's videos (/v1/channel/videos)Costs 3 credits per 50 items returned (at least 3 when anything comes back); an answer with nothing in it costs nothing.
get_playlistPlaylist (/v1/playlist)Costs 3 credits per 50 videos returned (at least 3 when anything comes back); an answer with nothing in it costs nothing.
get_commentsComments (/v1/comments)Costs 3 credits per 50 comments returned (at least 3 when anything comes back); an answer with nothing in it costs nothing.
get_transcriptTranscript (/v1/transcript)Costs 3 credits a call; an answer with nothing in it costs nothing.
get_transcriptsMany transcripts at once (/v1/transcripts)Costs 3 credits per transcript that comes back; a video with none in that language, or one that could not be read, costs nothing, and an answer with nothing in it costs nothing.
get_captionsTimed captions (/v1/captions)Costs 3 credits a call; an answer with nothing in it costs nothing.
get_related_videosRelated videos (/v1/related)Costs 3 credits a call; an answer with nothing in it costs nothing.
get_similar_channelsSimilar channels (/v1/similar)Costs 15 credits a call; an answer with nothing in it costs nothing.
get_channel_outliersA channel's outlier videos (/v1/channel/outliers)Costs 3 credits per 50 videos checked (window 60 = 6 credits); when no video beats the channel's usual views, an answer with nothing in it costs nothing.
find_channelsFind channels (/v1/channels/find)Costs 2 credits per channel returned; an answer with nothing in it costs nothing; max_credits caps a call.
find_outlier_videosFind outlier videos (/v1/videos/find)Costs 1 credit per video returned; an answer with nothing in it costs nothing.
get_channel_profilesChannel profiles (/v1/channels/profile)Costs 2 credits per channel returned; an answer with nothing in it costs nothing.
check_monetizationCheck monetization (/v1/channels/profile)Costs 2 credits per channel returned; an answer with nothing in it costs nothing.
get_title_formatsTitle formats (/v1/titles/formats)Costs 3 credits a call; an answer with nothing in it costs nothing.
get_ideasVideo ideas (/v1/ideas)Costs 5 credits a call; an answer with nothing in it costs nothing.
list_nichesNiches (/v1/niches)Costs 3 credits a call.
get_community_postsCommunity posts (/v1/posts)Costs 3 credits per 50 posts returned (at least 3 when anything comes back); an answer with nothing in it costs nothing.
get_hashtag_videosHashtag videos (/v1/hashtag)Costs 3 credits per 50 videos returned (at least 3 when anything comes back); an answer with nothing in it costs nothing.
get_search_suggestionsSearch suggestions (/v1/suggest)Costs 3 credits a call; an answer with nothing in it costs nothing.
resolve_youtube_linkResolve a link (/v1/resolve)Costs 3 credits a call.
get_thumbnailThumbnail (/v1/thumbnail)Costs 3 credits a call.
get_storyboardStoryboard (/v1/storyboard)Costs 3 credits a call; an answer with nothing in it costs nothing.
search_imagesImage search (/v1/images)Costs 4 credits a search that finds at least one picture, nothing when none is found. Previews (the thumb links) are free; each full picture fetched through its fetch link costs 3.
get_media_linksVideo and audio links (/v1/download)Costs 12 credits a minute up to 1080p and 36 above 1080p, counted by the second (a whole video counts its length, a clip or a range only its own length; parts of a credit carry over to the next order). Fetching the stream links it returns is free.
channel_reportChannel report (/v1/report-fast)Costs 3 credits a piece: one piece per video, one per 50 videos listed, with comments one per 50 comments per video, and with transcripts one per video (charged for what came back; 20 videos: 63 credits, with transcripts 123).
get_playbookResearch plan (/v1/playbooks)Free: it costs no credits.
get_social_videoFacebook, Instagram or X video (/v1/social)Costs 12 credits a minute of the post's videos together, counted by started minute (a length the site does not give counts as one minute); a post that is gone, not public or has no video costs nothing. Fetching the file links it returns is free.
check_balance_and_limitsBalance and limits (/v1/limits)Free: it costs no credits.

Protocol versions 2026-07-28 (metadata on every request, server/discover) and 2025-11-25, 2025-06-18 and 2025-03-26 (the initialize handshake) are served on the same address. Listing the tools is free. GET /v1/setup shows the same setups; put your own key where they say YOUR_WAGAMI_KEY. The same on one page, for people and agents: the MCP server page.

Authentication

Every call needs Authorization: Bearer <key>. Keys start with ytg_. You make them in your client area, and each secret is shown once, when it is made. A lost secret can't be recovered: give that key a new secret in the client area (the old one stops at once) and update your code.

  • Keep the key on your server. Never ship it in a browser or mobile app; the API does not answer browser requests from other sites.
  • A key can be set to expire, and on request we can limit it to your own IP addresses. If either applies, you'll get a 403 with a plain reason.
  • Too many failed attempts from one address are briefly blocked (429): 5 minutes at first, longer only if it keeps happening the same day. A valid key is never blocked this way.
  • Our address is https://wagamiai.com (MCP: https://wagamiai.com/mcp). Code and MCP setups still on wagami.fun must change their base URL (same key, same paths): every answer there carries a notice field and an X-New-Address header. From 20 Feb 2027 wagami.fun refuses calls for part of every hour (410, class moved), and from 27 Feb 2027 it refuses all of them.
  • Send a User-Agent header that names your app, for example my-app/1.0. Python's built-in urllib sends a default one that is refused with a 403. requests, httpx, curl and Node set their own and need nothing.

Your account

Your account holds your credits, your keys and their history. Create one at /signup with your email and a password: no invite and no card needed. Choose a plan (it adds credits every month), make a key, and call the API or connect an agent over MCP. Already have an account? Sign in at /signin. Got an invite code (WG-XXXX-XXXX) or a setup link? Use /setup. Lost access? Ask us for a new link.

Keys

  • Make up to 20 keys, one per app, client or agent. All of them draw on your account's credits.
  • Name: a label of your own, so usage reads clearly.
  • Expiry: an optional last day. After it the key answers 403 key_expired.
  • Credit cap: the most this key may spend (0 = no cap). At the cap it answers 402 key_credit_cap, while your other keys keep working.
  • Access: choose which groups of endpoints a key may call; anything else answers 403 not_permitted. A key left open may call everything.
  • Switch a key off and on, give it a new secret, or delete it. Its calls stay in your usage history.

Usage and spend

The client area shows your balance and what you spent today and over 7 and 30 days, usage per day, per endpoint and per key, the latest calls with their status, time and credits, every credit added to your account, and a CSV export of your calls.

Media (download, clip and audio) opens with your account's first payment.

Credits and billing

Calls are paid in credits: 2,000 credits = $1. Each call has a fixed price, listed below and on Pricing, and is taken from your account's balance.

  • You pay only for a successful answer (any 2xx). Errors, refusals, limits and anything that fails on our side cost nothing.
  • The same call asked again costs the same, whether its answer was fresh or ready already.
  • Lookups, captions and transcripts (video, channel, related, suggestions, resolve, thumbnail, storyboard) cost 3 credits each ($1.50 per 1,000).
  • Search costs 3 credits per 20 results returned (at least 3 when anything comes back). Lists cost 3 credits per 50 items returned (at least 3 when anything comes back): a channel's videos, shorts, live or playlists tab, playlist entries, comments, community posts and hashtag pages. That is $0.03 per 1,000 comments or videos.
  • /v1/videos costs 1 credit per video answered (YouTube's own verdicts, such as removed or private, count; an item we could not answer this time, marked "retry": true, costs nothing), a thumbnail pack 3 per thumbnail in it. An answer with nothing in it costs nothing, on every route: a search with no results, an empty list of videos, comments, posts or related videos, no suggestions, no storyboard, a transcript or captions answer with no track in that language. An image search costs 4 credits ($2 per 1,000) when it finds at least one picture (up to 100 of them) and nothing when it finds none; previews are free and a full picture is 3 credits, once per link (image search API, image search prices compared).
  • Media (whole video, clip, audio) costs 12 credits a minute up to 1080p ($6 per 1,000 minutes) and 36 above 1080p (1440p and 4K come with media on paid accounts), counted by the second: a whole video counts its length, a clip the clip (an 8 s clip is 1.6 credits). Parts of a credit carry over to your next media order, so every second is paid once and never rounded up; the call history shows each order's seconds and what was carried. Your balance is checked against the video's real length once it is known. An order for the whole video of a live stream, or one that has just ended, whose length is not known yet, answers 422 length_unknown and costs nothing: ask for a part with start and end. Fetching its stream links is free.
  • A channel report is charged for what it returns, never more than the limits you asked for: 3 credits per video, plus 3 per 50 videos listed (a report on one video by its link has no listing), plus (with comments) 3 per 50 comments returned per video, plus (with transcripts) 3 per video. 100 videos cost 306 credits ($0.15); with a transcript for each, 606. Before it runs, your balance must cover the most it can cost. A queued report is paid at that most up front; what it did not use comes back to your balance (all of it if the report fails) and shows in your credit history. Asking for the same fast report again within 10 minutes, or while it is still running, answers at once with that report and is charged like it. Polling is free.
  • GET /v1/limits, /v1/health, /v1/setup, /v1 and these docs are free.
  • A media order whose links pass nothing before they end (5 hours) gets its credits back by itself.

YouTube data

CallEndpointCredits
Search videos, channels and playlists/v1/search3 per 20 results
Video details/v1/video3 per call
Channel details/v1/channel3 per call
Playlist/v1/playlist3 per 50 videos
Related videos/v1/related3 per call
Search suggestions/v1/suggest3 per call
Hashtag page/v1/hashtag3 per 50 videos
Resolve a link/v1/resolve3 per call
Thumbnail/v1/thumbnail3 per call
Storyboard (preview frames)/v1/storyboard3 per call
A channel's videos, shorts, live and playlists/v1/channel/videos3 per 50 items
Comments/v1/comments3 per 50 comments
Community posts/v1/posts3 per 50 posts
Similar channels/v1/similar15 per call
A channel's outlier videos/v1/channel/outliers3 per 50 videos checked

Research

CallEndpointCredits
Find channels by topic and figures/v1/channels/find2 per channel returned
Channel profiles: figures and labels/v1/channels/profile2 per channel
Find outlier videos by topic and figures/v1/videos/find1 per video returned
Niches with their figures/v1/niches3 per call
Title formats that work, a draft title compared/v1/titles/formats3 per call
Video ideas from what is working/v1/ideas5 per call

YouTube data

CallEndpointCredits
Timed captions/v1/captions3 per call
Plain text transcript/v1/transcript3 per call

Bulk

CallEndpointCredits
Many videos in one call/v1/videos1 per video
Transcripts of many videos in one call/v1/transcripts3 per transcript
Thumbnails as one ZIP/v1/thumbnails-zip3 per thumbnail

Images

CallEndpointCredits
Image search (up to 100 pictures)/v1/images4 per search
Full picture from a search result/v1/image/{token}3 per picture

Media

CallEndpointCredits
Whole video up to 1080p/v1/download12 per minute
Clip up to 1080p/v1/clip12 per minute
Audio/v1/audio12 per minute
Facebook, Instagram or X video/v1/social12 per minute
Media above 1080p (1440p, 4K)/v1/download · /v1/clip above 1080p36 per minute

Reports

CallEndpointCredits
Channel report/v1/report3 per video
Channel report in one call/v1/report-fast3 per video

When credits run out

A call your account can't pay for answers 402 and costs nothing. Branch on its class:

ClassMeaningWhat to do
out_of_creditsThe balance is below this call's price. The answer carries your balance.Top up, then repeat the call. Free calls keep working.
key_credit_capThis key reached the credit cap you set for it.Raise or clear the cap in the client area, or use another key.
account_pausedThe account is paused.Ask in the support chat.
account_requiredThis key is not part of a WagamiAI account yet.Sign in to your account, or create one at /signup, and the key joins it.
response
HTTP/1.1 402 Payment Required

{"ok": false, "class": "out_of_credits", "balance": 0, "error": "…"}

Credits are taken as answers go out, so a burst of calls already in flight when the balance runs out can take it a little below zero; the next call is refused.

Adding credits

Credits come with a plan: every plan adds credits each month, and while a plan is active you can add more as deposits from $5, at 2,000 credits per $1 from $20 (1,600 per $1 from $5, 1,800 from $10), with extra credits on bigger deposits (+5 % from $40, +10 % from $75, +15 % from $120, +25 % from $500 and above). A plan gives the same credits for each dollar as a deposit of the same amount. The top ups on Pricing are these steps: $5 (8,000 credits), $10 (18,000), $25 (50,000), $50 (105,000), $100 (220,000), $500 (1,250,000). Accounts that bought credits before 7 November 2026 keep the earlier extra credits (+10 % from $50, +20 % from $100, +35 % from $250, +60 % from $500) until 7 February 2027, and never get fewer credits than these steps. Credits never expire. In your client area, open Credits, pick a package or enter an amount and continue to the secure checkout. You pay on Stripe's secure checkout page (card, Apple Pay or Google Pay), and the credits are added as soon as the payment is confirmed. Deposits are final: see the Refund policy. Pressing pay again on an order that is still waiting reopens the same payment page for 20 minutes. We never see or keep your card details. The calculator on Pricing shows what a deposit buys.

Errors

JSON answers carry "ok": true on success. The /api/* routes and the reports (/v1/report, /v1/report/{id}, /v1/report-fast) and /v1/thumbnails-zip use "success" instead, so check ok ?? success (and the HTTP status). Failures carry error in plain words and a stable class you can branch on. A failure you can try again says "retry": true and comes with a Retry-After header; one without "retry": true is final for what you sent: change what error says, then call again. A failed call is never charged.

StatusClassMeaning
400bad_requestThe body is not a JSON object, or a field has the wrong type.
401key_missing · key_unknown · unauthorizedNo key, or an unknown key.
402out_of_credits · key_credit_cap · account_paused · account_requiredYour account cannot pay for this call, and nothing was charged: the balance is below the call's price (out_of_credits, with your balance; for media, the price of the video's real length; for a report, the most it can cost), this key reached the credit cap set for it (key_credit_cap; your other keys keep working), the account is paused (account_paused), or this key is not yet part of an account (account_required: sign in to your account, or create one, and the key joins it). Add credits or raise the key's cap in your client area, then repeat the call. See Credits and billing.
403not_permitted · key_disabled · key_expired · ip_not_allowed · media_offThe key lacks the permission for this call, is paused, past its end date, called from an address it doesn't allow, or media is not open for it yet (media_off: media opens with your account's first payment). A not_permitted answer names the permission it needed (needed) and lists what this key may call (allowed, the same list as GET /v1/limits), so a program or an AI agent can pick another route.
404unknown_route · link_expired · not_foundUnknown route (unknown_route; docs links this page), a media or picture link that has ended (link_expired: order again), or a job that isn't yours (not_found).
405wrong_methodThe route takes the other method (GET or POST); error names the right one.
409links_onlyA media order without delivery: "links": send "delivery": "links"; example is the exact call.
410addon_outdated · link_spentAn add-on older than the current one: the answer carries the one command that updates it; run it and repeat the call. A media link that passed along all it may (link_spent: ten times its stream for a link paid in credits): order again.
411 / 413bad_request · too_largeA chunked body, or a body over 64 KB.
422not_found · yt_unavailable · members_only · geo_block · drm · age_restricted · live_not_started · live_no_recording · post_live · not_available · no_tab · too_long · live · length_unknown · bad_ref · too_many_refs · bad_query · bad_input · restricted_contentYouTube's own answer about this item (retrying won't change it), or an invalid parameter: bad_ref (not a YouTube id, handle or link), too_many_refs (a batch over its limit: split it), bad_query (an empty or over-long search), bad_input (another parameter, such as an unsupported height; error names it). length_unknown: an order for the whole video of a live stream, or one that has just ended, whose length is not known yet; nothing is charged, ask for a part with start and end. restricted_content: adult, graphic or other harmful content, which is not available through the service (age_restricted likewise for videos YouTube marks for adults only); neither is charged.
429rate_limited · daily_quota · download_quota · endpoint_quota · slow_down · concurrency · jobs_open · busyToo many calls at once (concurrency, or account_concurrency for your whole account), too many report jobs open, or busy media. Keys a partner gave out also have that partner's limits per minute, per day and per endpoint (rate_limited, daily_quota, download_quota, endpoint_quota, slow_down); keys on your own account have none of those. Wait for Retry-After. Every answer you can simply send again carries "retry": true.
500internalOur own fault, not your call's. Try again after Retry-After (retry: true).
503busyBusy right now. Try again shortly (retry: true).
504timeoutThe call took longer than 90 seconds. It is not counted against your limits. Retry after Retry-After: the work often finishes meanwhile and the repeat is answered at once. Media never waits: its links come back at once.
Temporary errors. A 503 or 504 with "retry": true means YouTube is not answering for the moment. Wait for Retry-After and try again.

What your code should do

  • On 429, 503 and 504: wait the Retry-After seconds (plus a second or two at random), then retry. Give up after a few tries. A call that is refused or times out is never counted.
  • On 402: stop and top up, or raise the key's credit cap. Retrying unchanged won't help.
  • On any other 4xx: don't retry; fix the call. The error says what's wrong.
  • Every answer carries an X-Request-Id. Quote it when you report a problem, and we can find that exact call.
  • Keep your key on your server. Never put it in a web page, an app or a public repository. If it leaks, give it a new secret in your client area right away: the old one stops at once.

Limits

Your balance is the only limit. Keys on your account have no cap on calls per minute, per day or per week, on downloads, or on batch calls: they work for as long as your balance covers them and stop with 402 out_of_credits when it runs out. Calls running at the same time never spend the same credits twice, so a key can't go past its balance. You can still give one key a spending cap of your own (402 key_credit_cap).

WhatYour keysNotes
creditsYour balanceThe only limit. GET /v1/limits shows it under credits.
max_concurrent12 per accountCalls in flight at once, shared by your keys. One more waits up to 40 s for a free slot, so a steady stream simply queues; only a call that waits longer gets 429.
max_height1080The highest video resolution served: 1080p, or 2160p with media on paid accounts.
max_seconds0 (none)The longest video, clip or audio range you can get, in seconds, when your key has one; caps.max_seconds in GET /v1/limits is the one that counts for you. Longer asks answer 422 with class too_long; a longer video can still be cut into clips within it.

Keys a partner gave out keep that partner's limits per minute, day and week. For those, every answer carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (seconds until 00:00 UTC) and the 60-second window in X-RateLimit-Limit-Minute / X-RateLimit-Remaining-Minute, and GET /v1/limits shows what is left of each.

If media is busy you'll get 429 with Retry-After, so wait and try again.

Choosing a resolution

Media opens with your account's first payment. /v1/download and /v1/clip take an optional height: "best" (the default) or one of 144, 240, 360, 480, 720, 1080, 1440, 2160. You get the tallest picture the video offers up to that height, and never more than your key's max_height. Every key gets up to 1080; 1440 and 2160 come with media on paid accounts. POST /v1/video returns a resolutions list with the heights a video offers. Any other value returns 422.

shell
curl -X POST "https://wagamiai.com/v1/video" \
  -H "Authorization: Bearer $WAGAMI_KEY" -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ"}'          # ... "resolutions": [144, 240, 360, 480, 720, 1080]

curl -X POST "https://wagamiai.com/v1/download" \
  -H "Authorization: Bearer $WAGAMI_KEY" -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "height": 720, "delivery": "links"}'

Live console

Your key stays in this browser tab and is sent only to this API. Calls made here are charged like any other. For media endpoints you get the stream links; open them to save the streams.

Press Send to run a request.
idle —

Health

GET/v1/healthfree

Status plus your key's remaining quota. media is ok, or busy when media orders should wait a moment. Free: it does not count against limits.

Example

request
curl "https://wagamiai.com/v1/health" \
  -H "Authorization: Bearer $WAGAMI_KEY"

Returns

response
{"ok": true, "status": "ok", "media": "ok", "time": "…", "limits": {…}}

Limits

GET/v1/limitsfree

Your key's caps and what is left this minute, today (resets 00:00 UTC) and this week (resets Monday 00:00 UTC). A weekly cap of 0 means none, and its …_left is null. endpoints lists every endpoint group this key may call, with its endpoints, today's use and, where one is set, its daily cap per person (daily_cap), for the whole account (account_daily_cap) and what is left (left_today). A group not listed is not open to this key. For a key on an account, credits has the account's balance, what this key has spent (key_spent), its own cap (key_credit_cap, null = none) and where to add more (add). Free.

Example

request
curl "https://wagamiai.com/v1/limits" \
  -H "Authorization: Bearer $WAGAMI_KEY"

Returns

response
{"ok": true, "key": "you", "limits": {"per_min_left": 118, "daily_requests_left": 9500, "weekly_requests_left": null, …}, "caps": {"weekly_requests": 0, …}, "expires": null, "endpoints": [{"permission": "search.videos", "what": "…", "endpoints": ["POST /v1/search", …], "used_today": 12, "daily_cap": 500, "left_today": 488}, …]}

Research plans

GET/v1/playbooksfree

Step-by-step research plans for an assistant or an agent to follow: finding rising channels, sizing up a niche, studying a channel or a video, title, thumbnail and script studies, video ideas, a script outline, a production plan. Without a query: every plan in one line (name, family, title, about, needs). With ?name=NAME&about=TEXT: that plan's steps as plan, and under calls the endpoint behind every tool the steps name. Free.

Example

request
curl "https://wagamiai.com/v1/playbooks" \
  -H "Authorization: Bearer $WAGAMI_KEY"

Returns

response
{"ok": true, "playbooks": [{"name": "niche_scorecard", "family": "scout", "title", "about", "needs": "topic"}, …], "next"}

Media add-on

GET/v1/pluginfreeapplication/zip

The media add-on as a zip, the same file for everyone. Public: no key is needed to fetch it, so an AI agent can fetch it before anything else. It uses your key only when it runs, and GET /v1/setup says how to install it. From 1.6 on it keeps itself up to date (at once when an answer says a newer one is out, else every 6 hours, in the background; WAGAMI_UPDATE=0 (or update=no in the add-on's options) turns that off). An older add-on is told on every answer: the field addon_update and the header X-Addon-Update name the current version and where to get it.

Example

request
curl "https://wagamiai.com/v1/plugin" \
  -o wagami.zip

Returns

response
wagami.zip (pyproject.toml + the add-on)

Add-on version

GET/v1/plugin/versionfree

The current add-on version and the zip's sha256 and size. Public. An agent that installed the add-on compares it with the installed one (the add-on names its version in its User-Agent) and reinstalls from GET /v1/plugin when it is older.

Example

request
curl "https://wagamiai.com/v1/plugin/version"

Returns

response
{"ok": true, "version": "1.6", "sha256": "…", "size": 9000, "get": "https://…/v1/plugin"}

Setup

GET/v1/setupfreetext/plain

This key's own setup as plain text: what it may call, its limits and, once media is open for it, how to install the media add-on. Made to be handed to an AI agent unchanged. Free.

Example

request
curl "https://wagamiai.com/v1/setup" \
  -H "Authorization: Bearer $WAGAMI_KEY"

Returns

response
WagamiAI API access
Base URL   https://…
API key    <the key you were sent>
Limits     …
Setup for an AI agent (paste this section to it as-is)
   1. …

Autocomplete

POST/v1/suggest3 credits

YouTube's search suggestions for a prefix.

Parameters

NameTypeDescription
queryrequiredstringPrefix text.

Example

request
curl -X POST "https://wagamiai.com/v1/suggest" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "how to b"}'

Returns

response
{"ok": true, "suggestions": ["how to boil eggs", …]}

Hashtag

POST/v1/hashtag3 credits per 50 videos

Videos on a hashtag page.

Parameters

NameTypeDescription
tagrequiredstringOne hashtag, with or without #.
limitint1 to 200, default 60.

Example

request
curl -X POST "https://wagamiai.com/v1/hashtag" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tag": "travel", "limit": 20}'

Returns

response
{"ok": true, "items": [...]}

Channel

POST/v1/channel3 credits

About facts: title, handle, subscribers, video count, links, description, avatar and banner.

Parameters

NameTypeDescription
refrequiredstringHandle (@name), channel id (UC…) or channel URL.

Example

request
curl -X POST "https://wagamiai.com/v1/channel" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "@veritasium"}'

Returns

response
{"ok": true, "channel": {"id", "title", "handle", "subscribers", "views", "video_count", "joined", "country", "links", "avatar", "banner", …}}

Channel tab

POST/v1/channel/videos3 credits per 50 items

Rows from one channel tab.

Parameters

NameTypeDescription
refrequiredstringHandle, channel id or URL.
tabstringvideos (default), shorts, streams, podcasts, playlists.
limitint1 to 1000, default 60.
sortstringnewest (default), popular, oldest.

Example

request
curl -X POST "https://wagamiai.com/v1/channel/videos" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "@veritasium", "tab": "videos", "sort": "popular", "limit": 25}'

Returns

response
{"ok": true, "items": [{"id", "title", "views", "duration", "published_ts", "is_short", "live", "thumbnail", "url"}]}

Community posts

POST/v1/posts3 credits per 50 posts

Text, polls, images and shared videos from the community tab.

Parameters

NameTypeDescription
refrequiredstringHandle, channel id or URL.
limitint1 to 100, default 30.

Example

request
curl -X POST "https://wagamiai.com/v1/posts" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "@mkbhd", "limit": 10}'

Returns

response
{"ok": true, "items": [...]}

Similar channels

POST/v1/similar15 credits

Channels watched by the same viewers, strongest first, with the channels the creator lists on its own page. strength runs from 0 to 100; seen says how many of the channel's videos it showed up beside; picked is true when the creator lists it. Up to three of its videos come as examples. An answer with nothing in it costs nothing.

Parameters

NameTypeDescription
refrequiredstringHandle, channel id or URL.
limitint1 to 50, default 20.

Example

request
curl -X POST "https://wagamiai.com/v1/similar" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "@veritasium", "limit": 10}'

Returns

response
{"ok": true, "channel_id", "channel", "items": [{"channel_id", "channel", "handle", "url", "strength", "seen", "picked", "subscribers", "examples": [{"id", "title", "views", "url"}]}]}

Channel outliers

POST/v1/channel/outliers3 credits per 50 videos checked

A channel's videos that beat its own usual views, biggest first, among the newest videos of a tab (window). Each video comes back with its multiple (how many times the channel's usual views), age_days and still_growing. The channel's channel, handle, subscribers and avatar come with it. 3 credits per 50 videos looked at; when none beat the usual it costs nothing.

Parameters

NameTypeDescription
refrequiredstringHandle, channel id or URL.
tabstringvideos (default) or shorts.
windowintHow many of the newest videos to check: 10 to 300, default 60.
min_multiplenumber1 to 100, default 2.
limitint1 to 100, default 20.

Example

request
curl -X POST "https://wagamiai.com/v1/channel/outliers" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "@veritasium", "window": 100, "min_multiple": 2}'

Returns

response
{"ok": true, "channel_id", "channel", "handle", "subscribers", "avatar", "tab", "min_multiple", "items": [{"id", "title", "views", "multiple", "age_days", "still_growing", "duration", "published_ts", "is_short", "thumbnail", "url"}]}

Find channels

POST/v1/channels/find2 credits per channel returned

Channels by topic and figures, in any niche: for example new GTA channels that started in the last month and already average 50,000 views a video. Each channel carries its figures (subscribers, average and typical views, views a day and a month, uploads a week, average length, its best video against its usual views, growth, start date), its niche and sub_niche, who makes it (maker: faceless, mostly_faceless, ai_avatar, clips, compilation, presenter_led, official; faceless true or false once known), its style and format, whether it is monetized, an estimated RPM and monthly revenue range in US dollars, its three best videos, and as_of: when its figures were read. With a topic, only channels that are about it come back, and summary gives the topic's own figures over every channel that matched. 2 credits per channel returned; nothing found costs nothing; max_credits caps a call.

Parameters

NameTypeDescription
topicstringWords to look for, for example GTA, true crime, stoicism. Optional when other filters are given.
niche / sub_nichelistNiche ids from /v1/niches.
facelessbooltrue: only channels known to have no person on camera, or an AI presenter; false: only channels known to be something else. Left out: every channel. With either, maker_unknown in the answer counts the channels that match with their maker not known yet.
maker / style / formatlistValues from /v1/niches (makers, styles, formats). maker also takes unknown: channels whose maker is not known yet.
formstringany (default), long, short, mixed.
min_ / max_ figuresnumbersubscribers, avg_views, median_views, monthly_views, views_per_day, uploads_per_week, avg_length_seconds, videos, total_views, outlier, growth, rpm_usd, monthly_revenue_usd, each as min_… and max_….
started_within_daysintThe channel's first upload in the last N days. Also started_after / started_before (YYYY-MM-DD) and active_within_days (last upload).
monetized / language / countrymonetized true (only channels confirmed as monetized) or false (only channels confirmed as not); language and country lists, by name or code: ["Spanish"] or ["es"], ["United States", "GB"]. Channels in English when language is left out; ["any"] for every language.
sortstringrelevance (default with a topic), best (default without), views_per_subscriber, monthly_views, newest, subscribers, avg_views, median_views, views_per_day, growth, outlier, revenue, uploads, added, active.
limit / pageint1 to 50 a page (default 20); page from 1.
livestringauto (default): the fullest answer; never: the quickest answer; fresh: page 1 also brings up to fresh_max channels found right now (needs a topic), first in the list.
fresh_maxintWith live: "fresh": at most this many more channels, 1 to 12 (default 6).
max_creditsintThe most this call may cost.

Example

request
curl -X POST "https://wagamiai.com/v1/channels/find" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topic": "GTA", "started_within_days": 31, "min_avg_views": 50000, "limit": 6}'

Returns

response
{"ok": true, "query", "filters", "page", "limit", "total", "has_more", "items": [{"id", "title", "handle", "url", "avatar", "subscribers", "avg_views", "median_views", "views_per_day", "monthly_views", "uploads_per_week", "avg_length_seconds", "best_outlier", "growth", "started", "age_days", "last_upload", "form", "niche": {"id", "name"}, "sub_niche", "maker", "faceless", "style", "format", "language", "country", "monetized", "est_rpm_usd": {"low", "high"}, "est_monthly_revenue_usd": {"low", "high"}, "top_videos": [{"id", "title", "views", "outlier", "published", "thumbnail", "url"}], "as_of"}]}

Find outlier videos

POST/v1/videos/find1 credit per video returned

Videos far above their own channel's usual views, on any topic: the ideas that worked. Each comes with its outlier (how many times its channel's usual views), its title_format, its channel (name, subscribers, niche, maker), its thumbnail and as_of: when its figures were read. With a topic the answer also carries title_formats: the title formats those videos use, each with how many videos and channels use it and real titles as examples. 1 credit per video returned; nothing found costs nothing.

Parameters

NameTypeDescription
topicstringWords in the title, for example GTA.
niche / sub_niche / makerlistAs in /v1/channels/find; also faceless, monetized and language.
min_outliernumberDefault 3.
livestringauto (default): the fullest answer; never: the quickest answer.
published_within_daysintOnly videos from the last N days. Also channel_started_within_days.
min_ / max_ figuresnumberviews, subscribers (the channel's), length_seconds, outlier.
formstringany (default), long, short.
per_channelintVideos of one channel at most, 1 to 50. With a topic the default is 2, so a list is of many channels.
sort / limit / pageoutlier (default), views, newest; 1 to 50 a page.

Example

request
curl -X POST "https://wagamiai.com/v1/videos/find" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topic": "GTA", "max_subscribers": 50000, "published_within_days": 30, "min_outlier": 5}'

Returns

response
{"ok": true, "query", "filters", "total", "has_more", "items": [{"id", "title", "views", "outlier", "published", "age_days", "length_seconds", "is_short", "thumbnail", "url", "channel": {"id", "title", "handle", "subscribers", "median_views", "started", "niche", "maker", "faceless"}}]}

Title formats

POST/v1/titles/formats3 credits

The title formats that work for a topic, niche or channel: each with how many videos and channels use it, their median views and how far above their channel's usual they typically go, templates such as {N} things about {X} nobody noticed and real titles as examples. Send a draft title too and it comes back read and compared: its title_formats, template, features, the formats it shares and formats_it_lacks with examples. A draft title sent alone (no topic, niche or channel) is read and costs nothing. 3 credits a call.

Parameters

NameTypeDescription
topic / niche / sub_niche / channelWhere to look: a topic in your own words, niche or sub-niche ids, or one channel (@handle, UC… id or link). Also the filters of /v1/videos/find: max_subscribers, published_within_days, form, faceless, monetized, language.
titlestringA draft title, 1 to 300 characters.
limitint1 to 20 formats (default 15).
livestringauto (default): the fullest answer; never: the quickest answer.

Example

request
curl -X POST "https://wagamiai.com/v1/titles/formats" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topic": "GTA 6", "title": "Lucia's best moments"}'

Returns

response
{"ok": true, "query", "filters", "videos_weighed", "title_formats": [{"id", "label", "family", "videos", "channels", "median_views", "median_outlier", "templates", "examples"}], "title": {"title", "title_format", "title_formats", "template", "features", "compared_with", "shared_formats", "formats_it_lacks", "usual_characters", "usual_words"}}

Video ideas

POST/v1/ideas5 credits

Video ideas from what is working, each a draft title with the real video that proves it (proof: title, views, outlier, channel), its title format and the name it is about (subject). mode today (the default): the formats standing out in a topic, niche or channel now, filled with the names its newest videos are about. like: more like one title, with the videos alike. bend: the formats working in from carried into to, each with in_target: its state there (not_done, rare, done_and_working, done_did_not_stand_out). The answer also carries the formats and subjects the ideas come from. 5 credits a call.

Parameters

NameTypeDescription
modestringtoday (default), like (needs title), bend (needs from and to).
topic / niche / sub_niche / channelWhere to look: a topic in your own words, niche or sub-niche ids, or one channel (@handle, UC… id or link). Also the filters of /v1/videos/find: max_subscribers, published_within_days, form, faceless, monetized, language.
titlestringMode like: the title to make more like. Without a topic, niche or channel its own subject is where to look.
from / toobjectMode bend: each a topic, niche, sub_niche or channel, with any filter.
limitint1 to 30 ideas (default 12).
livestringauto (default) or never.

Example

request
curl -X POST "https://wagamiai.com/v1/ideas" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "bend", "from": {"topic": "GTA 6"}, "to": {"topic": "Red Dead Redemption"}}'

Returns

response
{"ok": true, "mode", "source", "target", "source_videos", "target_videos", "ideas": [{"draft", "title_format", "label", "template", "subject": {"name", "videos", "channels"}, "proof": {"id", "title", "views", "outlier", "url", "channel"}}], "formats": [{"id", "label", "videos", "median_outlier", "templates", "proof", "in_target": {"videos", "share", "state", "example"}}], "subjects": [{"name", "videos", "channels", "median_outlier", "example"}]}

Channel profiles

POST/v1/channels/profile2 credits per channel

Figures and labels for up to 25 channels you name, any channel on YouTube: the same fields as /v1/channels/find. not_found lists the ones that could not be read. 2 credits per channel. With detail: true the first 5 channels also carry insight: history (subscribers, views and videos day by day), change, look (format, style, how its videos are told and a short description of how they look), breakouts (its uploads far past its usual views), reasons (plain sentences), ideas (title ideas from its breakouts), room (sub-niches beside it), alike (channels like it) and writeup (why it works, in plain sentences: summary, titles, thumbnails, opening, script, format, rhythm, and make_next: up to 3 videos to make, each a title and an angle). Parts with nothing in them are left out.

Parameters

NameTypeDescription
refsrequiredlist1 to 25 channels: @handle, UC… id or channel link.
livestringauto (default) or never.
detailboolAdd insight to the first 5 channels (no extra credits).
refreshboolBring figures that have grown old up to date.
check_monetizationboolCheck now whether each channel is monetized: a channel whose answer is older than a day, not known yet or never checked is checked in this call (any channel on YouTube); one checked in the last day is given as it is. monetized is true, false or null (cannot be told yet) and monetized_as_of says when it was checked. Same price.

Example

request
curl -X POST "https://wagamiai.com/v1/channels/profile" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"refs": ["@veritasium", "@kurzgesagt"], "detail": true}'

Returns

response
{"ok": true, "not_found": [], "items": [{"id", "title", "subscribers", "niche", "maker", "faceless", "est_monthly_revenue_usd", "views_per_subscriber", "top_videos", "as_of", "insight": {"history", "change", "look", "breakouts", "reasons", "ideas", "room", "alike", "writeup"}, …}]}

Niches

POST/v1/niches3 credits

Every niche with its figures: how many channels, the share without a person on camera and of Shorts channels, median views and subscribers, an estimated RPM range, growth, how many channels started in the last 30 and 365 days, outlier videos in the last 30 days, title formulas that work, the thumbnail style that works, and its sub-niches with their channel counts. It also lists the makers, styles, formats and sorts the find routes take. Send compact: true for the figures alone, or name niches to get only those in full. 3 credits a call.

Parameters

NameTypeDescription
nichelistNiche ids to get in full (from a compact answer).
compactbooltrue: every niche with its figures only, without formulas and sub-niches.

Example

request
curl -X POST "https://wagamiai.com/v1/niches" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"compact": true}'

Returns

response
{"ok": true, "library": {"channels", "videos"}, "niches": [{"id", "name", "group", "about", "channels", "faceless_share", "shorts_share", "median_views", "median_subscribers", "est_rpm_usd", "growth", "new_channels_30d", "outlier_videos_30d", "title_formulas", "thumbnail_style", "sub_niches": [{"id", "name", "channels"}]}], "makers", "styles", "formats", "channel_sorts", "video_sorts"}

Video

POST/v1/video3 credits

Full metadata for one video, including the resolutions it offers (the standard heights up to max_height), approx_mb (about how many MB the whole video is at each height, when YouTube states it), max_fps, codecs, aspect_ratio, the license text (for example Creative Commons), the song it lists (music), location, release_timestamp (a premiere or a planned live) and live_viewers while it is live. Fields YouTube does not show for a video are null.

Parameters

NameTypeDescription
refrequiredstringVideo id or any YouTube video link (watch, shorts, live, embed, youtu.be; with or without https://).
pageboolAdds more facts about the video: ads, ad_breaks, midroll, ai_label, spoken_lang, made_for_kids, family_safe, category, related.

Example

request
curl -X POST "https://wagamiai.com/v1/video" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "page": true}'

Returns

response
{"ok": true, "video": {"id", "title", "description", "channel", "channel_id", "views", "likes", "comments", "duration", "upload_date", "chapters", "heatmap", "tags", "live", "availability", "caption_langs", "max_height", "resolutions", "approx_mb": {"720": 54.2, "1080": 95.0}, "max_fps", "codecs", "license", "music", …}}

Videos (batch)

POST/v1/videos1 credit per video

Many videos in one call: up to 200 are read a call, 1 credit per video answered. Refs past that, and any not reached in the call's time, come back with "retry": true and cost nothing: send them again. A failed item carries its own error; the rest still return.

Parameters

NameTypeDescription
refsrequiredstring[]1 to 1,000 ids or URLs (200 read a call).
pageboolAs in /v1/video.
max_creditsintThe most this call may spend: fewer videos are read, the rest come back to send again.

Example

request
curl -X POST "https://wagamiai.com/v1/videos" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"refs": ["dQw4w9WgXcQ", "jNQXAC9IVRw"]}'

Returns

response
{"ok": true, "items": [{…}, {"id": "…", "error": {"class", "error"}}]}

Comments

POST/v1/comments3 credits per 50 comments

Comment threads.

Parameters

NameTypeDescription
refrequiredstringVideo id or URL.
limitint1 to 500, default 100.
sortstringtop (default) or new.
repliesboolInclude replies.

Example

request
curl -X POST "https://wagamiai.com/v1/comments" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "limit": 50, "sort": "top"}'

Returns

response
{"ok": true, "items": [{"author", "text", "likes", "timestamp", …}]}

Captions

POST/v1/captions3 credits

Timed caption cues, the manual track first, then the automatic one.

Parameters

NameTypeDescription
refrequiredstringVideo id or URL.
langstringLanguage code, default en.

Example

request
curl -X POST "https://wagamiai.com/v1/captions" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "lang": "en"}'

Returns

response
{"ok": true, "captions": {"id", "lang", "kind": "creator|automatic", "lines": [{"t", "d", "text"}]}}

Transcript

POST/v1/transcript3 credits

The captions as plain text.

Parameters

NameTypeDescription
refrequiredstringVideo id or URL.
langstringDefault en.

Example

request
curl -X POST "https://wagamiai.com/v1/transcript" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ"}'

Returns

response
{"ok": true, "transcript": "Today we look at three simple ways to light a small studio…"}

Transcripts (batch)

POST/v1/transcripts3 credits per transcript

Plain-text transcripts of many videos in one call (up to 50 read a call), in the order asked. A video with none in that language has an empty transcript and a hint naming the languages it has; one that cannot be read carries an error of its own (with "retry": true when asking again usually works). kind is creator or automatic. 3 credits per transcript that comes back.

Parameters

NameTypeDescription
refsrequiredarray1 to 1,000 video ids or URLs (50 read a call; the rest come back to send again, free).
langstringDefault en.
max_creditsintThe most this call may spend.

Example

request
curl -X POST "https://wagamiai.com/v1/transcripts" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"refs": ["dQw4w9WgXcQ", "jNQXAC9IVRw"]}'

Returns

response
{"ok": true, "items": [{"id", "lang", "kind", "transcript"}, {"id", "error": {"class", "error", "retry"}}]}

Storyboard

POST/v1/storyboard3 credits

Preview sprite sheets (the frames shown when you hover the progress bar) with their grid layout. Frame k (counting across the sheets) shows the video at k × interval_s seconds, YouTube's own spacing (1, 2, 5 or 10 s); null means the frames are spread evenly over duration.

Parameters

NameTypeDescription
refrequiredstringVideo id or URL.
viewbooltrue: the sheets themselves come back as pictures (pictures: each with sheet, from_s, to_s, mime, bytes and picture_base64), for an assistant to look through the video. Same price.
sheetsintWith view: 1 to 4 sheets spread over the video, default 2.
atnumberWith view: start at this second of the video.

Example

request
curl -X POST "https://wagamiai.com/v1/storyboard" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ"}'

Returns

response
{"ok": true, "storyboard": {"id", "duration", "rows", "cols", "frame_width", "frame_height", "frames", "interval_s": 10.0, "sheets": ["https://i.ytimg.com/sb/…"]}}

Thumbnail

POST/v1/thumbnail3 creditsbytes optional

The best thumbnail URL, or the image bytes themselves with bytes: true. With view: true the picture comes back inside the answer (picture_base64 beside url, quality, mime, bytes) for an assistant to look at; with refs up to 8 videos' thumbnails come back together (pictures, and not_shown for any that had none), each one shown at the price of a thumbnail.

Parameters

NameTypeDescription
refstringVideo id or URL.
refsarrayUp to 8 video ids or URLs, in place of ref: their thumbnails as pictures in one answer.
viewbooltrue: the picture itself in the answer (size hq unless quality is given).
qualitystringmaxres (default), sd, hq, mq, default.
bytesboolStream the image. You can also pass url for any YouTube image (avatar, banner, storyboard tile).

Example

request
curl -X POST "https://wagamiai.com/v1/thumbnail" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "quality": "maxres"}'

Returns

response
{"ok": true, "url": "https://i.ytimg.com/vi/…/maxresdefault.jpg"}

Resolve

POST/v1/resolve3 credits

Turns a handle, channel URL or custom URL into the canonical channel id.

Parameters

NameTypeDescription
refrequiredstringHandle, channel URL or id.

Example

request
curl -X POST "https://wagamiai.com/v1/resolve" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "@veritasium"}'

Returns

response
{"ok": true, "resolved": {"id", "handle", "title", "url"}}

Playlist

POST/v1/playlist3 credits per 50 videos

Playlist facts and entries.

Parameters

NameTypeDescription
refrequiredstringPlaylist id (PL…) or URL.
limitint|"all"1 to 1000 or "all", default 200.

Example

request
curl -X POST "https://wagamiai.com/v1/playlist" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF", "limit": 25}'

Returns

response
{"ok": true, "playlist": {"id", "title", "count", "entries": [...]}}

Image search

POST/v1/images4 credits per search

Pictures for any query, in one list, and the same picture never comes back twice. Each item gives the picture's own address (url), the page it is on and its site (items[].page, items[].host), its size and format, and two links on this service: thumb, a small preview, and fetch, the full picture (see Picture links). 4 credits for a search that finds at least one picture (up to 100 of them); a search that finds none is free. It needs the images.search permission on keys with limited access. The answer repeats the filters the search ran with (filters), in the names you sent. Filters narrow what is found; min_width, min_height and format are checked on each picture, so asking for them can bring back fewer pictures than limit.

Parameters

NameTypeDescription
queryrequiredstringWhat to look for, 1 to 200 characters.
limitint1 to 100, default 30.
safestringAlways strict: adult pictures are never returned. moderate and off are still accepted and give the same strict results.
sizestringsmall, medium, large, wallpaper.
typestringphoto, clipart, gif, line (line drawings), transparent.
layoutstringsquare, wide, tall.
colorstringcolor, mono, or one of red, orange, yellow, green, blue, purple, pink, brown, black, gray, white.
licensestringany (the default: the licence doesn't matter), creative_commons (any Creative Commons licence), commercial (Creative Commons that allows commercial use), public_domain; also modify and modify_commercial (free to change, and to change for commercial use). The older names share, share_commercial and public still work and mean the same as creative_commons, commercial and public_domain. The licence is what the picture's site reports, and a filter, not a grant: every item carries the page it came from (items[].page, null in the rare case it is not known), so check that page for the terms before you publish or reuse the picture.
timestringday, week, month, year: only pictures found within that time.
peoplestringface (faces in close up) or portrait (head and shoulders). Best effort: some results may still not show a person.
min_widthint1 to 10000: the smallest width in pixels. Checked on each picture whose size is known; a picture of unknown size (width null) is kept.
min_heightint1 to 10000: the smallest height in pixels, checked the same way.
formatstringjpg, png, gif, webp. Only pictures known to be in that format come back (items[].format says jpeg for jpg).
pageint1 to 5, default 1: the next pages of results for the same query.

Example

request
curl -X POST "https://wagamiai.com/v1/images" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "northern lights over a lake", "layout": "wide", "license": "commercial", "min_width": 1920, "limit": 30}'

Returns

response
{"ok": true, "query": "northern lights over a lake", "filters": {"safe": "strict", "layout": "wide", "license": "commercial", "min_width": 1920}, "count": 30, "items": [{"id": "…", "title": "Aurora above the still lake", "url": "https://example.org/photos/aurora.jpg", "page": "https://example.org/gallery/aurora", "host": "example.org", "width": 2400, "height": 1350, "format": "jpeg", "thumb": "https://wagamiai.com/v1/image/…?w=thumb", "fetch": "https://wagamiai.com/v1/image/…"}, …]}

Video media

POST/v1/download12 credits per minute · 36 above 1080p200 · linkscounts as a media order

Media opens with your account's first payment. Answers at once (200) with the video's picture and sound as two streams links (up to the height you choose, within your key's cap). Your machine fetches them and joins them into one MP4: see Media links. The media add-on and the developer client (GET /v1/client) do all of it by themselves; your key's GET /v1/setup has the exact commands. An order without delivery: "links" answers 409 links_only with what to send instead. A live stream, or one that has just ended, has no length yet: an order for the whole video answers 422 length_unknown and costs nothing; ask for a part with Clip (start and end).

Parameters

NameTypeDescription
refrequiredstringVideo id or URL.
heightstring|intbest (default) or 144, 240, 360, 480, 720, 1080, 1440, 2160. You get the tallest picture the video offers up to that height, never above your key's max_height. Up to 1080 on every key; 1440 and 2160 come with media on paid accounts.
audioboolfalse: the picture alone (one video stream, no sound). Default true: picture and sound.
deliveryrequiredstringlinks.

Example

request
curl -X POST "https://wagamiai.com/v1/download" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "jNQXAC9IVRw", "height": 720, "delivery": "links"}'

Returns

response
{"ok": true, "kind": "download", "video": {"id", "title", "channel", "duration", …}, "streams": [{"kind": "video", "url": "/v1/media/…", "format_id": "v720", "ext": "mp4", "codec": "avc1…", "width": 1280, "height": 720, "fps": 30, "size": …}, {"kind": "audio", "url": "/v1/media/…", "format_id": "a128", "ext": "m4a", "codec": "mp4a…", "size": …}], "expires_in": 18000}

Clip

POST/v1/clip12 credits per minute · 36 above 1080p200 · linkscounts as a media order

A time range, up to your key's max_seconds (GET /v1/limits). Media opens with your account's first payment. Answers at once like Video media, plus cut: {"start", "end"}. Your machine reads just that range of each stream (byte ranges) and cuts on the exact frame; see Media links. With clip_only: true each link is a small file of only the part of the video around the clip (a few MB, not the whole video): save it in full, then cut each stream at its own cut_in_file. Without it, a plain download of a link (no Range) gives the video from its start to the end of the clip: the clip stays at its own times and nothing past it is sent or charged; reading in parts (Range, as players and media tools do) reaches the whole video. With clip_only: false a plain download gets the whole video too. Several parts of one video: send cuts instead of start and end. One order answers them all, in clips: each with its own cut and streams (clip-only unless you send clip_only: false), each charged by its own seconds. A part that starts past the video's end comes back as {"cut", "ok": false, "class": "bad_input", "error"} and costs nothing.

Parameters

NameTypeDescription
refrequiredstringVideo id or URL.
startnumber|stringSeconds (42.8) or a time ("1:05.5", "1:02:03.25"), to the millisecond. Required unless you send cuts.
endnumber|stringSame forms; end − start at most your key's max_seconds. Required unless you send cuts.
cutscut[]1-10 parts of the same video, each {"start", "end"} in the same forms, each at most your key's max_seconds. Use it instead of start and end when you need several shots from one video: one order, one answer, faster than one order per shot.
heightstring|intAs in Video media.
audioboolfalse: the picture alone, as in Video media.
clip_onlybooltrue: each stream's link holds only the part of the video around the clip, and each stream says clip_only: true, starts_at (the video time its file begins at) and cut_in_file ({"start", "end"}: where the clip lies inside that file). A stream that says clip_only: false is the whole video: read its cut range as without the option. Recommended; the add-on (1.8) and the developer client (1.3) use it.
deliveryrequiredstringlinks.

Example

request
curl -X POST "https://wagamiai.com/v1/clip" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "start": 42, "end": 52, "height": 1080, "delivery": "links", "clip_only": true}'

Returns

response
{"ok": true, "kind": "clip", "video": {…}, "streams": [{"kind": "video", …, "size": 2418260, "clip_only": true, "starts_at": 40.04, "cut_in_file": {"start": 1.96, "end": 11.96}}, {"kind": "audio", …}], "cut": {"start": 42.0, "end": 52.0}, "expires_in": 18000}
// with "cuts": [{"start": 42, "end": 46}, {"start": 95.5, "end": 99}]
{"ok": true, "kind": "clip", "video": {…}, "clips": [{"cut": {"start": 42.0, "end": 46.0}, "streams": [{"kind": "video", …, "clip_only": true, "starts_at": 40.04, "cut_in_file": {"start": 1.96, "end": 5.96}}, {"kind": "audio", …}]}, {"cut": {"start": 95.5, "end": 99.0}, "streams": […]}], "expires_in": 18000}

Audio

POST/v1/audio12 credits per minute200 · linkscounts as a media order

The best sound as one M4A stream link: the whole track, or a range (given as cut) kept on your machine, up to your key's max_seconds. Media opens with your account's first payment. A whole track needs no joining: save the link as it is.

Parameters

NameTypeDescription
refrequiredstringVideo id or URL.
startnumber|stringSeconds or a time, as in Clip.
endnumber|stringSame forms.
deliveryrequiredstringlinks.

Example

request
curl -X POST "https://wagamiai.com/v1/audio" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "delivery": "links"}'

Returns

response
{"ok": true, "kind": "audio", "video": {…}, "streams": [{"kind": "audio", "url": "/v1/media/…", "ext": "m4a", …}], "expires_in": 18000}

Media links

GET/v1/media/{link}freeno key neededbyte ranges

Each streams[].url is a path on this service: prefix your base URL and fetch it. It needs no key (it is your key's own, made for this one order), supports byte ranges (so a large video resumes where it stopped and can be read in parts), works for expires_in seconds (5 hours), and never counts again. A link passes along what its order covers: a whole video's links their streams three times over (resumes and a second save fit), a clip's links its own part of the video with room to spare (the stream's header and index, the keyframe before cut.start, a minute around the cut and retries). So read only a clip's part (seeking to cut.start, as a media tool's seek does), not the whole stream, or ask the clip with clip_only: true and save each small file in full; A link paid in credits never stops there: what it passes past its order is charged by the second at the order's media rate (bytes past it, as a share of the stream, times its length), each byte once: reading a part again is never charged again, up to its stream ten times over in all; then it answers 410 link_spent (free): order again. With no credits left it answers 402 before passing more. Join the picture and sound into one MP4 with any tool that copies MP4 tracks (nothing to encode again for a whole video); for a clip, read cut.start to cut.end of each and encode just the clip's picture again for an exact first frame. Your key's GET /v1/setup gives the exact commands; the add-on and GET /v1/client do it all. Free.

Parameters

NameTypeDescription
linkrequiredpathFrom streams[].url.

Example

request
curl "https://wagamiai.com/v1/media/{link}"

Returns

response
Stream bytes (206 with Range) · 404 when the link ended, 402 with no credits for bytes past its order, 410 link_spent past its stream ten times over: order again

Facebook, Instagram or X video

POST/v1/social12 credits per minute200 · linkscounts as a media order

A public post on X (twitter.com), Instagram or Facebook (fb.watch links too), from its link. Media opens with your account's first payment. Answers who posted it (author), when (published), its text and figures (views, likes, comments, reposts, where the site shows them), and under videos each of its videos with the files the site offers: kind video (picture and sound together), video_only or audio, best first. Each file's link is a full address on this service: fetch it as it is (no key header needed, byte ranges work) before links_expire; file_name is a name to save it under. Priced as a whole-video download, by started minute of the post's videos together; a video whose length the site does not give counts as one minute. Fetching the links costs nothing more. Only posts anyone may see without signing in. A link that is not a post answers 422 bad_link; a post that is gone 404 not_found; one that is private or needs a sign-in 403 not_public; one with no video 422 no_video; adult posts 422 restricted_content; 503 busy with retry: true means send it again in a minute. None of these costs anything.

Parameters

NameTypeDescription
urlrequiredstringThe post's link: x.com/…/status/…, instagram.com/p/… or /reel/…, facebook.com/…/videos/…, facebook.com/reel/…, fb.watch/….

Example

request
curl -X POST "https://wagamiai.com/v1/social" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://x.com/someone/status/1890000000000000001"}'

Returns

response
{"ok": true, "site": "x", "id": "1890000000000000001", "url": "https://x.com/i/status/1890000000000000001", "title", "text", "author": {"name", "handle"}, "published": "2026-11-30T12:00:00Z", "duration": 75.4, "views": 12000, "likes": 300, "comments", "reposts", "thumbnail": "https://…/v1/social/file/…", "videos": [{"index": 1, "duration": 75.4, "width": 720, "height": 1280, "thumbnail", "files": [{"kind": "video", "ext": "mp4", "width": 720, "height": 1280, "fps", "size", "bitrate_kbps": 2176, "link": "https://…/v1/social/file/…", "file_name": "x-1890000000000000001-1-video.mp4"}, …]}], "links_expire": "2026-11-30T18:00:00Z"}

Social video files

GET/v1/social/file/{token}freeno key neededbyte ranges

One file from a Facebook, Instagram or X video answer: its bytes as the site serves them. No key needed (the link is your key's own), byte ranges work, and it lives until the answer's links_expire (6 hours). A link can be fetched 40 times; after that, or once it ended, send the post's link again for fresh links. Free.

Parameters

NameTypeDescription
tokenrequiredpathFrom videos[].files[].link or a thumbnail.

Example

request
curl "https://wagamiai.com/v1/social/file/{token}"

Returns

response
File bytes (206 with Range) · 404 link_expired when the link ended or is unknown, 429 link_used_up after 40 fetches, 503 busy: try again in a minute

Thumbnail pack

POST/v1/thumbnails-zip3 credits per thumbnailbinary · application/zip

Up to 100 thumbnails at the largest size (HQ when that is missing) as one ZIP named 001-Title-ID.jpg…

Parameters

NameTypeDescription
video_idsstring[]Up to 100 ids or URLs. Or:
urlstringA channel URL, with video_type (videos|shorts|both), sort (recent|popular), max_videos (1 to 100).

Example

request
curl -X POST "https://wagamiai.com/v1/thumbnails-zip" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/@MrBeast", "sort": "popular", "max_videos": 20}' \
  -o out.zip

Returns

response
ZIP bytes

Queue a channel report

POST/v1/report3 credits per videouses 1 + max_videos/10 of your daily requests

A channel (or a single video) with stats for each video, optional comments and transcripts. Returns a job_id to poll. Each key can have up to 6 jobs open at once, and finished jobs are kept for 48 hours. You are charged for what the report returns, never more than the limits you asked for (see Credits and billing). A queued report is paid at the most it could cost; what it did not use comes back to your balance (all of it if the report fails) and shows in your credit history.

Parameters

NameTypeDescription
urlrequiredstringChannel or video URL.
video_typestringvideos, shorts, both (default).
sortstringrecent (default) or popular.
max_videosint1 to 100, default 20.
include_commentsboolComments per video (max_comments 1 to 100). 3 credits per 50 comments returned, per video.
include_transcriptboolTranscript per video. 3 credits per video.

Example

request
curl -X POST "https://wagamiai.com/v1/report" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/@MrBeast", "video_type": "videos", "sort": "popular", "max_videos": 10, "include_comments": true}'

Returns

response
{"success": true, "job_id": 482019374451, "mode": "channel", "message": "…"}

Poll a channel report

GET/v1/report/{job_id}free

pending → processing → completed (with result) or failed (with error). Only the key that queued a job can see it.

Parameters

NameTypeDescription
job_idrequiredpathFrom the queue call.

Example

request
curl "https://wagamiai.com/v1/report/{job_id}" \
  -H "Authorization: Bearer $WAGAMI_KEY"

Returns

response
{"success": true, "status": "completed", "result": {"mode", "channel", "total_videos", "total_views", "videos": [...]}}

Channel report inline

POST/v1/report-fast3 credits per videouses 1 + max_videos/10 of your daily requests

The same body and result shape, answered in a single call. Best for 20 videos or fewer. Charged like Queue a channel report; asking for the same report again within 10 minutes, or while it is still running, answers at once with that report and is charged like it.

Parameters

NameTypeDescription
…As in Queue a channel report.

Example

request
curl -X POST "https://wagamiai.com/v1/report-fast" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://youtube.com/@MrBeast", "video_type": "videos", "max_videos": 5}'

Returns

response
{"success": true, "status": "completed", "result": {…}}