API Documentation
You can interact with our platform programmatically using the following JSON APIs.
GET
/api/files/search
Search Files
Queries the file index using advanced search parameters and filters.
Parameters:
- q (required): The search query. Supports dorks like
ext:orsite:. - page (optional): Pagination page number. Defaults to
1. - sort_by (optional): Sort field (
name,size,time). Defaults totime. - order (optional): Sort direction (
asc,desc). Defaults todesc. - category (optional): Media filter (
video,audio,pictures,documents,all).
Example Request:
curl "https://filesearch.tools/api/files/search?q=ubuntu ext:iso&sort_by=size"
Example Response:
{
"files": [
{
"name": "ubuntu-22.04.3-desktop-amd64.iso",
"path": "http://example.com/mirrors/ubuntu/ubuntu-22.04.3-desktop-amd64.iso",
"size": "4.7 GB",
"time": "2023-10-26T10:00:00"
}
],
"total": 1,
"pages": 1,
"current_page": 1,
"has_next": false,
"has_prev": false
}
GET
/api/files/latest
Latest Files
Retrieves the 10 most recently indexed files across all directories.
Example Request:
curl "https://filesearch.tools/api/files/latest"
Example Response:
[
{
"name": "recent_upload.zip",
"path": "http://example.com/downloads/recent_upload.zip",
"size": "150 MB",
"time": "2023-10-27T16:45:00"
}
]
POST
/api/files/report
Report File
Reports a file as a dead link or invalid. Multiple reports from the same host may trigger an automatic quarantine.
Request Body (JSON):
- path (required): The exact URL of the file to report.
Example Request:
curl -X POST "https://filesearch.tools/api/files/report" \
-H "Content-Type: application/json" \
-d '{"path": "http://example.com/dead_file.zip"}'
Example Response:
{
"message": "File reported successfully"
}
POST
/api/submit
Submit URL
Submits a new open directory URL to be added to the scanning queue.
Request Body (JSON):
- url (required): The HTTP or HTTPS URL you wish to have scanned.
Example Request:
curl -X POST "https://filesearch.tools/api/submit" \
-H "Content-Type: application/json" \
-d '{"url": "http://example.com/public_files/"}'
Example Response:
{
"message": "URL submitted successfully",
"status": "queued"
}
GET
/api/submitted-urls
Active Submissions
Returns a list of URLs currently in the queue or actively being scanned.
Example Request:
curl "https://filesearch.tools/api/submitted-urls"
Example Response:
[
{
"url": "http://example.com/public_files/",
"date_submitted": "2023-10-27T15:00:00",
"status": "scanning"
}
]
GET
/api/stats
Extensions Stats
Returns the top 100 most common file extensions found during scans.
Example Request:
curl "https://filesearch.tools/api/stats"
Example Response:
[
{
"extension": ".jpg",
"count": 567890,
"last_found": "2023-10-27T14:30:00"
},
{
"extension": ".html",
"count": 456789,
"last_found": "2023-10-27T14:29:00"
}
]