www.typicalmime.com is a free public HTTP API providing internet media type (MIME type) data, including corresponding file extensions, in JSON format.
The TypicalMIME API was created to provide a more convenient, maintainable, and language/platform-agnostic source of standard MIME type information than an OS database or PL library when developing cross-platform or web applications.
TypicalMIME is automatically updated with new MIME types as they are registered with IANA as well as any corresponding file extensions identified by Apache and Nginx, so client applications can simply make an API request with appropriate query filters to ensure they always have up-to-date MIME type information for their specific needs.
The API is available at https://www.typicalmime.com/api/v1
Basic usage:
GET https://www.typicalmime.com/api/v1/type?primary=text&sub=javascript
TypicalMIME does not currently have any rate limits, but because source MIME type and extension updates are infrequent, API responses should be cached on the client for at least 24 hours. This will help to keep TypicalMIME free of rate limits and API keys.
TypicalMIME only provides data on the MIME types officially registered with IANA, so if your application uses custom content types, you will need to manage those separately.