FileGrab API Documentation
Welcome to the FileGrab API Documentation. This guide provides comprehensive insights into integrating with our API for efficiently collecting information and downloading files from URLs. Below, you'll find detailed endpoints, covering request parameters, response formats, and status codes. Contact us to obtain your API key.
Base URL
https://filegrab.net/api/v1/
1. Get File Name
Retrieves the name of the file from a given URL.
API Request
- Endpoint: /get-file-name
- Method: POST
Parameter |
Type |
Description |
url |
string |
The URL of the file. |
key |
string |
The API key. |
API Response
{
"success": true|false,
"file-name": string,
"error-code": number
}
Error Code |
Description |
400 |
Invalid URL. |
401 |
Invalid API Key. |
403 |
Server denied access to the file at the specified URL. |
404 |
File not found at the specified URL. |
429 |
Too many requests. Please try again later. |
2. Get File Extension And MIME Type
Get the file's extension and MIME type from the provided URL.
API Request
- Endpoint: /get-file-type
- Method: POST
Parameter |
Type |
Description |
url |
string |
The URL of the file. |
key |
string |
The API key. |
API Response
{
"success": true|false,
"file-type": string,
"mime-type": string,
"error-code": number
}
Error Code |
Description |
400 |
Invalid URL. |
401 |
Invalid API Key. |
403 |
Server denied access to the file at the specified URL. |
404 |
File not found at the specified URL. |
429 |
Too many requests. Please try again later. |
3. Get File Size
Retrieves the size of the file from a given URL.
API Request
- Endpoint: /get-file-size
- Method: POST
Parameter |
Type |
Description |
url |
string |
The URL of the file. |
key |
string |
The API key. |
API Response
{
"success": true|false,
"file-size": number,
"error-code": number
}
Error Code |
Description |
400 |
Invalid URL. |
401 |
Invalid API Key. |
403 |
Server denied access to the file at the specified URL. |
404 |
File not found at the specified URL. |
429 |
Too many requests. Please try again later. |
3. Check If File Can Be Downloaded
Check if the file exists at a given URL.
API Request
- Endpoint: /check-file-downloadability
- Method: POST
Parameter |
Type |
Description |
url |
string |
The URL of the file. |
key |
string |
The API key. |
API Response
{
"success": true|false,
"file-downloadable": true|false,
"error-code": number
}
Error Code |
Description |
400 |
Invalid URL. |
401 |
Invalid API Key. |
403 |
Server denied access to the file at the specified URL. |
404 |
File not found at the specified URL. |
429 |
Too many requests. Please try again later. |
3. Download file
Download the file from the given URL.
API Request
- Endpoint: /download-file
- Method: POST
Parameter |
Type |
Description |
url |
string |
The URL of the file. |
key |
string |
The API key. |
API Response
- Content-Type: application/octet-stream
{
"success": true|false,
"file-data": data,
"error-code": number
}
Error Code |
Description |
400 |
Invalid URL. |
401 |
Invalid API Key. |
403 |
Server denied access to the file at the specified URL. |
404 |
File not found at the specified URL. |
429 |
Too many requests. Please try again later. |
Last Updated: 17/02/2024