Instagram

Download file

Stream a video, photo or audio file through the API. Use it for large files (Facebook HD videos are often 50–100 MB) or when your servers can’t reach the platform’s CDN.

Endpoint

GET
/s/instagram/download

Send your API key in the X-API-Key header. instagram is the usual service slug; use the one shown on your subscription if it differs.

Query parameters

NameDescription
urlrequired
A media URL from a previous answer (media[].url or a variant URL). Links to any other site are refused.Example: https://scontent-lhr8-1.cdninstagram.com/o1/v/t16/f2/m86/video.mp4?oh=…
filenameoptional
Name to save the file as. The extension is added from the file type if missing.Example: reel

Example request

# -o writes the file as it arrives; -C - resumes a broken download.
curl -C - -o video.mp4 '/s/instagram/download?url=https%3A%2F%2Fscontent-lhr8-1.cdninstagram.com%2Fo1%2Fv%2Ft16%2Ff2%2Fm86%2Fvideo.mp4%3Foh%3D%E2%80%A6&filename=reel' \
  -H 'X-API-Key: YOUR_API_KEY'

Response

The body is the file itself, not JSON. Errors still come back as JSON with a message.

HTTP/1.1 200 OK
Content-Type: video/mp4
Content-Length: 73400320
Content-Disposition: attachment; filename=facebook-video.mp4
Accept-Ranges: bytes

Notes