π§ TL;DR: The Integration Depends on Your Workflow
Use Case | Recommended Option |
---|---|
Signup forms / real-time validation | β API |
Cold outreach or CRM clean-up | β Bulk upload |
Marketing automation (eg. Zapier) | Depends |
Webhooks or product onboarding | β API |
Legacy list clean-up / migrations | β Bulk |
π± If your validation happens at runtime
β Go API
π If you're working with large static lists
β Go Bulk
π What Is an Email Validation API?
An email validation API lets your product or system verify email addresses programmatically:
- β’ Runs live checks (syntax, MX, SMTP, catch-all)
- β’ Returns structured JSON (valid / invalid / risky)
- β’ Can be embedded in any app, form, CRM, or automation
Example use cases:
β Block typos at signup
Prevent users from entering invalid emails
β οΈ Flag disposable domains
Before onboarding or trial signup
β Enrich leads in real time
Score email quality as data flows
π» Sample API Integration
Sample Request
GET https://api.lero.email/validate?email=ana@company.com Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Sample Response
{ "status": "valid", "is_disposable": false, "is_catchall": false, "smtp_check": true, "mx_check": true, "score": 0.973, "risk": "low", "processing_time_ms": 47 }
β‘ Lero's API responds in <50 msβideal for signup flows where speed matters.
Integration Examples
JavaScript (Frontend)
const validateEmail = async (email) => { const response = await fetch( `https://api.lero.email/validate?email=${email}`, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); return response.json(); };
Python (Backend)
import requests def validate_email(email): response = requests.get( f"https://api.lero.email/validate", params={"email": email}, headers={"Authorization": "Bearer YOUR_API_KEY"} ) return response.json()
π What Is a Bulk Upload Integration?
Bulk validation means you upload a full list (CSV, XLSX) and Lero returns results once all entries are processed.
Ideal when:
- β’ You've collected leads through other systems
- β’ You're cleaning legacy CRMs
- β’ You want a full snapshot of list quality
Supports millions of emails
Output includes all metadata
No-code via dashboard
π‘ Learn more about bulk performance: How Lero Validates 1M Emails in Seconds
βοΈ API vs. Bulk Upload: Side-by-Side Comparison
Feature | API | Bulk Upload |
---|---|---|
Speed | ~50 ms per email | Batch (eg. 10K in 7s) |
Setup required | Needs integration (dev work) | No-code via dashboard |
Ideal for | Signup flows, realtime workflows | Cold outreach, CRM cleaning |
Result format | JSON (realtime) | CSV / XLSX / JSON (batch) |
Accuracy | 97.3% | 97.3% |
Price per email | Same in both | Same in both |
π οΈ Technical Implementation Considerations
π API Implementation
β Best Practices
- β’ Cache results for repeated emails
- β’ Handle rate limits gracefully
- β’ Use async/await for better UX
- β’ Implement retry logic
β‘ Rate Limits
- β’ 1000 requests/minute (free)
- β’ 10K requests/minute (paid)
- β’ Burst handling included
π Bulk Implementation
β File Requirements
- β’ CSV, XLSX, TXT formats
- β’ Up to 10M rows per file
- β’ UTF-8 encoding preferred
- β’ Header row recommended
β±οΈ Processing Time
- β’ 1K emails: ~7 seconds
- β’ 10K emails: ~1 minute
- β’ 100K emails: ~10 minutes
- β’ 1M emails: ~1.5 hours
π€ Bonus: Combine Both with Lero
Lero offers the flexibility to use both approaches seamlessly:
π Unified Platform
- β’ API with 99.9% uptime SLA
- β’ Bulk dashboard + Zapier + Make
- β’ Same pricing across both modes
- β’ Real-time streaming for bulk if needed
π― Recommended Stack
- β’ API for your product/signup forms
- β’ Bulk for cleaning sales/marketing campaigns
- β’ Webhooks for automated workflows
- β’ Analytics to track validation trends
π‘ Pro tip: Start with API for real-time needs, then add bulk processing for larger datasets. You can use the same account and credits for both.
π Integration Decision Matrix
Scenario | Volume | Timing | Best Choice |
---|---|---|---|
User registration form | 1 at a time | Instant | API |
Newsletter signup | 1-100/day | Real-time | API |
CRM data cleanup | 10K-100K | Batch job | Bulk |
Cold email campaign prep | 1K-50K | Before send | Bulk |
Lead enrichment pipeline | 100-1K/hour | Streaming | API + Bulk |
E-commerce checkout | 1-10/minute | Instant | API |
π Related Resources
β Frequently Asked Questions
Q1: Can I switch between API and bulk validation?
Yes! Both use the same credit pool and account. You can use API for real-time needs and bulk for larger datasets seamlessly.
Q2: What's the cost difference between API and bulk?
Pricing is identical per email validated. Volume discounts apply regardless of whether you use API or bulk validation.
Q3: How do I handle API timeouts or errors?
Implement exponential backoff retry logic. Our API returns specific error codes to help you handle different scenarios appropriately.
Q4: Can I get real-time progress for bulk uploads?
Yes! Our dashboard shows live progress, and we offer webhook notifications when bulk jobs complete.
Q5: Is there a minimum or maximum file size for bulk uploads?
Minimum 1 email, maximum 10M emails per file. For larger datasets, contact us for enterprise processing options.
π Ready to Choose Your Integration?
Whether you need real-time API validation or bulk processing power, Lero has you covered with the same accuracy and speed.
No credit card required β’ Same pricing for API & bulk β’ 97.3% accuracy guaranteed