Automated LinkedIn prospecting works best as a data pipeline: define the audience as filters, pull the people, enrich the ones that matter and send them to your outreach tool. This guide builds that with four LeadOcean API calls. Nothing logs in to LinkedIn or drives a browser.
TL;DR
- Time: about 15 minutes. The pipeline then re-runs on a schedule from any cron job or workflow tool.
- Cost: 30 LeadOcean records for the walkthrough (25 searched, 5 enriched). Counting is free. The Free plan has 1,000 records for life.
- Output: a list of people with LinkedIn URLs where held and emails with their status, plus a CSV export for bigger pulls.
Prerequisites
- A LeadOcean API key from app.leadocean.io. The Free plan needs no card.
- The key in your shell as
$LEADOCEAN_API_KEY. curlandjq.- A target audience in one sentence. This guide uses US sales VPs at companies of 51 to 200 people.
Step 1: Size the audience for free
Count first. A count spends no records, so you can tune filters until the list is the right size.
Send filters as flat JSON arrays. Enum values are exact strings, so check them with GET /v1/enums or the free leadocean_list_enum_values MCP tool before you guess. For people search, add count=true as a query parameter, not in the body, with limit 1.
curl -s -X POST "https://api.leadocean.io/v1/people/search?count=true" \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jobLevel": ["VP"],
"jobFunction": ["Sales & Business Development"],
"country": ["US"],
"employeeRange": ["51-200"],
"limit": 1
}'meta.total is capped at 100,000. An AI agent can run the same count through the leadocean_count_leads tool on the MCP server at https://api.leadocean.io/mcp.
Step 2: Pull the first page of people
Drop count=true and set a real limit (1 to 100). Each person returned is one record.
curl -s -X POST https://api.leadocean.io/v1/people/search \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jobLevel": ["VP"],
"jobFunction": ["Sales & Business Development"],
"country": ["US"],
"employeeRange": ["51-200"],
"limit": 25
}' | tee page1.json | jq '.meta | {count, credits, nextCursor, depthCapped}'Search rows are a thin projection with no contact points. To get the next page, send the same body plus "cursor" set to the exact meta.nextCursor string. One search pages to 10,000 rows. When meta.depthCapped is true, narrow the filters and run a second search.
Step 3: Enrich the people worth contacting
Enrich only the shortlist. Search rows carry an id at meta.source_ids.person_id. Send it back to enrich that exact person, even when no LinkedIn URL is on file. The body takes exactly one of linkedin_url, email, phone or person_id.
curl -s -X POST https://api.leadocean.io/v1/people/enrich \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"person_id": "123456789", "reveal_email": true}'reveal_email: true returns every email and phone we hold, at no extra record. Read contact_data.email_status before you send anything. Bounced emails are not refunded. Enrich also returns career history (past roles, education, certifications) in resume_data, which is useful for a first line that is not generic.
If you already have LinkedIn URLs from a list, post them as linkedin_url instead. The cURL loop for LinkedIn URLs handles retries and 404s.
Step 4: Export the whole audience as a CSV
For hundreds or thousands of rows, stop paging and create an export. One export holds up to 50,000 rows, and an account can run 500,000 rows a day. Every row costs one record.
curl -s -X POST https://api.leadocean.io/v1/exports \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "us-sales-vps-51-200",
"limit": 500,
"preset": "full",
"filters": {
"jobLevel": ["VP"],
"jobFunction": ["Sales & Business Development"],
"country": ["US"],
"employeeRange": ["51-200"]
}
}'The API answers 202 with a job id. Poll GET /v1/exports/{id} until it is done, then fetch GET /v1/exports/{id}/download. Bulk CSV export is not on the Free plan. On Free, page search and enrich inside your 1,000 records. The app at app.leadocean.io has an Exports page with a filter builder, a column picker and the record price before you start.
Step 5: Put it on a schedule
LeadOcean returns data. Sending is your sequencer's job, and LeadOcean has no sequencer or dialer. Wrap Steps 2 and 3 in a script, run it from cron or n8n, and push the output to the tool that sends. The n8n recipe shows the HTTP Request setup. To avoid paying twice for the same person, store the person_id of everyone you have already pulled and skip them.
What you get
The count in Step 1 is a real run. On 2026-10-21 the leadocean_count_leads tool returned this for the filters above:
{
"total": 18567,
"totalIsExact": true,
"totalAll": 60456,
"distinctCompanies": 12192,
"credits": 0
}total counts people whose best email is verified, catch_all_valid or catch_all, which is the default. totalAll is the same filters with no email condition. The call spent 0 records.
A search or enrich row has this shape (response shape from the API reference, placeholder values):
{
"profile_data": { "profile_full_name": "Jane Doe" },
"contact_data": {
"has_email": true,
"email_status": "verified",
"email_type": "work",
"contact_emails": [{ "email": "jane@acme.com", "status": "verified" }]
},
"meta": { "source_ids": { "person_id": "123456789" } }
}contact_emails appears only when reveal_email is true.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| 401 | Missing or wrong x-api-key header | Check $LEADOCEAN_API_KEY is exported and the header name is exact |
| 429 | Above the plan's rate limit (5 a second on Free, 200 on Agency) | Wait for the Retry-After header, then retry. Slow the loop |
| 402 | Out of records | Free is 1,000 records for life. Check GET /v1/account, then move to a paid plan |
| Zero results | Enum value not an exact string, such as vp instead of VP | Look up values with GET /v1/enums or leadocean_list_enum_values |
400 on /v1/exports | Over 50,000 rows, or a filter the export cannot apply | Lower limit or split the audience into several exports |
429 export_limit_daily | Past 500,000 export rows in a day | Wait for resetsAt in the response |
FAQ
Does this log in to LinkedIn or scrape profiles?
No. You query LeadOcean's database over an API with a key. There is no LinkedIn login, extension or browser session involved.
How many records does the walkthrough use?
30: 25 from the Step 2 search and 5 from Step 3 enrichment. The count in Step 1 is free, and an enrich that finds nobody is a 404 that costs nothing.
Can I send LinkedIn connection requests or messages with it?
No. LeadOcean is the data layer. It has no sequencer, dialer or Chrome extension, so you pair it with the tool that sends. See LinkedIn scraper MCPs compared and B2B prospecting software integrations.
What does it cost to run this every week?
Each person you pull is one record. Free gives 1,000 records once. Solo is $97 a month and Agency is $497 a month with a fair-use pace instead of credits. See pricing. For the manual version of this workflow, read rep prospecting. More guides are on the blog.
Build your LinkedIn prospecting pipeline on real data
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →