AnyGrab

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

HeaderValue
x-api-keyYour API key
Content-Typeapplication/json for POST requests

Base URL

https://anygrab.site

Endpoints

GET/api/status

Current download limits. Takes no arguments.

Returns

FieldTypeDescription
okbooleanTrue when the downloader is ready.
playlistMaxnumberMaximum videos per playlist download.
bulkMaxnumberMaximum links per bulk download.
fileTtlHoursnumberHow long share links stay alive.
limitsobjectDuration, 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

ArgTypeRequiredDescription
urlstringrequiredVideo URL to inspect.
cookiesbooleanoptionalUse the server cookies file for age/sign-in restricted videos.
cookiesConfirmedbooleanoptionalMust be true together with cookies.

Returns

FieldTypeDescription
titlestringVideo title.
uploaderstring | nullChannel or uploader name.
sitestring | nullExtractor/site name.
durationnumber | nullDuration in seconds.
thumbnailstring | nullThumbnail URL.
canVideobooleanWhether a video track exists.
canAudiobooleanWhether an audio track exists.
videosarrayReal video formats: height, fps, codec, ext, size, tbr, combined.
audiosarrayReal 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

ArgTypeRequiredDescription
urlstringrequiredVideo URL to download.
optionsobjectrequiredVideo or audio settings. See the table below.
titlestringoptionalDisplay title. Defaults to Download.
thumbnailstringoptionalOptional preview image URL.
keepbooleanoptionalKeep a share link for the configured TTL.
cookiesbooleanoptionalUse the server cookies file.
cookiesConfirmedbooleanoptionalMust be true with cookies.

options

FieldTypeDescription
modestringvideo or audio.
heightnumber | nullVideo height in pixels.
fpsnumber | nullFrame rate filter.
codecstring | nullh264, vp9, av1 or hevc.
containerstringmp4, mkv or webm.
audioFormatstringmp3, m4a, opus, ogg, flac, wav or original.
bitratenumber | nullAudio bitrate in kbps for lossy formats.
sampleRatenumber | nullSample rate in Hz for lossless formats.
sourceIdstring | nullAudio format id returned by /api/analyze.

Returns

FieldTypeDescription
idstringJob id used for polling and downloading.
statusstringqueued, running, done, error or cancelled.
stagestringqueued, starting, downloading or processing.
progressnumberProgress from 0 to 1.
speednumber | nullCurrent bytes per second.
etanumber | nullEstimated seconds remaining.
filenamestring | nullFinal file name.
sizenumber | nullFinal file size in bytes.
shareobject | nullShare link info when keep is used.
errorstring | nullError 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

ArgTypeRequiredDescription
idstringrequiredJob id from POST /api/jobs.

Returns

Same object as POST /api/jobs, with live progress, speed and eta.

File and cancel

EndpointDescription
GET /api/jobs/{id}/fileReturns 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

ArgTypeRequiredDescription
urlstringrequiredVideo URL to download.
optionsobjectoptionalSame options as /api/jobs. Defaults to 720p MP4.
titlestringoptionalDisplay title.
keepbooleanoptionalKeep 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

ArgTypeRequiredDescription
kindstringrequiredplaylist or bulk.
urlsstring[]requiredVideo URLs to download.
optionsobjectrequiredSame video/audio options as /api/jobs.
outputstringoptionalzip (default) or files.
titlestringoptionalDisplay title for the batch.
keepbooleanoptionalKeep a share link for the result.

Returns

FieldTypeDescription
idstringBatch id.
kindstringPlaylist or bulk.
statusstringQueued, running, done, error or cancelled.
totalnumberNumber of videos in the batch.
done / failed / skippednumberPer-item counters.
progressnumberOverall progress from 0 to 1.
downloadUrlstring | nullZIP URL once the batch is done.
itemsarrayPer-video status, title, size, share link and error.
shareobject | nullShare 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

EndpointDescription
GET /api/batches/{id}Poll batch progress and item states.
GET /api/batches/{id}/fileDownload the finished ZIP.
POST /api/batches/{id}/retryRetry failed items.
DELETE /api/batches/{id}Cancel the batch.