YouExtractor API Reference

Build integrations, control extractions programmatically, and access AI-generated codebase conversions of YouTube tutorials directly from your developer tool stack.

Base URL: https://youextractor.me/api

1. Authentication

YouExtractor uses standard web cookies and session-based authentication. Authenticated routes require session cookies set during login or registration.

POST /signup Register a new developer account 🔓 Public

Request Headers

Content-Type: application/json

Request Body Parameters

ParameterTypeRequiredDescription
namestringrequiredFull name of the developer.
emailstringrequiredValid email address (must be unique).
passwordstringrequiredAt least 8 characters.
password_confirmationstringrequiredMust match the password parameter.

Sample Request Body

{
  "name": "Dev Alex",
  "email": "alex@dev.com",
  "password": "superSecure123",
  "password_confirmation": "superSecure123"
}

Sample Response (302 Redirect)

On successful registration, sets session cookies and redirects to dashboard:

HTTP/1.1 302 Found
Location: https://youextractor.me/dashboard
Set-Cookie: laravel_session=eyJpdiI...; path=/; expires=...
POST /signin Authenticate credentials and start session 🔓 Public

Request Body Parameters

ParameterTypeRequiredDescription
emailstringrequiredAccount email address.
passwordstringrequiredAccount password.
rememberbooleanoptionalRemembers session for extended duration if true.

Sample Request Body

{
  "email": "alex@dev.com",
  "password": "superSecure123",
  "remember": true
}

Sample Response (302 Redirect)

HTTP/1.1 302 Found
Location: https://youextractor.me/dashboard
Set-Cookie: laravel_session=eyJpdiI...; path=/;
POST /logout Invalidate active session and cookies 🔐 Auth

Response (302 Redirect)

HTTP/1.1 302 Found
Location: https://youextractor.me/
Set-Cookie: laravel_session=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/;

2. Video Extraction API

Triggers code extraction jobs. Extraction operations run asynchronously via queue jobs to avoid HTTP connection timeouts.

POST /api/videos/extract Queue a new code extraction job 🔐 Auth
Smart Caching

This endpoint automatically checks if this video has already been successfully extracted by you, or globally by any other developer. If cached, it returns the completed object instantly (200 OK) without consuming AI credits.

Request Body Parameters

ParameterTypeRequiredDescription
youtube_urlstringrequiredFull YouTube URL, short link, shorts URL, or YouTube video ID.
force_refreshbooleanoptionalBypass caches and force extraction from scratch. Default is false.

Sample Response (202 Queued)

Returned when the extraction is successfully queued for background processing:

{
  "success": true,
  "queued": true,
  "message": "Extraction started! Poll /api/videos/42/status to track progress.",
  "data": {
    "id": 42,
    "youtube_id": "dQw4w9WgXcQ",
    "title": "Build a Todo App in React",
    "description": "Video by CodeWizard",
    "extraction_status": "pending",
    "explanation": "Extraction in progress...",
    "summary": "Pending extraction..."
  }
}

Sample Response (200 Cache Hit)

Returned if the video was previously completed:

{
  "success": true,
  "cached": true,
  "message": "Retrieved from cache",
  "data": { /* Complete Video Payload */ }
}
GET /api/videos/{video}/status Poll background job progress 🔐 Auth

URL Parameters

ParameterTypeRequiredDescription
videointegerrequiredThe database ID of the video record.

Sample Response (In Progress)

{
  "success": true,
  "status": "processing",  // "pending" | "processing"
  "error": null,
  "data": null
}

Sample Response (Completed)

{
  "success": true,
  "status": "completed",
  "error": null,
  "data": {
    "id": 42,
    "youtube_id": "dQw4w9WgXcQ",
    "title": "Build a Todo App in React",
    "extraction_status": "completed",
    "tech_stack": {
      "primary": "React",
      "all": ["React", "Vite", "JavaScript"]
    },
    "code_snippets": [
      {
        "path": "src/App.jsx",
        "code": "import React from 'react';\n...",
        "language": "javascript"
      }
    ]
  }
}

3. Video Management

Retrieve, search, and view extraction details owned by your authenticated account.

GET /api/videos List all your extractions 🔐 Auth

Query Parameters

ParameterTypeRequiredDescription
pageintegeroptionalPagination page number. Defaults to 1 (15 items/page).

Sample Response

{
  "current_page": 1,
  "data": [
    {
      "id": 42,
      "youtube_id": "dQw4w9WgXcQ",
      "title": "Build a Todo App in React",
      "extraction_status": "completed",
      "extracted_at": "2026-07-04T12:00:00.000000Z"
    }
  ],
  "total": 1
}
GET /api/videos/{video} Get complete details of a video 🔐 Auth

URL Parameters

ParameterTypeRequiredDescription
videointegerrequiredThe database ID of the video record.

Sample Response (200 OK)

{
  "success": true,
  "data": {
    "id": 42,
    "youtube_id": "dQw4w9WgXcQ",
    "title": "Build a Todo App in React",
    "description": "Complete setup guide...",
    "tech_stack": { "primary": "React", "all": ["React", "Vite"] },
    "summary": "Step by step guide...",
    "explanation": "This codebase showcases state management...",
    "setup_instructions": "# Setup\nRun `npm install`...",
    "dependencies": ["react", "react-dom"],
    "code_snippets": [
      {
        "path": "src/App.jsx",
        "code": "...",
        "language": "javascript"
      }
    ],
    "extraction_status": "completed",
    "github_repo_url": null
  }
}

4. Export & Actions

Perform exports to third-party services, download code archives, trigger re-extractions, and interact with the AI Chat Copilot.

GET /api/videos/{video}/download Download code as a ZIP archive 🔐 Auth

URL Parameters

ParameterTypeRequiredDescription
videointegerrequiredThe database ID of the video.

Sample Response (200 OK)

HTTP/1.1 200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="Build_a_Todo_App_in_React_code.zip"

[Binary ZIP Stream]
POST /api/videos/{video}/re-extract Force re-process code files 🔐 Auth

Sample Response (202 Queued)

{
  "success": true,
  "message": "Re-extraction started. Poll /api/videos/42/status for progress.",
  "data": {
    "id": 42,
    "extraction_status": "pending"
  }
}
POST /api/videos/{video}/push-to-github Create repo and push code files 🔐 Auth

Request Body Parameters

ParameterTypeRequiredDescription
github_tokenstringrequiredGitHub Personal Access Token (requires `repo` scope).
repo_namestringoptionalDesired repository name. Defaults to sanitized video title.
descriptionstringoptionalShort description for the GitHub repository.
privatebooleanoptionalCreate repository as private if true. Defaults to false.

Sample Request Body

{
  "github_token": "ghp_1a2b3c4d5e6f7g8h9i0j",
  "repo_name": "react-todo-tutorial",
  "private": true
}

Sample Response (200 OK)

{
  "success": true,
  "message": "Repository created and code pushed successfully!",
  "github_url": "https://github.com/developer-username/react-todo-tutorial"
}
POST /api/videos/{video}/chat Ask AI questions about the codebase 🔐 Auth

Request Body Parameters

ParameterTypeRequiredDescription
questionstringrequiredMax 1000 characters. Question about the code setup, architecture, or flow.

Sample Request Body

{
  "question": "How is state managed in the Todo component?"
}

Sample Response (200 OK)

{
  "success": true,
  "answer": "In the App component (src/App.jsx), state is managed using the `useState` hook to maintain the list of todo objects. The handlers for add, toggle, and delete modify this array state and pass updater callbacks down to child components..."
}

General Reference

System Health Check

Provides connection and API key diagnostics. Publicly accessible status endpoint.

GET /api/health Verify service configuration and queue status 🔓 Public

Sample Response

{
  "status": "ok",
  "gemini_key": "configured",
  "openai_key": "configured",
  "anthropic_key": "missing",
  "queue_driver": "database"
}

Error Definitions

All API errors return a standard JSON block with an HTTP status code matching the failure category:

{
  "success": false,
  "error": "Invalid YouTube URL. Please use a valid YouTube video URL."
}
Status CodeFailure CategoryCommon Scenarios
400Bad RequestInvalid YouTube URL structure, malformed oEmbed metadata.
401UnauthorizedMissing or expired session cookies.
403ForbiddenAttempting to access, modify, or download extractions owned by other users.
404Not FoundExtraction record ID does not exist. Code ZIP file generation failed.
422Unprocessable EntityRequest validation error. Triggering GitHub push before extraction is complete.
500Internal Server ErrorLLM rate limits, failed GitHub OAuth API scopes, queue worker crash.

Job Pipeline Flow

Understand the lifecycle of a code extraction operation:

1
Validation & Cache Check

YouTube URL matches regex pattern. Local database is queried for cached matches belonging to the current user or other developers.

2
Metadata Fetching

The system polls YouTube oEmbed to secure title, author, and description metadata. Falls back to transcript scrapers.

3
Stub Creation & Queuing

A new record is written to the database with status set to `pending`. A background job (`ExtractVideoJob`) is dispatched.

4
Background LLM Processing

Queue worker processes the transcript. LLM analyzes transcripts, determines tech stack, structures the directory layout, and extracts individual code files.

5
Completion

Files, instructions, and stack logs are persisted back to the database record. Status transitions to `completed` and the ZIP archive is pre-compiled.

YouExtractor API Reference v1.0.0 — youextractor.me