Article content and detailed guides remain in English. The selected language applies to controls and quick instructions.

Back to articles

How to Extract Email Addresses from API Responses, JSON Payloads, XML Data Feeds, Webhook Logs and REST API Exports

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:

Pattern Example Where you encounter it
Top-level field {"email": "contact@example.com"} Simple contact records
Nested object {"contact": {"primary_email": "contact@example.com"}} CRM and helpdesk APIs with structured contact objects
Array of objects [{"id": 1, "email": "first@example.com"}, {"id": 2, "email": "second@example.com"}] Paginated list endpoints
Multiple email fields {"email": "work@example.com", "personal_email": "home@example.com", "billing_email": "billing@example.com"} E-commerce and billing APIs
Deeply nested {"data": {"records": [{"attributes": {"contact_info": {"email": "deep@example.com"}}}]}} Enterprise APIs (Salesforce, etc.)
Email in text field {"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> XML with embedded text
Namespace-prefixed <ns:EmailAddress>contact@example.com</ns:EmailAddress> Enterprise and government APIs

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
Marketing (Mailchimp, Klaviyo) Email Address, Subscriber Email, email
Helpdesk (Zendesk, Freshdesk) Requester Email, Customer Email, CC, email
E-commerce (Shopify, WooCommerce) Email, Customer Email, Billing Email, Shipping Email
HR / payroll (ADP, Gusto) Work Email, Personal Email, Employee Email

Upload the CSV directly to Email Extractor. The tool extracts all email addresses regardless of column name or position.

Common API Data Consolidation Workflows

Multi-CRM consolidation

Step What to do
1. Export contacts from each CRM Use each CRM's API (GET /contacts or equivalent) or bulk export feature; save responses as JSON or CSV
2. Collect all export files You now have multiple files: salesforce-contacts.json, hubspot-contacts.csv, pipedrive-deals.json, etc.
3. Upload all files to Email Extractor Select all files and upload to Email Extractor; the tool processes each file and extracts email addresses
4. Review deduplicated results Email Extractor deduplicates case-insensitively; "Contact@Example.com" and "contact@example.com" become one entry
5. Download results Download as CSV (with sources to see which file each email came from) or as TXT for a clean email list

Webhook log analysis

Step What to do
1. Export webhook logs Most webhook receivers (Zapier, Make, custom endpoints) log payloads; export logs as JSON or text files
2. Handle large log files If logs exceed 25 MB, split into smaller files (by date range or event type)
3. Upload to Email Extractor The tool scans the entire log content for email patterns, finding emails in nested payloads, metadata and event data
4. Filter results Review the extracted list; webhook logs may contain system emails (noreply@, mailer-daemon@) mixed with customer emails

Paginated API response processing

Step What to do
1. Fetch all pages Most APIs return paginated results (e.g., 100 records per page); fetch each page and save the response
2. Save as individual files or concatenate Either save each page as a separate JSON file (page1.json, page2.json) or concatenate into one file
3. Upload to Email Extractor If saved as individual files, upload all at once; Email Extractor processes each and deduplicates across all pages
4. Verify count Compare the extracted unique email count to the total record count reported by the API

Format-Specific Considerations

Format File extension for Email Extractor Supported Notes
JSON .json Yes Extracts from all string values; deeply nested objects are searched
XML .xml Yes Extracts from element content, attributes, CDATA
CSV .csv Yes Extracts from all columns regardless of column name
TSV .tsv Yes Tab-separated; same behaviour as CSV
Plain text (log files) .txt or .log Yes Line-by-line extraction; works for any text format
HTML (API docs, rendered responses) .html or .htm Yes Extracts from visible text and HTML attributes (mailto: links, form values)
NDJSON (newline-delimited JSON) .json or .txt Yes Each line is a JSON object; save as .json or .txt
YAML .md or .txt Rename to .txt YAML is not a natively supported format; rename to .txt for plain-text extraction
Protocol Buffers / MessagePack N/A No Binary formats; convert to JSON first using the appropriate library

Tips for Large API Exports

Challenge Solution
API response exceeds 25 MB file limit Split by date range, record type, or page; upload multiple files
API returns compressed data (gzip) Decompress before uploading; Email Extractor processes uncompressed text
API response contains base64-encoded data Emails in base64-encoded fields are not extracted; decode the data before uploading if those fields may contain emails
API rate limits prevent full export Export in batches over time; save each batch; upload all files together for deduplication
Duplicate records across API endpoints A contact from GET /contacts and the same email from GET /deals appear twice in the API data; Email Extractor deduplicates automatically
System and no-reply emails in results After extraction, filter out noreply@, mailer-daemon@, system@, and similar automated addresses manually or with your CRM's import filter

Extract emails

Explore tools

Verify emails

Check address validity before using your list.

ZeroBounce

Email Verification

Verifies email lists and provides tools for monitoring deliverability.

Useful when list cleaning and sender health belong in one workflow.

Explore ZeroBounce (opens in a new tab)