How to Extract Email Addresses from API Responses, JSON Payloads, XML Data Feeds, Webhook Logs and REST API Exports
By Email ExtractorPublished 7 min read
On this page
Why Extract Emails from API Data
Modern businesses store contact data across dozens of SaaS platforms, each with its own API. When consolidating contacts for marketing, sales, support or data migration, the raw API responses contain email addresses scattered across different field names, nested objects and varying formats. Rather than writing custom parsing code for each platform, you can save API responses as JSON, XML, CSV or text files and extract all email addresses at once:
Scenario
What you have
What you need
Challenge
CRM data consolidation
API responses from Salesforce, HubSpot, Pipedrive, etc.
All unique contact email addresses across CRMs
Each CRM uses different field names (email, email_address, contact_email, primary_email) and different nesting structures
Marketing platform audit
API exports from Mailchimp, Klaviyo, ActiveCampaign, etc.
All subscriber email addresses with deduplication
Lists overlap; same subscriber exists in multiple platforms with slight variations
Helpdesk ticket export
API responses from Zendesk, Freshdesk, Intercom, etc.
Customer email addresses from ticket data
Emails appear in requester, CC, description, comments and custom fields
E-commerce customer consolidation
API exports from Shopify, WooCommerce, BigCommerce, etc.
All customer email addresses
Customer, billing and shipping email fields may differ; guest checkout creates duplicates
Webhook log analysis
Webhook payload logs from Stripe, Zapier, Make, etc.
Email addresses from event payloads
Emails buried in nested JSON payloads across thousands of webhook events
API Response Formats and Email Extraction
JSON responses
JSON is the most common API response format. Email addresses appear in various positions within the JSON structure:
{"description": "Contact us at support@example.com for help"}
Ticket descriptions, notes, comments
Mixed formats
JSON response containing HTML or markdown with embedded emails
CMS APIs, email marketing APIs
Email Extractor processes JSON files by searching all string values for email address patterns. It does not parse the JSON structure to find specific fields; instead, it finds every email-formatted string anywhere in the file. This means you do not need to know the field names or nesting structure. Save the API response as a .json file and upload it.
Limitation: Email Extractor searches string values in JSON files. If an email address is somehow stored as a non-string value (rare but possible in malformed data), it would not be extracted. In practice, email addresses are virtually always strings.
XML responses
XML is common in SOAP APIs, legacy systems and government data feeds:
Pattern
Example
Where you encounter it
Element content
<email>contact@example.com</email>
Standard XML APIs
Attribute value
<contact email="contact@example.com"/>
Compact XML formats
CDATA section
<description><![CDATA[Email us at contact@example.com]]></description>
Save the XML response as an .xml file and upload to Email Extractor. The tool searches the entire XML content for email patterns, extracting from element content, attributes, CDATA sections and any other text in the file.
CSV exports
Many APIs offer CSV export in addition to JSON/XML. CSV is straightforward: email addresses appear in designated columns, but the column names vary by platform:
Platform type
Common email column names
CRM (Salesforce, HubSpot)
Email, Email Address, Contact Email, Primary Email, Secondary Email, Work Email, Personal Email