API Documentation
Integrate BlackHole video downloads into your applications.
Authentication
All API requests require authentication using an API key. Include your API key in theAuthorization header:
Authorization: Bearer YOUR_API_KEYAPI keys are available for existing Business tier subscribers. Manage your API keys →
Base URL
https://www.blhole.comEndpoints
POST/api/v1/download
Download a video from a supported platform
Parameters:
url: string (required) - The video URL to downloadquality: string (optional) - '1080' | '720' | '480' | '360' | 'max'format: string (optional) - 'video' | 'audio'audioFormat: string (optional) - 'mp3' | 'best'
Example:
curl -X POST https://www.blhole.com/api/v1/download \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://youtube.com/watch?v=dQw4w9WgXcQ", "quality": "1080"}'Response:
{
"success": true,
"data": {
"url": "https://api.blhole.com/files/a1b2c3d4e5f6/video.mp4",
"filename": "video.mp4",
"platform": "youtube",
"quality": 1080,
"videoInfo": {}
}
}Rate Limits
API requests are limited based on your subscription tier:
| Tier | Requests/Day | Max Quality |
|---|---|---|
| Business | 500 | 4K |
Rate limits reset at midnight UTC each day.
Error Codes
| Code | Status | Description |
|---|---|---|
MISSING_API_KEY | 401 | No Authorization: Bearer header |
INVALID_API_KEY | 401 | The API key is malformed, unknown or expired |
INVALID_REQUEST | 400 | The request body isn't valid JSON |
MISSING_URL | 400 | The body has no url |
INVALID_URL | 400 | The URL isn't from a supported platform |
DOWNLOAD_FAILED | 400 | The video couldn't be downloaded; the message says why |
RATE_LIMITED | 429 | Too many requests a minute, or the key's daily limit is reached |
PLATFORM_DISABLED | 503 | Downloads from this platform are paused for now |
SERVICE_UNAVAILABLE | 503 | The API isn't available right now |
VALIDATION_ERROR | 500 | The API key couldn't be checked; try again |
INTERNAL_ERROR | 500 | Unexpected server error; try again |
Support
Need help with the API? Join our Discord community and ask in #api-discussion.