API
JSON endpoints for analyzing links, downloading files and tracking progress. No command-line setup needed.
Authentication
Send your key in the x-api-key header on every request. Browser requests from the site itself are allowed without a key.
API keys are issued manually by the site owner. Ask them for a key — there is no self-service signup.
Headers
| Header | Value |
x-api-key | Your API key |
Content-Type | application/json for POST requests |
Base URL
https://anygrab.site
GET/api/status
Current download limits. Takes no arguments.
Returns
| Field | Type | Description |
ok | boolean | True when the downloader is ready. |
playlistMax | number | Maximum videos per playlist download. |
bulkMax | number | Maximum links per bulk download. |
fileTtlHours | number | How long share links stay alive. |
limits | object | Duration, file size, TTL and concurrency limits. |
Example response
{
"ok": true,
"playlistMax": 100,
"bulkMax": 25,
"fileTtlHours": 48,
"limits": {
"playlistMax": 100,
"bulkMax": 25,
"maxDurationMin": 240,
"maxFileGb": 5,
"fileTtlHours": 48
}
}
POST/api/analyze
Reads a single video URL and returns its real video/audio formats and metadata.
Args
| Arg | Type | Required | Description |
url | string | required | Video URL to inspect. |
cookies | boolean | optional | Use the server cookies file for age/sign-in restricted videos. |
cookiesConfirmed | boolean | optional | Must be true together with cookies. |
Returns
| Field | Type | Description |
title | string | Video title. |
uploader | string | null | Channel or uploader name. |
site | string | null | Extractor/site name. |
duration | number | null | Duration in seconds. |
thumbnail | string | null | Thumbnail URL. |
canVideo | boolean | Whether a video track exists. |
canAudio | boolean | Whether an audio track exists. |
videos | array | Real video formats: height, fps, codec, ext, size, tbr, combined. |
audios | array | Real audio formats: id, codec, ext, abr, asr, size. |
Body example
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"cookies": false
}
Response example
{
"title": "Example video",
"uploader": "Example channel",
"site": "Youtube",
"duration": 213,
"thumbnail": "https://example.com/thumb.jpg",
"canVideo": true,
"canAudio": true,
"videos": [
{
"height": 1080,
"fps": 30,
"codec": "h264",
"ext": "mp4",
"size": 42000000,
"tbr": 1500,
"combined": false
}
],
"audios": [
{
"id": "251",
"codec": "opus",
"ext": "webm",
"abr": 160,
"asr": 48000,
"size": 4200000
}
]
}
POST/api/jobs
Starts an asynchronous download and returns a job you can poll.
Args
| Arg | Type | Required | Description |
url | string | required | Video URL to download. |
options | object | required | Video or audio settings. See the table below. |
title | string | optional | Display title. Defaults to Download. |
thumbnail | string | optional | Optional preview image URL. |
keep | boolean | optional | Keep a share link for the configured TTL. |
cookies | boolean | optional | Use the server cookies file. |
cookiesConfirmed | boolean | optional | Must be true with cookies. |
options
| Field | Type | Description |
mode | string | video or audio. |
height | number | null | Video height in pixels. |
fps | number | null | Frame rate filter. |
codec | string | null | h264, vp9, av1 or hevc. |
container | string | mp4, mkv or webm. |
audioFormat | string | mp3, m4a, opus, ogg, flac, wav or original. |
bitrate | number | null | Audio bitrate in kbps for lossy formats. |
sampleRate | number | null | Sample rate in Hz for lossless formats. |
sourceId | string | null | Audio format id returned by /api/analyze. |
Returns
| Field | Type | Description |
id | string | Job id used for polling and downloading. |
status | string | queued, running, done, error or cancelled. |
stage | string | queued, starting, downloading or processing. |
progress | number | Progress from 0 to 1. |
speed | number | null | Current bytes per second. |
eta | number | null | Estimated seconds remaining. |
filename | string | null | Final file name. |
size | number | null | Final file size in bytes. |
share | object | null | Share link info when keep is used. |
error | string | null | Error message when status is error. |
Body example
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Example video",
"keep": false,
"options": {
"mode": "video",
"height": 720,
"fps": null,
"codec": null,
"container": "mp4"
}
}
Response example
{
"id": "9c1f0a2b3d4e5f60718293a4",
"status": "queued",
"stage": "queued",
"progress": 0,
"queuePosition": 1
}
GET/api/jobs/{id}
Returns the current state of a job. Poll this until status becomes done, error or cancelled.
Args
| Arg | Type | Required | Description |
id | string | required | Job id from POST /api/jobs. |
Returns
Same object as POST /api/jobs, with live progress, speed and eta.
File and cancel
| Endpoint | Description |
GET /api/jobs/{id}/file | Returns the finished file. Only valid when status is done. |
DELETE /api/jobs/{id} | Cancels a queued or running job. |
POST/api/download
Synchronous download. Waits for the file to finish and returns the file bytes directly.
Args
| Arg | Type | Required | Description |
url | string | required | Video URL to download. |
options | object | optional | Same options as /api/jobs. Defaults to 720p MP4. |
title | string | optional | Display title. |
keep | boolean | optional | Keep a share link after the response. |
Returns
The file itself, with Content-Type and Content-Disposition headers. Errors return JSON.
Body example
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"options": {
"mode": "video",
"height": 720,
"container": "mp4"
}
}
POST/api/batches
Starts a playlist or bulk-link batch, with optional ZIP output.
Args
| Arg | Type | Required | Description |
kind | string | required | playlist or bulk. |
urls | string[] | required | Video URLs to download. |
options | object | required | Same video/audio options as /api/jobs. |
output | string | optional | zip (default) or files. |
title | string | optional | Display title for the batch. |
keep | boolean | optional | Keep a share link for the result. |
Returns
| Field | Type | Description |
id | string | Batch id. |
kind | string | Playlist or bulk. |
status | string | Queued, running, done, error or cancelled. |
total | number | Number of videos in the batch. |
done / failed / skipped | number | Per-item counters. |
progress | number | Overall progress from 0 to 1. |
downloadUrl | string | null | ZIP URL once the batch is done. |
items | array | Per-video status, title, size, share link and error. |
share | object | null | Share link when keep is used. |
Body example
{
"kind": "bulk",
"urls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"output": "zip",
"options": {
"mode": "video",
"height": 720,
"container": "mp4"
}
}
Batch actions
| Endpoint | Description |
GET /api/batches/{id} | Poll batch progress and item states. |
GET /api/batches/{id}/file | Download the finished ZIP. |
POST /api/batches/{id}/retry | Retry failed items. |
DELETE /api/batches/{id} | Cancel the batch. |