Facebook

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/facebook/download

Send your API key in the X-API-Key header. facebook 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://video-lhr11-1.xx.fbcdn.net/o1/v/t2/f2/m366/video.mp4?oh=…
filenameoptional
Name to save the file as. The extension is added from the file type if missing.Example: facebook-video

Example request

# -o writes the file as it arrives; -C - resumes a broken download.
curl -C - -o video.mp4 '/s/facebook/download?url=https%3A%2F%2Fvideo-lhr11-1.xx.fbcdn.net%2Fo1%2Fv%2Ft2%2Ff2%2Fm366%2Fvideo.mp4%3Foh%3D%E2%80%A6&filename=facebook-video' \
  -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