Turn YouTube videos into FetchBrief summaries from a script or an AI agent: positions, levels, bias, and quotes with timestamps, as Markdown. Everything you make lands in the same library you see on the website.

Early access. This API is new and may change. Changes are listed under Changelog.

This page as Markdown: https://www.fetchbrief.com/docs/api.md

Start

  1. Get Pro: https://www.fetchbrief.com/pricing?from=docs-api
  2. Create a key on your account page: https://www.fetchbrief.com/account?from=docs-api#api. It is shown once.
  3. Send it on every request as Authorization: Bearer <key>.

Summarize one video:

curl https://www.fetchbrief.com/v1/jobs \
  -H "Authorization: Bearer $FETCHBRIEF_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/watch?v=VIDEO_ID_01"}'

Then poll the job until status is done, and read summary.markdown:

curl https://www.fetchbrief.com/v1/jobs/job_8kQ2 \
  -H "Authorization: Bearer $FETCHBRIEF_KEY"

Stay up to date with your channels

The script below follows three channels. Each run it summarizes anything new and saves every summary in your library as a Markdown file. Run it twice a day.

"""Keep summaries from three YouTube channels in a local folder."""
import os, pathlib, time
from datetime import datetime, timedelta, timezone
import requests

API = "https://www.fetchbrief.com/v1"
KEY = os.environ["FETCHBRIEF_KEY"]
CHANNELS = ["@ExampleAnalyst", "@SecondAnalyst", "@ThirdAnalyst"]
FOLDER = pathlib.Path("summaries")


def call(method, path, headers=None, **kw):
    """One request. On 429 or a server error, wait and try again."""
    wait = 2
    for _ in range(6):
        r = requests.request(method, API + path, timeout=30, **kw,
                             headers={"Authorization": f"Bearer {KEY}", **(headers or {})})
        if r.status_code not in (429, 500, 502, 503):
            r.raise_for_status()
            return r.json()
        time.sleep(int(r.headers.get("Retry-After", wait)))
        wait = min(wait * 2, 60)
    r.raise_for_status()


def days_ago(n):
    return (datetime.now(timezone.utc) - timedelta(days=n)).strftime("%Y-%m-%d")


# 1. Start a job for every new video. Videos already in your library are skipped.
jobs = []
for channel in CHANNELS:
    videos = call("GET", f"/channels/{channel}/videos", params={"since": days_ago(2)})
    for v in videos["data"]:
        if not v["in_library"] and v["live"] == "none":
            jobs.append(call("POST", "/jobs", json={"url": v["url"]},
                             headers={"Idempotency-Key": f'{v["id"]}-{days_ago(0)}'}))

# 2. A summary takes about a minute: wait 30 seconds, then check every 15, for up
#    to 10 minutes. Videos still waiting for captions finish on a later run.
deadline = time.time() + 600
time.sleep(30)
while time.time() < deadline and any(j["status"] in ("queued", "processing") for j in jobs):
    jobs = [call("GET", f"/jobs/{j['id']}") for j in jobs]
    time.sleep(15)

# 3. Save every summary from the last week that isn't on disk yet.
FOLDER.mkdir(exist_ok=True)
params = {"since": days_ago(7)}
while True:
    page = call("GET", "/summaries", params=params)
    for s in page["data"]:
        path = FOLDER / f"{s['created_at'][:10]}_{s['id']}.md"
        if not path.exists():
            path.write_text(call("GET", f"/summaries/{s['id']}")["markdown"], encoding="utf-8")
    if not page["next_cursor"]:
        break
    params["cursor"] = page["next_cursor"]

Run it at 7:00 and 19:00 (cron; any scheduler works):

0 7,19 * * * cd ~/fetchbrief && FETCHBRIEF_KEY=fb_live_… python3 sync.py

Why it's shaped this way: - A two-day window, not "since last run". A run that stops halfway loses nothing: the next one sees the same videos, and anything already in your library is skipped. - Idempotency-Key is the video id plus today's date (UTC). A retried request within the same run never starts or charges twice; a job that failed outright is retried fresh on the next run instead of replaying the same failure for 24 hours, since the key changes with the day. - Step 3 reads your library, not the jobs. It also picks up summaries you made on the website, and ones that were waiting for captions on an earlier run. - call waits when told to. It honours Retry-After, and otherwise doubles its wait up to a minute.

Your agent and the script can use the same key at the same time.

Endpoints

Base URL https://www.fetchbrief.com/v1. JSON in and out. Only summaries use credits; everything else is included with Pro.

Endpoint What it does
GET /channels/{channel}/videos What a YouTube channel has posted, and which of those you already have.
POST /jobs Summarize a video. Body {"url": "…"} or {"transcript": "…"}. Returns 202 and a job.
GET /jobs Your jobs from the last 30 days. status=active shows what's still running.
GET /jobs/{id} One job.
GET /summaries Your library, newest first, without the full text.
GET /summaries/{id} One summary, with the full text.
GET /account Credits left and jobs in progress. Use it to check a key.

POST /jobs takes an optional Idempotency-Key header. Retrying with the same key returns the same job and charges once.

Check a channel

curl "https://www.fetchbrief.com/v1/channels/@ExampleAnalyst/videos?since=2026-10-24" \
  -H "Authorization: Bearer $FETCHBRIEF_KEY"
{
  "object": "list",
  "channel": {"id": "UC…", "handle": "@ExampleAnalyst", "title": "Example Analyst"},
  "data": [
    {"object": "video", "id": "VIDEO_ID_01", "url": "https://www.youtube.com/watch?v=VIDEO_ID_01",
     "title": "…", "published_at": "2026-10-25T14:02:11Z", "duration_s": 2710,
     "kind": "video", "live": "none", "in_library": false, "summary_id": null}
  ],
  "checked_at": "2026-10-27T15:10:00Z",
  "last_checked_at": "2026-10-24T09:31:40Z",
  "has_more": false
}

Your library

The same library as on the website. Summaries made here show up there, and the other way round.

{
  "object": "list",
  "data": [
    {"object": "summary", "id": "sum_3Hx9",
     "video": {"id": "VIDEO_ID_01", "url": "https://www.youtube.com/watch?v=VIDEO_ID_01",
               "title": "…", "channel": "Example Analyst", "published_on": "2026-10-25"},
     "created_at": "2026-10-27T15:11:02Z",
     "takeaway": "…",
     "tickers": [{"symbol": "BTC", "bias": "Bearish (ST) / Bullish (LT)"}],
     "share_url": "https://www.fetchbrief.com/s/…"}
  ],
  "next_cursor": null
}

The job

{
  "object": "job",
  "id": "job_8kQ2",
  "status": "done",
  "video": {"id": "VIDEO_ID_01", "url": "https://www.youtube.com/watch?v=VIDEO_ID_01",
            "title": "…", "channel": "Example Analyst", "published_on": "2026-10-25"},
  "created_at": "2026-10-27T15:10:08Z",
  "completed_at": "2026-10-27T15:10:59Z",
  "credits_used": 1.0,
  "credits_remaining": 182.5,
  "summary": {"object": "summary", "id": "sum_3Hx9", "format": "markdown",
              "markdown": "…", "share_url": "https://www.fetchbrief.com/s/…"},
  "transcript_wait": null,
  "error": null
}
status What to do
queued, processing Working on it. A summary usually takes about a minute: check after 30 seconds, then every 15.
waiting_for_transcript YouTube hasn't published captions yet. We check again at transcript_wait.next_check_at and stop at give_up_at; this can take hours. Check back at next_check_at.
done Read summary.
failed error says why. See Errors.
Field What it means
video title, channel and published_on are null until known. video is null for a transcript job.
credits_used null until charged, then steps of 0.5. 0 after an automatic refund.
credits_remaining Your balance when the response was built.
summary null until done. share_url is a link anyone can read.
transcript_wait Only while waiting: checked_at, next_check_at, give_up_at.
error Only when failed: code, message, docs, and required for insufficient_credits.

Treat any other status as still in progress. Asking for a video that's already running for you returns that job; it isn't started or charged again.

Send a transcript

If the video has no captions, or you already have its transcript, send the text instead of the URL:

jq -n --rawfile t transcript.txt '{transcript: $t}' |
curl https://www.fetchbrief.com/v1/jobs \
  -H "Authorization: Bearer $FETCHBRIEF_KEY" \
  -H "Content-Type: application/json" \
  -d @-

Credits

Limits and retries

Limit Value Over it
Requests 60 a minute per account 429 rate_limited
Channel checks 60 an hour per account 429 rate_limited
Jobs in progress 5 at once; jobs waiting for captions don't count 429 too_many_in_progress

On a 429, wait the number of seconds in Retry-After, then try again. On a 5xx, wait 2 seconds and double it each time, up to a minute. The call function in the script above does both.

Errors

{"error": {"code": "insufficient_credits",
           "message": "Not enough credits to start a job. Buy more on the account page: https://www.fetchbrief.com/account#topup",
           "docs": "https://www.fetchbrief.com/docs/api#credits",
           "required": 1.5}}

Check error.code, not message.

HTTP code Meaning
400 invalid_request Bad JSON, missing url, or an unknown field
400 invalid_url Not a YouTube video URL
400 invalid_transcript Too short, too long, or not a transcript
401 account_required No Authorization header
401 invalid_key Key unknown or revoked
402 pro_required The account isn't on Pro
402 insufficient_credits Not enough credits; required says how many
404 not_found No such id on your account
404 channel_not_found No YouTube channel by that handle or id
409 idempotency_conflict Same Idempotency-Key, different body
429 rate_limited Too many requests or channel checks; see Retry-After
429 too_many_in_progress 5 jobs already in progress; see Retry-After
503 paused The API is paused; try again later
500 internal_error Something broke on our side

When a job fails, its error.code is one of:

code Meaning
no_transcript The video has no captions, or the wait for them ran out
transcript_unavailable We couldn't get the captions this time
video_unavailable Private, removed or members-only
insufficient_credits Not enough credits once the video's length was known
pro_required Pro ended while the job was waiting
internal_error Something broke on our side

On no_transcript or transcript_unavailable, you can send the transcript yourself.

Every response has a Request-Id header. Include it if you contact us through https://www.fetchbrief.com/contact.

Terms

The API is covered by our terms. Keep your key private: anything done with it is charged to your account. You can revoke it on your account page.

Changelog