Skip to content

CleanScript docs

Ask a YouTube, TikTok or Instagram post a question, or name the fields you want, and get JSON with the quote and moment behind every value. Or its clean transcript.

View as Markdown

One HTTP API: send a post link and a question, get the answer as JSON with the quote and moment behind it. Or every word, as a clean transcript.

curl
curl https://api.cleanscript.ai/v1/extract \
  -H "Authorization: Bearer $CLEANSCRIPT_API_KEY" \
  --json '{"url": "https://youtu.be/jwnez8HdN7E", "prompt": "Who sponsors it?"}'

What you can get

  • Answers: POST /v1/extract takes a question, a preset or your own JSON Schema, and returns JSON with a quote and moment for every value; what the post doesn't say is null.
  • A transcript: GET /v1/transcript returns clean text in paragraphs and sections, with times and a link to each moment. Automatic captions are corrected.
  • A creator's posts: GET /v1/posts lists recent posts, ready for the two calls above.
  • Your balance: GET /v1/account, free.

The basics

  • Base URL: https://api.cleanscript.ai
  • Auth: Authorization: Bearer <key>. Create a key in the dashboard; new accounts get 100 free credits, no card.
  • Cost: 1 credit per started 10 minutes of video for a transcript; see Credits & limits.
  • Posts: YouTube videos and Shorts, TikTok posts, Instagram posts and Reels (TikTok and Instagram are in beta). Any link form works, or a bare YouTube video ID.
  • Shape: JSON in and out, snake_case, times in seconds. Every field is always present; unknown values are null.
  • Errors: one shape, never charged. See errors.

How to use it

  • Code: curl, or the Python and TypeScript SDKs. Start with the Quickstart.
  • AI agents: the MCP server at https://api.cleanscript.ai/mcp, a skill for coding agents, and llms.txt. See Agents & MCP.
  • No-code tools: n8n, Make and Zapier over HTTP. See Batches & automations.
  • Your browser: the Playground runs a post and shows the request behind it.