Email MIME Parser Parse eml to JSON Attachments Bodies API
Free tier included · EmailEmail MIME Parser converts raw RFC 5322 email content (.eml) into structured JSON: decoded headers (RFC 2047 encoded-words), from/to address structures, multipart trees with parts and attachments, and decoded plain-text and HTML bodies (quoted-printable/base64). It handles multipart, charset resolution like browsers (WHATWG Encoding), format=flowed text (RFC 3676), and inline image detection. Parsing only — no sending, no spam checks, no storage.
Three parse modes cover different needs: `POST /parse` for a single email, `POST /parse/full` with `only=` field selection (structure, parts, headers, subject, body, attachments) to return just what you need, and `POST /parse/batch` for up to 100 emails in one call — results come back in input order, and a parse error in one message is reported as an error object without failing the batch. `POST /received-chain` and `/received-chain/full` extract the Received header chain plus SPF/DKIM/DMARC results for anti-phishing workflows.
The service is stateless and processes emails in-memory. Each raw email is capped at 10 MB (`maxLength: 10485760`). It covers structural parsing of headers, bodies, and attachments, with flat per-request pricing instead of per-conversion fees.
Honest limits: `text_body` is the first non-attachment text/plain leaf; attachment detection relies on filename or disposition; a header the stdlib parser crashes on falls back to its raw text. This API does not validate deliverability or reputation — it parses structure only.
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | / | API metadata: name, version, and paths to the interactive docs and health endpoint. |
GET | /health | Liveness probe; returns status "ok" while the process is up. |
POST | /parse | Parse one raw email. Accepts multipart/form-data (file=) or JSON {"raw": "..."}. Returns decoded headers, from/to, MIME parts, attachments, and plain-text/HTML bodies. |
POST | /parse/full | Parse a raw email and return the complete structured result, or a subset via only=. Accepts multipart/form-data (file=) or JSON {"raw": "..."}. |
POST | /parse/batch | Parse up to 100 raw emails in one call. Returns an array of results in input order; a parse error in one message is reported as an error object without failing the batch. |
POST | /received-chain | Extract the Received header chain from a raw email. Accepts JSON {"raw": "..."} only. |
POST | /received-chain/full | Full received chain with auth results. Accepts JSON {"raw": "..."} only. |
Quick start
curl -X POST "https://mimeparser.p.rapidapi.com/parse" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: mimeparser.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"raw":"From: Alice Example <alice@example.com>\r\nTo: Bob Example <bob@example.org>\r\nSubject: Test message for MIME parser\r\nDate: Mon, 5 Feb 2024 10:00:00 +0000\r\nMessage-ID: <abc123@example.com>\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset=utf-8\r\n\r\nHello Bob,\r\nThis is a plain-text test message.\r\n"}'
FAQ
What's the maximum size of a single email I can parse?
Each raw email is capped at 10 MB (`maxLength: 10485760` on the `raw` field). This applies to both single-parse and batch endpoints.
Does the API store or log the emails I send?
No. The service is stateless and processes emails in-memory only. There is no storage, no request logging, and no external calls — parsing is entirely offline.
How many emails can I parse in one batch request?
Up to 100 raw emails per `POST /parse/batch` call. Results are returned in the same order as the input, and a parse error in one message is reported as an error object in the results array without failing the whole batch.
Can I get just part of the parsed result to save bandwidth?
Yes. Use `POST /parse/full` with the `only=` query parameter to return a subset: `structure`, `parts`, `headers`, `subject`, `body`, or `attachments`. The `part` parameter lets you return a single MIME part by index when `only=parts`.
Try Email MIME Parser Parse eml to JSON Attachments Bodies free
Free tier on every plan. Get an API key and start calling in under a minute.
Open on RapidAPI