Output Formats
One row per contact (subject to anchor #6 scope), in CSV or JSON.
Row schema (16 columns)
The lead object lives on leadsEnrichment[] for Maps and SERP; URL-list leads sit on the same field inside a per-domain merged record. Field names are the actual keys the Apify lead-enrichment service returns.
| Column | Source field |
|---|---|
Source |
Literal: Maps, Search, or URL list (set by the route used) |
Source Query or URL |
Original search string or input URL |
Business / Domain |
title (Maps) / domain of url (SERP) / start URL host (URL list) |
Full Name |
leadsEnrichment[].fullName |
Job Title |
leadsEnrichment[].jobTitle |
Departments |
leadsEnrichment[].departments joined with | (array of enum strings; often empty) |
Seniority |
leadsEnrichment[].seniority (entry / manager / director / c_suite / etc., blank if unavailable) |
Email |
leadsEnrichment[].email |
Email Verification Status |
leadsEnrichment[].emailVerification.result (ok / invalid / disposable / catch_all / unknown / error) |
Email Verification Quality |
leadsEnrichment[].emailVerification.quality (good / risky / bad) |
LinkedIn |
leadsEnrichment[].linkedinProfile |
Phone |
place phone if present (Maps) else leadsEnrichment[].companyPhoneNumber |
City |
leadsEnrichment[].city (or place city for Maps) |
Country |
leadsEnrichment[].country (or place countryCode for Maps) |
Business Address |
place address (Maps only; blank for SERP / URL list) |
Business Website |
place website / url / leadsEnrichment[].companyWebsite |
Date Scraped |
run finish time (ISO 8601) |
Notes:
departmentsis a plural array on the lead (not a string field calleddepartment). Often empty, but populated for ~30% of leads with values like["marketing"]or["c_suite", "finance"]. Join with|for the CSV column.- Missing fields stay blank — never invent a value.
Filter & dedupe
Spurious-match filter (mandatory, always on). The lead-enrichment service sometimes returns global-fallback leads when no local match exists — e.g., a US-zoo CFO with
companyWebsite=zoo.orgattributed to 8 unrelated Polish zoos because the matcher latched onto thezoosubstring.Row-keep logic: extract hostnames (strip
https?://, leadingwww., anything after/; lowercase) from both the source URL and the lead'scompanyWebsite, and keep only if both non-empty and equal. The source URL isplace.website(Maps), the SERP resulturl(Search), or the originalstartUrls[].url(URL list). If either hostname is empty, drop the lead.Count drops in
run_metadata.jsonunderstats.spuriousMatchesDroppedand surface in the deliverable header if non-zero.Result-scope filter (anchor #6). Applied after spurious-match.
Scope Row-keep logic verified-only(default)emailVerification.result == "ok"verified-plus-catchallemailVerification.result in {"ok", "catch_all"}all-emailsemailis non-empty (any result, including missing verification)with-phoneplace phoneorcompanyPhoneNumberis non-empty (regardless of email)everythingno filter Dedupe: for scopes that produce email rows, group by
email.toLowerCase(). Keep the first occurrence. If the same email comes from multiple sources, concatenateSource Query or URLwith|. Forwith-phonerows that have no email, dedupe by lowercased phone instead.Empty-result rows: if the department filter (anchor #3) produced zero leads for a given domain, include one row for that domain with blank
EmailandEmail Verification Status = "no leads matched filter". These rows are inserted before result-scope filtering and are always shown — they tell the user the filter narrowed too much.Invalid-URL rows (URL-list route only): include one row per pre-skipped URL with
Email Verification Status = "skipped — invalid URL". Also always shown.
State both the active result scope and the spurious-match drop count in the deliverable header.
Rendering
Post-process the raw dataset (from get-dataset-items or the script's output file) the same way regardless of route:
- Flatten
leadsEnrichmentso each lead becomes its own row. - Apply both filters (spurious-match, then scope).
- Dedupe.
- Project to the 16 columns above (CSV) or to a
contactsarray (JSON).
CSV deliverable — one header row, one row per lead, trailing RUN_METADATA row: RUN_METADATA, runId=..., datasetId=..., actor=..., finishedAt=....
JSON deliverable — envelope:
{
"runMetadata": {"runId": "...", "datasetId": "...", "actor": "...", "finishedAt": "...", "consoleUrl": "https://console.apify.com/actors/runs/..."},
"filter": {"scope": "verified-only", "rowKeepLogic": "emailVerification.result == 'ok'"},
"contacts": [ /* ... */ ]
}Sidecar — always write run_metadata.json next to the deliverable with the same runMetadata fields plus stats (placesScraped, rawLeads, spuriousMatchesDropped, keptUnderScope). For multi-route deliverables, actor / runId / datasetId become arrays in matching order.