SigParser for Developers

Documentation

We provide a detailed Swagger documentation page. You can see exactly what you need to call and the structure of the response.

Easy APIs

Simple POST a JSON payload of your email to https://api.sigparser.com/Email/

Secure & Stateless

Our parse email API is secure. It uses HTTPS and doesn't store any of the email contents. It processes the request and returns the results.

Call us Or We Call You

You have two options for integration, either call our API or let us call your API via Webhooks.

Email Parsing API (Call us)

In this scenario you need to write some code to connect to your email system, loop over the emails and then invoke our Email Parsing API for each email. Below you find some code for how to call our API and for C# we have a pretty detailed example of how to do that. But this can be pretty challenging but is good if you are doing research.

Priced by the API call volume. See our API pricing page here.

Webhooks (Call you)

SigParser can POST each new parsed email to a URL you define which is a pattern called Webhooks. After you make a SigParser account, under Data Sources add a Webhook connection. You can set the URL where we’ll POST the parsed email or contact updates.

Parse Email Results

Send us an email and we’ll give you:

  • Email addresses in the email and reply chains (contacts)
  • Contact details (phone, title…) in the email signatures and reply chains (contacts)
  • Real sender detection (isSpammyLookingSender, isSpammyLookingEmailMessage, isSpam)
  • Cleaned email body with signature and replies removed (cleanedemailbody_plain)
  • Reply chain emails split (emails)
{
  "error": "string",
  "contacts": [
    {
      "firstName": "string",
      "lastName": "string",
      "emailAddress": "string",
      "phoneNumber": "string",
      "mobilePhone": "string",
      "officePhone": "string",
      "fax": "string",
      "address": "string",
      "title": "string",
      "twitterUrl": "string",
      "twitterHandle": "string",
      "linkedInUrl": "string",
      "linkedInHandle": "string"
    }
  ],
  "isSpammyLookingEmailMessage": true,
  "isSpammyLookingSender": true,
  "isSpam": true,
  "from_LastName": "string",
  "from_FirstName": "string",
  "from_Fax": "string",
  "from_Phone": "string",
  "from_Address": "string",
  "from_Title": "string",
  "from_MobilePhone": "string",
  "from_OfficePhone": "string",
  "from_LinkedInUrl": "string",
  "from_TwitterUrl": "string",
  "from_TwitterHandle": "string",
  "from_EmailAddress": "string",
  "emails": [
    {
      "from_EmailAddress": "string",
      "from_Name": "string",
      "textBody": "string",
      "htmlLines": [
        "string"
      ],
      "date": "2018-11-09T21:41:36.078Z",
      "didParseCorrectly": true,
      "to": [
        {
          "name": "string",
          "emailAddress": "string"
        }
      ],
      "cc": [
        {
          "name": "string",
          "emailAddress": "string"
        }
      ]
    }
  ],
  "from_LinkedInHandle": "string",
  "duration": 0,
  "cleanedemailbody": "string",
  "cleanedemailbody_ishtml": true,
  "cleanedemailbody_plain": "string"
}

View JSON Output Model Spec

Try our API by copying and pasting an email body into the Try page.

Programming Language Resources

We’ve tried to provide examples of how to parse emails with the most common languages of our users.

You’ll notice you only need to provide from_name, from_address which is the email address and plainbody although you should also provide htmlbody which will yield better parse results.

Curl

curl -k -i -H "Content-Type: application/json" -H "x-api-key: <ApiKey>" -X POST -d '{"from_address":"jsmith@example.com", "from_name":"John Smith","plainbody":"Here is the email body."}' 'https://api.sigparser.com/api/Email'

C# and .NET

Article: Use C# to parse Gmail emails with SigParser

nuget: SigParser

var client = new SigParser.Client(ApiKey);
            var result = client.Parse(new SigParser.EmailParseRequest
            {
                plainbody = @"
Hi John,

Lets get coffee tomorrow.

Thanks
Steve Johnson
888-333-3323 Mobile
San Diego, CA
",
                from_name = "Steve Johnson",
                from_address = "sjohnson@example.com"
            }).Result;

Python

import requests
import json

url = "https://api.sigparser.com/api/Email"

payload = json.dumps( {"from_address": "jsmith@example.com","from_name": "John Smith", "plainbody": "This is an email.", "htmlbody": null } )
headers = {
    'content-type': "application/json",
    'x-api-key': "212121212121212",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

JavaScript

var request = require("request");

var options = { 
    method: 'POST',
    url: 'https://api.sigparser.com/api/Email',
    headers: 
    {   'cache-control': 'no-cache',
        'x-api-key': '232323232323',
        'content-type': 'application/json' },
    body: { from_address: 'jsmith@example.com', from_name: 'John Smith', plainbody: "This is the body of the email." },
    json: true 
};

request(options, function (error, response, body) {
    if (error) throw new Error(error);
    console.log(body);
});