---
title: MIME Type Lookup from File Name API
slug: mime-type-lookup
url: https://apyhub.com/creightonnick0/service/mime-type-lookup
provider: nick creighton
categories: [Developer Tools, File Manipulation]
tags: [mime-types, file-metadata, content-type, file-lookup, developer-tools]
auth: api_key
---

# MIME Type Lookup from File Name API

Map filenames or extensions to MIME types, or reverse a MIME type back to a filename-style value. Useful for uploads, headers, and file validation.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `` | What it does Maps a filename or extension to its MIME type, or performs the reverse lookup when req… | 10 |

## About

## What it does
MIME Type Lookup maps a filename or file extension to its MIME type, and can also work in reverse from a MIME type back to a filename-style value. Send a `filename` in the request body, and set `mode` to `forward` or `reverse` when you need the opposite lookup.

Use it when you need to classify uploaded files, populate download headers, or validate file handling logic against the content type expected by your application. The service is useful anywhere file metadata is derived from a name, extension, or MIME string, especially in upload flows, storage systems, and integration code that needs a deterministic mapping.

The request schema is small and explicit: the body requires `filename`, and `mode` is optional. The response is a structured JSON object, so you can inspect the lookup result in whatever shape the API returns without guessing at file parsing rules.

If your system needs a quick MIME mapping step before processing, MIME Type Lookup keeps that logic in one place and avoids hard-coding extension tables in application code.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/creightonnick0/service/mime-type-lookup
