Outbound automation is a list problem first and a sending problem second. Get a clean, sized, mailable list from an API and the rest is plumbing. This guide builds the list half in four requests.
TL;DR
- Four requests: size the audience (free), search people, look up work emails, export or hand off to your sender.
- First run takes about an hour. Reruns are one script.
- It spends about 35 LeadOcean records on the Free plan (1,000 records for life, no card).
Prerequisites
- A LeadOcean API key from the free plan, stored as
$LEADOCEAN_API_KEY. Free gives you 1 key and 5 requests a second. curlandjq.- A sender you already use (a sequencer, n8n, or your own SMTP). LeadOcean is the data layer. It has no sequencer, dialer or CRM.
export LEADOCEAN_API_KEY="your-key-here"Step 1: Size the audience before you spend anything
Send the search with count=true as a query parameter and limit=1. It returns a total and no rows, so it costs nothing. meta.total is capped at 100,000.
curl -s -X POST "https://api.leadocean.io/v1/people/search?count=true&limit=1" \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jobLevel": ["VP"],
"jobFunction": ["Sales & Business Development"],
"country": ["CA"]
}' | jq '.meta'Filters are arrays, the body is flat JSON, and enum values are exact strings. Check a value first with GET /v1/enums (or leadocean_list_enum_values over MCP) instead of guessing.
If the number is too big, add a filter. If it is zero, you misspelled an enum.
Step 2: Pull the people
Same body, no count, and a limit between 1 and 100. Start with 25 so the test spends 25 records.
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": ["CA"],
"limit": 25
}' > page1.json
jq '.meta' page1.jsonFor the next page, pass meta.nextCursor as cursor. One search pages to 10,000 rows. When meta.depthCapped is true there is no nextCursor: narrow the filters instead of walking the index.
Step 3: Get a work email for the people you will contact
Search finds the person. The contact endpoints return the address. Call GET /v2/people/email/work for each person you plan to email, with the person_id each search row carries at meta.source_ids.person_id.
curl -s "https://api.leadocean.io/v2/people/email/work?person_id=PERSON_ID" \
-H "x-api-key: $LEADOCEAN_API_KEY"The endpoint also takes linkedin_url instead (openapi.json, October 2026). The answer is data.email, data.status and data.verified_batch_date, or data: null when no address qualifies. Each v2 contact call costs one record, including a call that finds nothing, so test on 10 people first.
Read the status before you send. LeadOcean does not refund or credit back bounces. Mail verified and catch_all_valid. Treat catch_all, risky, role and derived with care. Drop invalid, spam_trap, abuse and disposable.
Step 4: Export or hand off to your sender
For a few hundred people, loop Steps 2 and 3 from a script. For a big list, use a bulk export: up to 50,000 rows a request and 500,000 a day. Bulk CSV export is not on Free.
curl -s -X POST "https://api.leadocean.io/v1/exports" \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "vp-sales-ca",
"filters": {
"jobLevel": ["VP"],
"jobFunction": ["Sales & Business Development"],
"country": ["CA"],
"emailStatus": ["verified", "catch_all"]
},
"limit": 5000,
"preset": "full"
}' | jq '.data | {id, status, requested}'The body is filters, limit and a preset or columns list. The full preset carries up to 3 emails and 2 phones and needs the enrich scope. Poll GET /v1/exports/{id}, then fetch GET /v1/exports/{id}/download. You can also build the same export in the app at app.leadocean.io: filter builder, column picker and a price preview before you start.
To run it on a schedule, put the Step 2 request in an n8n HTTP Request node. The recipe is on the n8n integration page. Your sender takes it from there.
What you get
The sizing call in Step 1 is free over MCP too. This is leadocean_count_leads on 2026-10-21 for the same filters:
{
"total": 5574,
"totalIsExact": true,
"totalAll": 18800,
"distinctCompanies": 3873,
"credits": 0
}total counts mailable addresses only (verified, catch_all_valid or catch_all), the default. totalAll is the same filters with no email condition. VP-level sales leaders in Canada: 5,574 you can mail, across 3,873 employers.
A search response has this shape (response shape from the API reference, placeholder values):
{
"success": true,
"data": [
{
"profile_data": { "profile_full_name": "Jane Doe" },
"contact_data": { "has_email": true, "email_status": "verified" },
"meta": { "source_ids": { "person_id": "1234567890" } }
}
],
"meta": {
"count": 25,
"limit": 25,
"credits": 25,
"nextCursor": "CURSOR_TOKEN"
}
}Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| 401 | Missing or wrong x-api-key | Check $LEADOCEAN_API_KEY is exported and sent as the x-api-key header |
| 429 | Above the plan's rate limit (5 requests a second on Free, 200 on Agency) | Wait for Retry-After, then slow the loop |
| 402 | Out of records | Free is 1,000 records for life. Move to a paid plan |
Empty data | Bad enum value, such as vp instead of VP | Look up exact strings with GET /v1/enums |
depthCapped true, no nextCursor | One search pages to 10,000 rows | Add filters and split the list |
| Export refused | Over 50,000 rows a request or 500,000 a day, or on Free | Split the export, or use a paid plan |
FAQ
How many records does a first run cost?
About 35: 25 from the search and 10 work-email lookups. Counts, GET /v1/enums and a 404 cost nothing.
Does LeadOcean send the emails?
No. It supplies people and verified contact data by API and MCP. You send from the tool you already use.
Can an AI agent run this instead of curl?
Yes. The hosted MCP server at https://api.leadocean.io/mcp exposes 13 tools, including free leadocean_count_leads and leadocean_count_companies, and signs in with OAuth.
What does it cost at volume?
Free is $0 for 1,000 records. Solo is $97 a month, Agency is $497 a month and Platform is $1,997 a month. Paid plans use a fair-use pace, not credits. See pricing.
More guides are in the LeadOcean blog. Related: how to automate outbound sales, B2B outbound sales for B2B teams, personalize outbound sales emails.
Build your outbound list with four requests
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →