Email Link Extractor
by leafed_dryer
Extract and unwrap tracking links from marketing emails. Get the real destination URLs from SendGrid, Mailchimp, HubSpot & more for clean analysis.
Opens on Apify.com
About Email Link Extractor
Ever click a link in a marketing email and wonder where it *really* goes? Most emails are full of tracking links from services like SendGrid, Mailchimp, or HubSpot that hide the final destination. This actor cuts through that noise. It’s an Email Link Extractor built to pull every link from your email content, analyze them, and then patiently follow the chain of redirects to find the actual URL at the end. I use it to audit campaign links, see where competitors are driving traffic, or just clean up a messy list of URLs for analysis. It handles the big providers—SendGrid, Mailchimp, Beehiiv, HubSpot, Constant Contact—and most others you’ll encounter. The real value is in getting that clean, final dataset. Instead of a column full of different tracking URLs, you get the real article links, product pages, or landing sites, which is what you actually need for any serious work. It saves you the manual hassle of clicking each link or writing a custom script to unwrap redirects.
What does this actor do?
Email Link Extractor is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.
Key Features
- Cloud-based execution - no local setup required
- Scalable infrastructure for large-scale operations
- API access for integration with your applications
- Built-in proxy rotation and anti-blocking measures
- Scheduled runs and webhooks for automation
How to Use
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
Email Link Extractor
Overview
This Apify actor extracts all links from email content (HTML and plain text) and resolves tracking URLs from major email marketing services to reveal the final destination URLs. It organizes and categorizes the results for analysis.
Key Features
- Extracts links from both HTML and plain text email content.
- Identifies and resolves tracking links from services including:
- SendGrid (
sendgrid.net/ss/c/) - Mailchimp (
mailchimp.com/track/) - Beehiiv (
mail.beehiiv.com) - HubSpot (
hslinks.com) - Constant Contact (
constantcontact.com/links/) - Mailgun (
mailgun.org/link/) - Campaign Monitor (
click.campaigns.) - AWeber (
aweber.com/ct/)
- SendGrid (
- Categorizes links as direct, tracked, resolved, or unresolved.
- Provides detailed statistics and breakdowns by tracking service.
- Optimized for integration with automation platforms like Make.com.
How to Use
Execute the actor via a POST request to the Apify API. Provide the email content as JSON in the request body.
Basic Input
At minimum, you must provide either html or text.
{
"html": "<html>email content</html>",
"subject": "Email Subject"
}
Full Input Example
{
"html": "Email HTML",
"text": "Plain text version",
"subject": "Newsletter Title",
"from": {
"address": "sender@example.com",
"name": "Sender Name"
},
"date": "2025-08-17T15:06:16.000Z",
"messageId": "unique-message-id",
"options": {
"resolveRedirects": true,
"includeMailto": false,
"minTextLength": 3
}
}
Input/Output
Input Fields
html(string, optional): The HTML body of the email.text(string, optional): The plain text body of the email. At least one ofhtmlortextis required.subject(string, optional): The email subject line.from(object, optional): Sender information withaddressandname.date(string, optional): The email date in ISO format.messageId(string, optional): A unique identifier for the email.options(object, optional):resolveRedirects(boolean): Whether to resolve tracking URLs. Defaults totrue.includeMailto(boolean): Whether to includemailto:links in results. Defaults tofalse.minTextLength(number): Minimum length for link anchor text to be included.
Output Structure
The actor returns a structured JSON object with the extracted and resolved link data.
{
"success": true,
"timestamp": "2025-08-17T15:30:00.000Z",
"email": {
"subject": "Newsletter Title"
},
"summary": {
"totalLinks": 15,
"trackedLinks": 12,
"directLinks": 3,
"resolvedLinks": 8,
"unresolvedLinks": 4
},
"trackingStats": {
"sendgrid": {
"total": 8,
"resolved": 6,
"unresolved": 2
}
},
"links": {
"all": [...],
"resolved": [
{
"original": "https://tracking-url...",
"cleaned": "https://real-destination.com",
"text": "Click here",
"service": "sendgrid"
}
],
"direct": [...],
"unresolved": [...]
}
}
Integration with Make.com
- Use an HTTP Request module to POST email data to the actor's run endpoint:
POST https://api.apify.com/v2/acts/YOUR_USERNAME~email-link-extractor/runs - Set the headers:
Authorization: Bearer YOUR_API_TOKENContent-Type: application/json
- Place the full email content JSON in the request body.
- To fetch the results, send a GET request to the dataset items endpoint:
GET https://api.apify.com/v2/acts/YOUR_USERNAME~email-link-extractor/runs/LAST/dataset/items
Performance & Notes
- Average runtime: 2-5 seconds per email.
- Memory usage: Approximately 100MB per execution.
- Common Issues:
- Error
"Se requiere al menos HTML o texto": Ensure your input contains either thehtmlortextfield. - Unresolved links: Some complex or encrypted tracking URLs may not resolve and will be marked with
"status": "unresolved". - Timeouts: For very large emails, you may need to increase the
timeoutSecsin the execution options.
- Error
Categories
Common Use Cases
Market Research
Gather competitive intelligence and market data
Lead Generation
Extract contact information for sales outreach
Price Monitoring
Track competitor pricing and product changes
Content Aggregation
Collect and organize content from multiple sources
Ready to Get Started?
Try Email Link Extractor now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- leafed_dryer
- Pricing
- Paid
- Total Runs
- 163
- Active Users
- 7
Related Actors
Video Transcript Scraper: Youtube, X, Facebook, Tiktok, etc.
by invideoiq
Linkedin Profile Details Scraper + EMAIL (No Cookies Required)
by apimaestro
Twitter (X.com) Scraper Unlimited: No Limits
by apidojo
Content Checker
by jakubbalada
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support