YouExtractor API Reference
Build integrations, control extractions programmatically, and access AI-generated codebase conversions of YouTube tutorials directly from your developer tool stack.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | required | Full name of the developer. |
| string | required | Valid email address (must be unique). | |
| password | string | required | At least 8 characters. |
| password_confirmation | string | required | Must 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | required | Account email address. | |
| password | string | required | Account password. |
| remember | boolean | optional | Remembers 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
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| youtube_url | string | required | Full YouTube URL, short link, shorts URL, or YouTube video ID. |
| force_refresh | boolean | optional | Bypass 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| video | integer | required | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | optional | Pagination 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/search Filter extractions by term 🔐 Auth
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | required | The text query to search in video titles and descriptions. |
| page | integer | optional | Pagination page number. |
Sample Response
{
"current_page": 1,
"data": [
{ "id": 42, "title": "Build a Todo App in React" }
],
"total": 1
}
GET /api/videos/{video} Get complete details of a video 🔐 Auth
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| video | integer | required | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| video | integer | required | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| github_token | string | required | GitHub Personal Access Token (requires `repo` scope). |
| repo_name | string | optional | Desired repository name. Defaults to sanitized video title. |
| description | string | optional | Short description for the GitHub repository. |
| private | boolean | optional | Create 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| question | string | required | Max 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 Code | Failure Category | Common Scenarios |
|---|---|---|
| 400 | Bad Request | Invalid YouTube URL structure, malformed oEmbed metadata. |
| 401 | Unauthorized | Missing or expired session cookies. |
| 403 | Forbidden | Attempting to access, modify, or download extractions owned by other users. |
| 404 | Not Found | Extraction record ID does not exist. Code ZIP file generation failed. |
| 422 | Unprocessable Entity | Request validation error. Triggering GitHub push before extraction is complete. |
| 500 | Internal Server Error | LLM rate limits, failed GitHub OAuth API scopes, queue worker crash. |
Job Pipeline Flow
Understand the lifecycle of a code extraction operation:
YouTube URL matches regex pattern. Local database is queried for cached matches belonging to the current user or other developers.
The system polls YouTube oEmbed to secure title, author, and description metadata. Falls back to transcript scrapers.
A new record is written to the database with status set to `pending`. A background job (`ExtractVideoJob`) is dispatched.
Queue worker processes the transcript. LLM analyzes transcripts, determines tech stack, structures the directory layout, and extracts individual code files.
Files, instructions, and stack logs are persisted back to the database record. Status transitions to `completed` and the ZIP archive is pre-compiled.