Case studytranscriptyt

Transcripts, on request.

transcriptyt is a REST API for YouTube transcripts and for video and channel metadata, with API keys and rate limits by plan.

Status
Live at transcriptyt.com. It also feeds sponsoredyt.
Role
The API, its caching and its plans.
Built with
  • Python
  • FastAPI
  • PostgreSQL
  • Clerk
  • Sentry
  • Docker

The problem

Getting YouTube transcripts in code means dealing with blocked requests, retries and caption formats. transcriptyt puts all of that behind one authenticated API.

What was built

  • Transcripts in JSON, plain text, SRT or WebVTT, with a language order of preference and a filter for manual or auto-generated captions.
  • Video metadata, including the title, channel, length, views, publish date and members-only status, and channel metadata.
  • API keys and plans through Clerk, with per-minute and monthly limits, and rate-limit headers on authenticated responses.
  • A public health check that reports the database and the circuit breaker.

How it works

  • FastAPI with a cache in PostgreSQL (JSONB): check the cache, then YouTube, then store the answer.
  • A circuit breaker and retries with backoff around YouTube calls, and a fallback to the last cached answer, so responses keep flowing when YouTube pushes back.
  • Security headers, a limit on request size, sanitised logs, and monitoring with Sentry.