Skip to Content
agentic-yt

Limits and quotas

The daily quota, concurrency, duration and size limits, and how to read your usage.

The limits

Rendered from the same constants the server enforces.

LimitValueNotes
Maximum video duration4 hoursLonger videos fail with too_long; clip a section instead.
Maximum video quality1080pquality: best is capped here.
Default video quality720pUsed when quality is omitted.
Default audio bitrate128 kbpsIgnored for wav.
Concurrent jobs per account3A further job is refused with rate_limited until one finishes.
Long-poll wait0–60 sThe wait query parameter on job POSTs and GET /v1/jobs/{id}.
Frames per job50timestamps accepts 1 to this many entries.
Frame width16–1920 pxOmit width for the source size.
Page size1–100 (default 20)The limit query parameter on every list.
Daily request quota1,000 (default)Per account, per UTC day; an admin can change it.
cookies.txt size512 KBFor PUT /v1/me/youtube-account.

GET /v1/me returns the ones that matter at run time under limits — max_duration_seconds, max_video_quality, default_video_quality, max_concurrent_jobs, max_wait_seconds — along with your account's daily_quota. An agent can read them instead of hard-coding.

The daily quota

Each account has a number of requests that reach YouTube per UTC day — 1,000 by default.

  • What counts: search, video metadata, formats, thumbnails, transcripts, comments, channel and playlist lookups, your own lists, and creating a download, clip or frames job — when the answer was not already cached.
  • What does not: anything answered from the cache; reading, listing or canceling jobs; GET /v1/me and usage; resolving a URL; health.
  • Reset: 00:00 UTC.
  • When it runs out: uncached requests answer 429 quota_exceeded until the reset. Cached answers keep working.

An administrator can change an account's quota. If yours is too low for a legitimate workload, ask.

Headers

Authenticated responses carry the state of your quota, so an agent can pace itself without an extra call:

HeaderMeaning
X-RateLimit-LimitYour daily quota.
X-RateLimit-RemainingWhat is left today.
X-RateLimit-ResetWhen it resets, as a Unix timestamp (seconds).
X-Cachehit or miss — whether this response used quota.
Retry-AfterOn a 429: seconds to wait.

Reading your usage

ayt usage --json
ayt usage --days 7 --json

GET /v1/me/usage?days=30 (days is 1–90, default 30):

{
  "today": {
    "requests": 212,
    "cache_hits": 140,
    "bytes": 734003200,
    "quota_limit": 1000,
    "quota_remaining": 928,
    "resets_at": "2026-11-27T00:00:00.000Z"
  },
  "daily": [
    { "date": "2026-11-25", "requests": 388, "cache_hits": 201, "bytes": 1288490188 }
  ],
  "by_operation": [
    { "operation_id": "getVideoTranscript", "requests": 95, "cache_hits": 61, "bytes": 0 }
  ]
}
  • today — counters for the current UTC day, and what is left of the quota.
  • daily — one entry per UTC day (date is YYYY-MM-DD).
  • by_operation — the same counters split by operation id.

bytes is the size of the files your jobs returned. The same numbers are on the dashboard's overview.

Concurrency

At most 3 jobs in flight per account (queued or running). A fourth POST answers 429 rate_limited. Cache hits never enter the queue, so they do not count.

For a batch — every video in a playlist, say — run three at a time: start three with --no-wait, long-poll, and submit the next as each finishes. Or simply run them one after another; with the cache, a second pass over the same list is instant.

Duration and quality

  • Videos longer than 4 hours cannot be downloaded or sampled for frames whole: too_long. Clip a section, or use the transcript.
  • Video tops out at 1080p. quality: "best" means the best available up to that.

Being a good citizen

agentic-yt reads YouTube the way a browser does. It is not the official YouTube Data API and is not affiliated with YouTube or Google. Two consequences:

  • YouTube can refuse. youtube_blocked is part of normal operation. Back off and retry; do not hammer.
  • The files are someone's work. The service gives you the means to download; the right to use what you download is between you and the rights holder. Use it for content you are entitled to process.

The cache exists partly for this reason: the less often anyone has to reach YouTube for the same thing, the better this works for everyone.

On this page