Skip to content

Examples

These examples demonstrate common workflows with the GraphADV enrichment API.

Terminal window
export BASE_URL="https://api.graphadv.com/v2"
export GRAPHADV_API_KEY="YOUR_API_KEY"

The most common workflow: enrich a company, wait for completion, and retrieve the result.

Terminal window
# 1. Start enrichment
TASK_ID=$(curl -s -X POST "$BASE_URL/enrich/company" \
-H "X-Api-Key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "notion.so"}' | jq -r '.task_id')
echo "Job ID: $TASK_ID"
# 2. Poll until complete
while true; do
STATUS=$(curl -s "$BASE_URL/jobs/$TASK_ID" \
-H "X-Api-Key: $GRAPHADV_API_KEY" | jq -r '.status')
echo "Status: $STATUS"
if [ "$STATUS" = "completed" ]; then
# 3. Get result
curl -s "$BASE_URL/jobs/$TASK_ID/result" \
-H "X-Api-Key: $GRAPHADV_API_KEY" | jq
break
elif [ "$STATUS" = "failed" ]; then
echo "Job failed"
break
fi
sleep 2
done

Enrich a company, then get its leadership team with verified contact info.

Terminal window
# Get leadership for a company (assumes company is already enriched)
curl "$BASE_URL/companies/stripe.com/persons" \
-H "X-Api-Key: $GRAPHADV_API_KEY" | jq '.data[] | {name: .full_name, title: .title, email: .email}'

Create a TAL, add companies, and enrich them in bulk.

Terminal window
CLIENT_ID="my-client-id"
# 1. Add companies to TAL (free)
curl -X POST "$BASE_URL/clients/$CLIENT_ID/tal/companies" \
-H "X-Api-Key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domains": ["stripe.com", "notion.so", "figma.com", "linear.app", "vercel.com"],
"source": "manual"
}'
# 2. Enrich the entire TAL
curl -X POST "$BASE_URL/clients/$CLIENT_ID/tal/enrich" \
-H "X-Api-Key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{"max_age_days": 30}'

Enrich a list of people by email to get verified contact info.

Terminal window
# Batch enrich multiple people
curl -X POST "$BASE_URL/enrich/batch" \
-H "X-Api-Key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emails": [
"john@acme.com",
"jane@example.com",
"bob@startup.io"
]
}'

Monitor your unit balance and plan status.

Terminal window
curl "$BASE_URL/usage" \
-H "X-Api-Key: $GRAPHADV_API_KEY" | jq

When you have a LinkedIn URL but not an email.

Terminal window
curl -X POST "$BASE_URL/enrich/person" \
-H "X-Api-Key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{"linkedin_url": "https://linkedin.com/in/patrickcollison"}'

Search for Executives at Target Companies (v2)

Section titled “Search for Executives at Target Companies (v2)”

Find decision-makers using the v2 person search endpoint.

Terminal window
# Find all C-level executives at Stripe
curl "$BASE_URL/v2/persons?company_domain=stripe.com&seniority=executive" \
-H "X-Api-Key: $GRAPHADV_API_KEY"
# Search for CTOs across all companies
curl "$BASE_URL/v2/persons?title=cto&seniority=executive&limit=20" \
-H "X-Api-Key: $GRAPHADV_API_KEY"
# Find people by name
curl "$BASE_URL/v2/persons?query=john&include=contact,profile" \
-H "X-Api-Key: $GRAPHADV_API_KEY"

Discover Leadership Team for Outreach (v2)

Section titled “Discover Leadership Team for Outreach (v2)”

Use the leadership discovery endpoint to find and enrich an entire leadership team.

Terminal window
# Discover leadership at a single company (5 units)
curl -X POST "$BASE_URL/v2/search/leadership" \
-H "X-Api-Key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domains": ["stripe.com"],
"max_per_company": 10
}'
# Get job ID, then poll for results
TASK_ID="..." # From response
curl "$BASE_URL/v2/tasks/$TASK_ID/result" \
-H "X-Api-Key: $GRAPHADV_API_KEY"

Enrich Company with Leadership in One Request (v2)

Section titled “Enrich Company with Leadership in One Request (v2)”

Combine company enrichment and leadership discovery for efficiency.

Terminal window
# Enrich company + leadership (6 units total)
curl -X POST "$BASE_URL/v2/enrich/company" \
-H "X-Api-Key: $GRAPHADV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "stripe.com",
"include_leadership": true
}'
  • Use v2 person search: Free and fast way to find decision-makers before enriching
  • Leadership discovery: 5 units gets you ~10 enriched executives (cheaper than enriching individually)
  • Batch when possible: Use /enrich/batch to enrich multiple entities in one request
  • Use TAL for ongoing campaigns: Add companies to your TAL, then re-enrich periodically with max_age_days to keep data fresh
  • Check freshness: The enriched_at field tells you when data was last updated—skip re-enrichment if it’s recent
  • Poll efficiently: Start with 2-second intervals; most enrichments complete within 5-10 seconds
  • Monitor usage: Check /usage before large batch operations to ensure you have enough units