API Documentation
The FileSignature.org API allows you to programmatically retrieve file signature data, including magic bytes, MIME types, and offset information.
Base URL
https://filesignature.org/api/v1
Endpoints
GET
/{extension}
Retrieves signature data for a specific file extension.
Parameters
extension(string, required) - The file extension (e.g., pdf, jpg, png).
Response
{
"success": true,
"data": {
"ext": "pdf",
"name": "Adobe Portable Document Format",
"mime": "application/pdf",
"hex": "25 50 44 46 2D",
"offset": 0,
"usage": {
"python": "...",
"node": "..."
}
}
}
GET
/suggest
Get autocomplete suggestions for file extensions.
Parameters
q(string, required) - Search query (min 2 chars).
Response
{
"suggestions": [
"tar",
"targa"
]
}
Errors
All API errors return a JSON object with success: false and an error message.
{
"success": false,
"error": "Extension not found"
}