Network & DNS🌐 YAS server-sideAPI availablebeginner
MIME Type Lookup
Looks up MIME types by file extension or MIME type name.
Processed by YAS · not stored
Ready to runInstant execution
Loading tool…
What does this tool do?
Looks up MIME types by file extension or MIME type name.
Why would I use it?
- You are configuring a server's Content-Type mapping.
- You want the correct MIME type for an upload form.
- You are debugging why a file downloads instead of rendering.
Real-life example
Input
png
Output
image/png
Extension and MIME lookups both work.
Input → Process → Output → Next
- Input
- Type an extension or MIME type.
- Process
- YAS searches its MIME database.
- Output
- The matching type(s).
- Next action
- Configure your server or validation accordingly.
Common mistakes
- Assuming one extension has one MIME (some vary).
- Using application/octet-stream for everything (breaks previews).
- Trusting client-supplied MIME types without server checks.
What the result means
The MIME type tells browsers how to handle the resource.
Privacy & security
Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.
API
Endpoint
POST https://yas.sh/api/v1/tools/mime-type-lookup
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/mime-type-lookup" \
-H "Content-Type: application/json" \
-d '{"q":"png"}'JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/mime-type-lookup", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"q": "png"
}),
});
const data = await res.json();Python
import requests
r = requests.post("https://yas.sh/api/v1/tools/mime-type-lookup", json={"q":"png"})
data = r.json()| Field | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Extension (png) or MIME (image/png) |
Success response
{ "query": "png", "type": "extension", "mime": "image/png", "known": true }Look up MIME types by extension or type.
Error responses
400 VALIDATION_ERROR— invalid input or unsupported option.413 PAYLOAD_TOO_LARGE— input exceeds the 64 KB limit.429 RATE_LIMIT_EXCEEDED— rate limit exceeded (60 req/min).
Limits
- Maximum input: 64 KB per request.
- Rate limit: 60 requests/min per IP address.
- Authenticated accounts benefit from higher tier quotas.
Related tools