Take a basic record and enhance it with data from external APIs — geocoding addresses, resolving company info, validating phone numbers, scoring leads. Transform minimal input into rich, actionable data.
Rendering diagram…
Use data enrichment when:
Rendering diagram…
Map which fields come from which APIs:
| Field Needed | Source API | Input Required | Cost |
|---|---|---|---|
| Company info | Clearbit, ZoomInfo | Email domain | $$ |
| Address geocoding | Google Maps, Azure Maps | Street address | $ |
| Address validation | getAddress.io, SmartyStreets | Postal code | $ |
| Phone validation | Twilio, Mailboxlayer | Phone number | $ |
| Email validation | ZeroBounce, Mailboxlayer | Email address | $ |
| Country info | REST Countries | Country code | Free |
| Currency rates | Fixer.io, XE.com | Currency code | Free/$ |
| Weather | OpenWeather, AccuWeather | Location | Free/$ |
| Sanctions check | OFAC API | Name + country | $$ |
| Translation | Google Translate | Text string | $ |
Process enrichment sources in order of value and dependency:
Stage 1 (No dependencies):
- Validate email format
- Validate phone format
- Validate postal code
Stage 2 (After validation):
- Lookup company by email domain
- Geocode address
- Lookup location by postal code
Stage 3 (After company lookup):
- Enrich company details (industry, size, revenue)
- Find social profiles
- Calculate risk score
Not every API call will succeed:
| Scenario | Handling |
|---|---|
| API returns no data | Keep the field empty, mark as "not enriched" |
| API returns 429 (rate limit) | Queue for retry using Retry with Exponential Backoff |
| API returns error | Log the error, skip this enrichment source, continue with others |
| API returns low-confidence match | Store the data but flag it for review |
Rule of thumb: never let an enrichment failure block the record. The record should pass through even if some enrichments fail.
When enrichment data conflicts with existing data:
| Strategy | When |
|---|---|
| Enrichment wins | The field was empty; filling it in is always good |
| Existing wins | The field already has user-provided data; don't overwrite |
| Highest confidence wins | Compare confidence scores from the API |
| Flag for review | When both have data but they disagree |
Track enrichment effectiveness:
| Metric | Target |
|---|---|
| Enrichment rate | >80% of records have all key fields filled |
| API success rate | >95% per source |
| Enrichment cost per record | Under your budget threshold |
| Data freshness | Re-enrich every 6 months |
Be mindful of data privacy. Enrichment APIs process personal data. Ensure your use complies with GDPR, CCPA, and your privacy policy. Some APIs cache and share data you send them.
Accept file uploads (CSV, Excel), validate every row against business rules, report errors to the submitter, and import clean data into the target system. The essential pattern for bulk data intake.
Tag every side-effecting request with a unique key, persist the outcome, and return the stored result on replays. Stops duplicate charges, duplicate tickets, and duplicate emails dead.