Facebook Media Downloader

Rate Limit: 3 requests per minute. Enforced by the Cloudflare Worker rate limiter.

Auto
Video
GIF
Image


API Documentation

Rate Limits:
- Enforced by the Cloudflare Worker rate limiter binding
- Rate limit headers included in responses:
  * X-RateLimit-Limit: Maximum requests allowed
  * X-RateLimit-Policy: Rate limit policy window

Endpoints:

1. /api/download
   Method: GET or POST
   Description: Download media from a Facebook post
   Parameters:
     - url: Facebook URL (required)
     - type: Media type (optional): video, gif, or image
       If not specified, auto-detects best available
       If gif not found, falls back to video
     - download: Set to "1" to force download (optional)

   Example GET:
   /api/download?url=https://www.facebook.com/username/videos/1234567890

   Example with type:
   /api/download?url=https://www.facebook.com/username/videos/1234567890&type=gif&download=1

   Example POST:
   POST /api/download
   Content-Type: application/json
   {
     "url": "https://www.facebook.com/username/videos/1234567890",
     "type": "video",
     "download": true
   }

2. /api/info
   Method: GET or POST
   Description: Get media information without downloading
   Parameters:
     - url: Facebook URL (required)

   Example GET:
   /api/info?url=https://www.facebook.com/username/videos/1234567890

   Response format:
   {
     "success": true,
     "data": {
       "images": [...],
       "videos": [...],
       "gifs": [...],
       "tweetInfo": {
         "id": "1234567890",
         "text": "Facebook text",
         "created_at": "...",
         "user": {
           "name": "User Name",
           "screen_name": "username"
         }
       }
     }
   }

Rate Limit Error Response (429):
{
  "success": false,
  "error": "Rate limit exceeded."
}