Get Verified Email and Phone from a LinkedIn URL with the Clay CLI
Get Verified Email and Phone from a LinkedIn URL with the Clay CLI
Turn a LinkedIn profile URL into a verified work email, mobile phone, and role context using the clay CLI to run Clay's Enrich Person and Find Contact Details routine.
What you will build
A CLI workflow that runs the contact-details routine and extracts the three top-level result fields.
clay routines get <id> (confirm real input key)
↓
clay routines runs start <id> --input '...' (submit LinkedIn URL)
↓
clay routines runs get <run-id> --wait 180 (poll -- this routine chains multiple lookups)
AI Prompt
Using the clay CLI, get verified work email and mobile phone for a LinkedIn profile URL using Clay's "Enrich Person and Find Contact Details" managed function. Requirements: - Find the real routine id via `clay routines list`. - Confirm the real input schema with `clay routines get <id>` -- the required key is "Social Profile URL", NOT "Professional Profile URL" (that key belongs to the plain "Enrich Person" routine -- these two similar-sounding routines use different input key names). - The result has three top-level keys: "Work Email" (string), "Mobile Phone" (string, may be partially masked), and "Enrich person" (lowercase "person" -- nested profile). - This routine costs notably more per item than most others (~18 credits) -- check `clay routines get <id> | jq .estimatedCreditCost` and `clay credits` before running a batch. - Run the verification step below before finishing.
Prerequisites
- The
clayCLI on PATH, authenticated
1. Find and confirm the routine
clay routines list
Resolve the real routine id dynamically by matching on its display name rather than hardcoding it:
ROUTINE_ID=$(clay routines list | jq -r '.data[] | select(.name=="Enrich Person and Find Contact Details") | .id') clay routines get "$ROUTINE_ID"
Confirmed real input schema requires "Social Profile URL" — a different key name than the plain Enrich Person routine's "Professional Profile URL", despite both accepting a LinkedIn URL. This mismatch was confirmed live: submitting "Professional Profile URL" to this routine returns a real validation_error.
2. Check the cost
clay routines get "$ROUTINE_ID" | jq '.estimatedCreditCost' clay credits
3. Run it
clay routines runs start "$ROUTINE_ID" \
--input '{"items":[{"id":"cd-1","inputs":{"Social Profile URL":"https://www.linkedin.com/in/kareemamin"}}]}'
clay routines runs get <run-id> --wait 180
4. Verify the result
This example was tested live against a real, public LinkedIn URL (Clay's own co-founder).
A first attempt using the wrong input key name reproduced a real, live error:
clay routines runs start "$ROUTINE_ID" \
--input '{"items":[{"id":"kareem-cd","inputs":{"Professional Profile URL":"https://www.linkedin.com/in/kareemamin"}}]}'
{ "error": { "code": "validation_error", "message": "Invalid inputs for item kareem-cd: Social Profile URL: Missing required field: Social Profile URL" } }
Corrected with the real key name:
clay routines runs start "$ROUTINE_ID" \
--input '{"items":[{"id":"kareem-cd","inputs":{"Social Profile URL":"https://www.linkedin.com/in/kareemamin"}}]}'
{ "routineRunId": "run_0tjzn5apyKU3AYTRyak", "mode": "inline", "status": "in_progress" }
clay routines runs get run_0tjzn5apyKU3AYTRyak --wait 180
Real confirmed result:
{
"status": "complete",
"data": [{
"id": "kareem-cd",
"status": "complete",
"result": {
"Work Email": "[email protected]",
"Mobile Phone": "+142****3442",
"Enrich person": {"name": "Kareem Amin", "title": "Cofounder/CEO", "org": "Clay"}
}
}]
}
How it works
This routine chains person profile enrichment with contact-detail lookup in one call, at a notably higher per-item cost than single-purpose functions. Its input key (Social Profile URL) differs from the plain Enrich Person routine's key (Professional Profile URL) even though both accept the same kind of URL — a real naming inconsistency worth checking every time, not assuming consistency across similarly-named routines.
Common issues
validation_error: Social Profile URL: Missing required field
Cause: using "Professional Profile URL" (the key from the plain Enrich Person routine) instead of this routine's real key, "Social Profile URL".
Fix: always confirm the exact input key via clay routines get <id> per routine — don't assume two similarly-named routines share an input schema.
Response takes 60-90+ seconds
Not a bug: this routine chains multiple lookups internally. Use --wait 180 or higher.
Next steps
- Get just a verified email (lower cost) — see the Clay find-verified-work-email CLI example
- Build the contact list first — see the Clay prospect-list-from-company CLI example
- Enrich further with firmographic data — see the Clay contact-waterfall-enrichment CLI example
Verification
verification:
status: verified
tested_at: "2026-08-18"
cli_version: "0.7.0"
auth_method: "clay login --device"
command: "clay routines runs start function:t_0tjqm9wYmmfbigtrMKs --input '{\"items\":[{\"id\":\"kareem-cd\",\"inputs\":{\"Social Profile URL\":\"https://www.linkedin.com/in/kareemamin\"}}]}' && clay routines runs get run_0tjzn5apyKU3AYTRyak --wait 180"
expected_result: "status=complete, Work [email protected], Mobile Phone=+142****3442, real profile for Kareem Amin"
Related Articles
- Is there a software that can extract data from the Contact Us page of a company and add it to a lead record?
- Is there a prospecting tool that can find the work email of a person using only their name and company website?
- Which tool can enrich lead data from LinkedIn profiles at scale using multiple providers?