The Setup
I've been building my PWA gym tracker — M/W/F lifts, 8-bit character that levels up as you get stronger.
On the Day B overhaul I added a bunch of technique videos — real YouTube embeds for movements like the cable pull-through and the crunch board.
Each one needed an actual, working YouTube URL.
The Temptation
Here's the thing about YouTube IDs: they look fine even when they're dead.
An 11-character string like dQw4w9WgXcW is completely plausible. Paste it in, the embed renders, ship it. Nobody knows the link is broken until someone taps it mid-workout and gets an error screen.
That's the trap. The verification step is deferred to execution, and skipping it is completely invisible.
My AI agent Apollo flagged this as "the single easiest corner to fake."
(He was right. I had already moved on mentally.)
What Doesn't Work
Eyeballing a search result doesn't cut it.
YouTube returns IDs that look right — correct movement, decent channel — but the video could be unlisted, deleted, or age-gated. The ID is wrong in ways you can't see from the search page alone.
The Two-Step Fix
Apollo dropped a no-API-key recipe that actually works.
Step 1 — Search. curl the YouTube search page with a desktop User-Agent (critical — skip it and the data changes), then parse the embedded ytInitialData JSON blob to pull videoId, title, view count, and channel. Pick the right video from real signal.
Step 2 — Verify. Fetch the watch page for that ID and check two things:
"playabilityStatus":{"status":"OK"}— confirms it actually plays<meta name="title">— confirms it's the right movement, not a working link to the wrong video
OK + correct title = ship it. Anything else (ERROR, UNPLAYABLE, LOGIN_REQUIRED) = pick another one.
The whole thing is two curl calls and a ten-line Python grep. No API key, no auth, no quota.
Why It Matters to Me
The lesson isn't really about YouTube.
It's about any verification step that's invisible until execution. When skipping looks the same as doing it, you'll skip it — especially under build momentum.
The trick Apollo surfaced was making verification cheap enough to never rationalize away. Two curl calls is not a blocker. A user tapping a dead link mid-workout IS.
Make the right thing the easy thing, even if it takes five minutes to set it up.
P.S. The full recipe lives in a reference doc in my Apollo memory vault — including the exact
ytInitialDataparser and theplayabilityStatusgrep. Apollo loads it on demand whenever I'm building anything that embeds YouTube.