MBOX to JSON: Split Mailbox Exports into Emails avatar

MBOX to JSON: Split Mailbox Exports into Emails

Pricing

$0.50 / 1,000 email parseds

Go to Apify Store
MBOX to JSON: Split Mailbox Exports into Emails

MBOX to JSON: Split Mailbox Exports into Emails

Turn .mbox mailbox exports (Gmail Takeout, Thunderbird, Apple Mail; .mbox or .gz) into one JSON row per email: from, to, cc, subject, date, thread ids, Gmail labels, text body, links and attachments. Streams multi-GB files. For archive migration, e-discovery and AI agents. Failed emails are free.

Pricing

$0.50 / 1,000 email parseds

Rating

0.0

(0)

Developer

Broke to Built

Broke to Built

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Features

Limited permissions

Share

MBOX to JSON: Split Mailbox Exports into Emails

Give a link to an .mbox mailbox export. Get one clean JSON row per email: sender, recipients, subject, date, thread ids, Gmail labels, text body, links and attachments. Multi-GB mailboxes are streamed, never loaded whole.

Works with Gmail / Google Takeout, Thunderbird, Apple Mail, mailing-list archives (Mailman, Pipermail) and anything else that writes standard mbox, plain or gzipped (.mbox.gz).

You give itYou get backYou pay (Free plan)
.mbox or .mbox.gz file URLsfrom, to, cc, bcc, subject, date, messageId, inReplyTo, references, gmailThreadId, gmailLabels, text, links, attachments$0.0005 per email ($0.50 per 1,000)

Emails that cannot be parsed, emails over your size limit, skipped or filtered emails, failed downloads and links to private or internal addresses are never charged.

Try it in one click

Press Start with the form empty. A built-in 3-email sample mailbox is split for free:

{}
{
"ok": true,
"emailIndex": 2,
"subject": "Re: Invoice 1042 is ready",
"from": [{ "name": "Ops Team", "address": "ops@example.org" }],
"date": "2026-11-10T20:30:00.000Z",
"inReplyTo": "<sample-1042@example.com>",
"gmailThreadId": "1780000000000000001",
"gmailLabels": ["Sent"],
"text": "Thanks Ada, paid today. Receipt attached.\n",
"attachments": [{ "filename": "receipt-1042.csv", "contentType": "text/csv", "size": 42, "inline": false }],
"sample": true
}

Read your own mailbox

{
"mboxUrls": ["https://your-bucket.s3.amazonaws.com/takeout/All-mail-Including-Spam-and-Trash.mbox"],
"maxEmails": 5000,
"searchText": "invoice"
}

Why use it

An .mbox file is thousands of emails glued together in one text file. LLMs, AI agents and spreadsheets cannot use it as is: it is too big to paste, and splitting it correctly (escaped >From lines, MIME parts, encodings) is easy to get wrong. This Actor does the splitting and parsing and gives you rows you can filter, export to CSV, or feed to a model.

Features

  • Streams any size. The file is read as it downloads; memory stays flat. Stop early with maxEmails and reading stops too.
  • Pages through huge exports with skipEmails + maxEmails.
  • Filter as you read with searchText (subject, people and body). Emails left out cost nothing.
  • Gmail extras: X-GM-THRID thread id and X-Gmail-Labels as an array.
  • Threads: messageId, inReplyTo and references for rebuilding conversations.
  • Attachments: name, MIME type, size and inline flag for every file.
  • Correct mbox handling: mboxrd >From un-escaping, LF or CRLF, gzip detected automatically.

Who this is for

  • AI agents and RAG pipelines indexing a mailbox export.
  • Legal, compliance and e-discovery reviewing exported mail.
  • Researchers working with mailing-list archives.
  • Anyone leaving Gmail who wants their mail as a spreadsheet.

Input

FieldWhat it does
mboxUrlsLinks to .mbox or .mbox.gz files (up to 20 per run).
mboxTextA small mailbox pasted as text.
maxEmailsStop after this many emails are written (default 10,000).
skipEmailsSkip this many emails first (free).
searchTextKeep only emails containing this phrase.
includeHtmlAdd the HTML body (default off).
bodyMaxCharsCut long bodies to this length (default 20,000).
maxMessageMbSkip single emails bigger than this (default 25).
maxFileSizeMbStop reading past this file size (default 2,048).

Pricing

Pay per event: $0.0005 per email written. The free sample, and every skipped, filtered or failed email, cost nothing. Set a max charge on the run to cap your spend.

Privacy and safety

Your mailbox is streamed through memory for the run and kept only in your own run's dataset. Links to private networks, localhost or cloud metadata addresses are refused on every redirect.

Single emails? Use our EML to JSON or Outlook MSG to JSON Actors.