# Email Signature Parser - Extract Contacts from Emails (`freecamp008/email-signature-parser`) Actor

Turn raw emails, .eml files and HTML signatures into clean contact records: name, job title, company, phones (E.164 + mobile/landline), emails, website, LinkedIn, X/Twitter and postal address. Strips quoted replies and disclaimers. Multilingual, no external APIs.

- **URL**: https://apify.com/freecamp008/email-signature-parser.md
- **Developed by:** [Camp8 fr0](https://apify.com/freecamp008) (community)
- **Categories:** Developer tools, Automation, Integrations
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 contact parseds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Email Signature Parser: Extract Contact Details (Name, Title, Phone, Company) from Emails

**Email Signature Parser** turns raw emails into clean, structured **contact records**. Paste plain-text emails, HTML emails or full **.eml** files, and get back the sender's **full name, first and last name, job title, company, email addresses, phone numbers** (E.164, mobile vs landline, country), **website, LinkedIn, X/Twitter and other social profiles**, and the **postal address**, with a **confidence score for every field**. It removes quoted replies, forwarded headers, legal disclaimers and "Sent from my iPhone" lines before parsing. It works in **English, French, German, Spanish, Italian, Dutch and Portuguese**. Everything runs inside the Actor: no external APIs, no LLM costs, and your emails never leave Apify.

### What does Email Signature Parser do?

- ✂️ **Cleans the email**: strips quoted replies (Gmail "On … wrote:", Outlook "From:/Sent:" blocks, Apple Mail, `>` quotes, "Le … a écrit :", "Am … schrieb …:", "El … escribió:", "Il giorno … ha scritto:", "Op … schreef …:", "Em … escreveu:"), forwarded-message headers, confidentiality disclaimers, company register footers and mobile "Sent from" lines.
- 🔎 **Finds the signature block** using the `--` delimiter, multilingual sign-offs (*Best regards, Thanks, Cheers, Cordialement, Bien à vous, Mit freundlichen Grüßen, Viele Grüße, Saludos, Atentamente, Cordiali saluti, Met vriendelijke groet, Atenciosamente…*), or the bottom contact-dense block when there is no sign-off.
- 👤 **Name, job title and company**: handles `Name | Title | Company` one-liners, `Title at Company`, `SURNAME Firstname`, particles (*van der, de la, El*), honorifics and credentials (*Dr., Lic., Mag., PhD, MBA, CPA, MRICS*), and companies with legal forms (*Inc, LLC, Ltd, GmbH, SAS, SARL, S.L., S.r.l., B.V., Ltda, Lda, OG…*).
- 📞 **Phones** with [libphonenumber](https://github.com/catamphetamine/libphonenumber-js): E.164, international and national formats, **mobile / fixed / toll-free / fax** type, country, extension, and the label used (*M:, Mobile, Cell, Portable, GSM, Handy, Natel, Móvil, Tel, Tél, Fax…*). Numbers without a `+` prefix use your **default country**, plus hints from the signature (website TLD, address country, other numbers). VAT and registration numbers are not mistaken for phones.
- 🌐 **Websites and social profiles**: LinkedIn, X/Twitter (including `Twitter: @handle`), Instagram, Facebook, GitHub, YouTube, TikTok, XING, Viadeo, Calendly, WhatsApp, Telegram and more.
- 🏠 **Postal address** heuristics for US, UK, Canada, France, Belgium, Switzerland, Germany, Austria, Spain, Italy, Netherlands, Portugal, Brazil, Argentina, Morocco, Singapore and New Zealand formats. Returns the full address plus street, postal code, city and country.
- ✅ **Cross-validates the name** with the `From:` header (`Name <email>`) and the email address. A signature that only says "Dave" still gives "David Miller" when the header has it.
- 📨 **Reads .eml / MIME** (quoted-printable, base64, encoded headers, multipart/alternative) and **HTML signatures** (tables, `<div>`, `<br>`, `mailto:` / `tel:` links).
- 🌐 **HTTP API (Standby mode)**: POST an email and get the contact back in milliseconds.

### Use cases

- **CRM enrichment**: create or update contacts in HubSpot, Salesforce, Pipedrive or Zoho from inbound emails
- **Sales and lead capture**: turn replies to outreach campaigns into qualified leads with phone numbers and titles
- **Shared inbox automation**: route support or sales emails with parsed company and country
- **Recruiting**: extract candidate and client contact details from email threads
- **Email archive mining**: build a contact database from years of `.eml` exports
- **AI agents and workflows** (n8n, Make, Zapier): parse the latest email with one HTTP call

### How to use it

1. Click **Try for free**.
2. Paste one or more emails in **Emails** (strings, or `{"id", "text", "from"}` objects). Full `.eml` content is accepted.
3. Set the **Default phone country** (e.g. `US`, `GB`, `FR`, `DE`, `ES`, `MA`) for numbers written without `+`.
4. Click **Start**. Each email becomes one contact in the **Contacts** view. Export to JSON, CSV, Excel, or use the API.

#### Call it as an HTTP API (Standby mode)

POST is the main way to use Standby, because emails are long, multi-line texts:

```bash
curl -X POST "https://<your-standby-url>/" \
  -H "Authorization: Bearer <APIFY_TOKEN>" -H "Content-Type: application/json" \
  -d '{"emails":[{"id":"msg-1","text":"Hi Tom,\n\nSee you Thursday.\n\nBest regards,\nSarah O'"'"'Connor\nVP of Marketing | Globex Inc.\nM: +1 646 555 0199"}],"defaultCountry":"US"}'
```

For a single message you can also use GET with the `text` parameter (URL-encoded):

```bash
curl -G "https://<your-standby-url>/" -H "Authorization: Bearer <APIFY_TOKEN>" \
  --data-urlencode $'text=Cordialement,\nJean DUPONT\nDirecteur Commercial\nTél : 01 42 68 53 00' \
  --data-urlencode "defaultCountry=FR"
```

Response: `{ "count": 1, "items": [ { "fullName": "Jean DUPONT", ... } ] }`

You can also run it through the Apify API (`run-sync-get-dataset-items`), the Apify MCP server, Make, Zapier, n8n and other integrations. **AI agents can pay per call with x402 (USDC)** through Apify's agentic payments, without needing an Apify account.

### Input example

```json
{
  "emails": [
    {
      "id": "sample-en",
      "text": "From: Sarah O'Connor <sarah.oconnor@globex.com>\nSubject: Re: Q1 campaign\n\nHi Tom,\n\nSounds great - I will send the brief tomorrow morning.\n\nBest regards,\nSarah O'Connor\nVP of Marketing | Globex Inc.\nM: +1 646 555 0199 | O: (212) 555-0147\n350 Fifth Avenue, Suite 4100, New York, NY 10118\nwww.globex.com | linkedin.com/in/sarahoconnor | Twitter: @sarahoconnor\n\nOn Mon, Nov 16, 2026 at 9:12 AM Tom Baker <tom@example.com> wrote:\n> Can you share the brief?"
    }
  ],
  "defaultCountry": "US",
  "includeSignatureText": false
}
```

| Field | Description |
|---|---|
| `emails` | Strings or `{"id", "text", "from"}` objects; plain text, HTML or full `.eml` |
| `text` | A single email (handy for GET requests) |
| `defaultCountry` | ISO country for phone numbers without `+` (default `US`) |
| `includeSignatureText` | Also return the detected signature block |

### Output example

```json
{
  "id": "sample-en",
  "from": { "name": "Sarah O'Connor", "email": "sarah.oconnor@globex.com" },
  "subject": "Re: Q1 campaign",
  "fullName": "Sarah O'Connor",
  "firstName": "Sarah",
  "lastName": "O'Connor",
  "jobTitle": "VP of Marketing",
  "company": "Globex Inc.",
  "emails": ["sarah.oconnor@globex.com"],
  "phones": [
    { "number": "+16465550199", "type": "mobile", "country": "US", "label": "mobile", "international": "+1 646 555 0199", "national": "(646) 555-0199", "raw": "+1 646 555 0199" },
    { "number": "+12125550147", "type": "fixed", "country": "US", "label": "office", "international": "+1 212 555 0147", "national": "(212) 555-0147", "raw": "(212) 555-0147" }
  ],
  "websites": ["https://www.globex.com"],
  "linkedin": "https://linkedin.com/in/sarahoconnor",
  "twitter": "https://x.com/sarahoconnor",
  "socialProfiles": [],
  "address": { "full": "350 Fifth Avenue, Suite 4100, New York, NY 10118", "street": "350 Fifth Avenue, Suite 4100", "postalCode": "10118", "city": "New York", "country": "US" },
  "signatureFound": true,
  "signatureDetection": "sign-off",
  "inputFormat": "text+headers",
  "quotedTextRemoved": true,
  "confidence": { "fullName": 0.97, "jobTitle": 0.85, "company": 0.95, "emails": 0.95, "phones": 0.92, "websites": 0.9, "linkedin": 0.95, "twitter": 0.9, "address": 0.85 }
}
```

- `phones[].type`: `mobile`, `fixed`, `fixed_or_mobile` (US/CA numbers without a label), `toll_free`, `voip`, `fax`…
- `signatureDetection`: `delimiter` (`--`), `sign-off`, `contact-block` (no sign-off, contact-dense bottom block) or `none`.
- `confidence`: 0-1 per field. Values below about 0.5 are guesses, e.g. a company derived only from the email domain (0.35).

### Pricing

This Actor uses **pay-per-event** pricing. You only pay for parsed emails:

| Event | Price |
|---|---|
| Contact parsed (`contact-parsed`) | **$3 per 1,000 emails** ($0.003 each) |

Empty or unparseable inputs are not charged. Apify platform usage (compute) is billed separately and is tiny: parsing takes about 1-6 ms per email on 512 MB. Set **Maximum cost per run** to cap your spend.

### FAQ

**How accurate is it?**
On 53 realistic test emails in 7 languages (threads, HTML, .eml, disclaimers, multi-phone signatures), all fields are extracted correctly. On two held-out sets written independently of the parser, about 89-90% of fields were right before any tuning. Expect very high accuracy for emails, phones, websites and social links. Name, title, company and address depend on how conventional the signature is. Use the `confidence` scores to route low-confidence records to review.

**Which languages and countries are supported?**
Sign-offs, reply headers, disclaimers, job titles and phone labels in English, French, German, Spanish, Italian, Dutch and Portuguese. Phone numbers from every country libphonenumber supports. Address heuristics for the countries listed above. Other languages still get emails, phones, links and often the name.

**Can I send .eml files or HTML emails?**
Yes. Pass the raw `.eml` content (headers + MIME body) or the HTML as the email text. Quoted-printable, base64, encoded `From:` names and multipart messages are decoded automatically.

**What if the signature is an image?**
Text inside images is not read (no OCR). The name and email are still taken from the `From:` header when present.

**What about numbers without a country code?**
They are interpreted with `defaultCountry`, then with countries hinted by the signature (website/email TLD, address, other `+` numbers). Invalid numbers, dates, postal codes and VAT/registration numbers are ignored.

**Is there a size limit?**
Each email is cut at 2 million characters (signatures are near the top of the newest message, so this never matters in practice). Batch thousands of emails per run; throughput is about 2,500 emails per second of CPU.

**Is my data private?**
Yes. Parsing runs entirely inside your Apify run, with no third-party APIs and no LLMs. Results are stored only in your own dataset.

**Is it legal to extract contact data from emails?**
Parsing emails you legitimately received or hold is generally fine. Storing and using personal data (names, phones) is subject to privacy laws such as GDPR and CCPA. Make sure you have a lawful basis, keep the data secure, and honour deletion requests.

# Actor input Schema

## `emails` (type: `array`):

Raw emails to parse. Each item is a string (plain text, HTML, or a full .eml / RFC 822 message with headers) or an object <code>{"id": "msg-1", "text": "...", "from": "Jane Doe \<jane@acme.com>"}</code> (<code>from</code> is optional and helps validate the name). One result per email.

## `text` (type: `string`):

Alternative to <b>Emails</b> for one message. Handy for Standby GET requests (<code>?text=...</code>), because array query parameters are split on commas.

## `defaultCountry` (type: `string`):

ISO 3166 two-letter country used for phone numbers written without an international prefix, e.g. <code>US</code>, <code>GB</code>, <code>FR</code>, <code>DE</code>, <code>ES</code>, <code>MA</code>. The parser also tries countries hinted by the signature itself (website TLD, address, other numbers).

## `includeSignatureText` (type: `boolean`):

Add the detected signature block (after removing quoted replies and disclaimers) to each result as <code>signatureText</code>.

## Actor input object example

```json
{
  "emails": [
    "Thanks,\nJane Doe\nCEO, Acme Inc.\n+1 415 555 0100",
    {
      "id": "msg-2",
      "text": "...",
      "from": "Jane Doe <jane@acme.com>"
    }
  ],
  "defaultCountry": "US",
  "includeSignatureText": false
}
```

# Actor output Schema

## `contacts` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "emails": [
        {
            "id": "sample-en",
            "text": "From: Sarah O'Connor <sarah.oconnor@globex.com>\nSubject: Re: Q1 campaign\n\nHi Tom,\n\nSounds great - I will send the brief tomorrow morning.\n\nBest regards,\nSarah O'Connor\nVP of Marketing | Globex Inc.\nM: +1 646 555 0199 | O: (212) 555-0147\n350 Fifth Avenue, Suite 4100, New York, NY 10118\nwww.globex.com | linkedin.com/in/sarahoconnor | Twitter: @sarahoconnor\n\nOn Mon, Nov 16, 2026 at 9:12 AM Tom Baker <tom@example.com> wrote:\n> Can you share the brief?\n> Tom"
        },
        {
            "id": "sample-fr",
            "text": "Bonjour,\n\nJe vous prie de trouver ci-joint notre proposition.\n\nCordialement,\n\nJean DUPONT\nDirecteur Commercial\nSociété Générale de Logistique SAS\n12 rue de la Paix\n75002 Paris\nTél : 01 42 68 53 00\nPortable : 06 12 34 56 78\njean.dupont@sgl-logistique.fr\n\nCe message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires."
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("freecamp008/email-signature-parser").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "emails": [
        {
            "id": "sample-en",
            "text": """From: Sarah O'Connor <sarah.oconnor@globex.com>
Subject: Re: Q1 campaign

Hi Tom,

Sounds great - I will send the brief tomorrow morning.

Best regards,
Sarah O'Connor
VP of Marketing | Globex Inc.
M: +1 646 555 0199 | O: (212) 555-0147
350 Fifth Avenue, Suite 4100, New York, NY 10118
www.globex.com | linkedin.com/in/sarahoconnor | Twitter: @sarahoconnor

On Mon, Nov 16, 2026 at 9:12 AM Tom Baker <tom@example.com> wrote:
> Can you share the brief?
> Tom""",
        },
        {
            "id": "sample-fr",
            "text": """Bonjour,

Je vous prie de trouver ci-joint notre proposition.

Cordialement,

Jean DUPONT
Directeur Commercial
Société Générale de Logistique SAS
12 rue de la Paix
75002 Paris
Tél : 01 42 68 53 00
Portable : 06 12 34 56 78
jean.dupont@sgl-logistique.fr

Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires.""",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("freecamp008/email-signature-parser").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "emails": [
    {
      "id": "sample-en",
      "text": "From: Sarah O'\''Connor <sarah.oconnor@globex.com>\\nSubject: Re: Q1 campaign\\n\\nHi Tom,\\n\\nSounds great - I will send the brief tomorrow morning.\\n\\nBest regards,\\nSarah O'\''Connor\\nVP of Marketing | Globex Inc.\\nM: +1 646 555 0199 | O: (212) 555-0147\\n350 Fifth Avenue, Suite 4100, New York, NY 10118\\nwww.globex.com | linkedin.com/in/sarahoconnor | Twitter: @sarahoconnor\\n\\nOn Mon, Nov 16, 2026 at 9:12 AM Tom Baker <tom@example.com> wrote:\\n> Can you share the brief?\\n> Tom"
    },
    {
      "id": "sample-fr",
      "text": "Bonjour,\\n\\nJe vous prie de trouver ci-joint notre proposition.\\n\\nCordialement,\\n\\nJean DUPONT\\nDirecteur Commercial\\nSociété Générale de Logistique SAS\\n12 rue de la Paix\\n75002 Paris\\nTél : 01 42 68 53 00\\nPortable : 06 12 34 56 78\\njean.dupont@sgl-logistique.fr\\n\\nCe message et toutes les pièces jointes sont confidentiels et établis à l'\''intention exclusive de ses destinataires."
    }
  ]
}' |
apify call freecamp008/email-signature-parser --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,freecamp008/email-signature-parser"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6Y1PORFYrvcSGvNCM/builds/DXrmxZ19n5AAlCjQc/openapi.json
