AI GTM engineering means writing code and agents that run parts of outbound: finding accounts, enriching people, drafting messages, routing replies. The data layer comes first, and it is four API calls.
TL;DR
- A GTM engineer replaces manual list work with scripts and agents. The agent is only as good as the data it can query.
- The data layer is: size a list for free, search it, enrich the people you keep, then expose the same data to an agent over MCP.
- It takes about 30 minutes and spends about 40 records of the 1,000 on the free plan. No card.
Prerequisites
- A LeadOcean key from app.leadocean.io/register, stored as
$LEADOCEAN_API_KEY. curlandjq.- Optional: an MCP client such as Claude Code or n8n for step 4. See LeadOcean + n8n.
Requests go to https://api.leadocean.io with the header x-api-key. Free allows 5 requests a second.
Step 1: Size the list before you pull it
Sizing is free. Send count=true as a query parameter with limit=1. The body stays flat JSON and filters are arrays.
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 '{"title": ["GTM Engineer"], "country": ["US"]}' | jq '.meta'meta.total is capped at 100,000. Data comes back empty and meta.countOnly is true. Nothing is spent.
Step 2: Search the people
Drop the count flag and set a small limit. One record is one person returned, so 25 people cost 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 '{"title": ["GTM Engineer"], "country": ["US"], "emailStatus": ["verified"], "limit": 25}' \
> page1.json
jq '.meta' page1.jsonEnum values are exact strings. Check them before you guess: GET /v1/enums, or the free leadocean_list_enum_values MCP tool. Page with cursor from meta. One search stops at 10,000 rows (meta.depthCapped), so narrow the filters instead of paging deeper.
Step 3: Enrich the people you keep
Search gives you a list. Enrich gives you one person in depth. It takes exactly one of linkedin_url, email, phone or person_id. Each search row carries its id at meta.source_ids.person_id.
PID=$(jq -r '.data[0].meta.source_ids.person_id' page1.json)
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\": \"$PID\", \"reveal_email\": true}"Since October 2026 the response includes career history (resume_data): past roles, education and certifications. That is the raw material for a personalised first line. The enrich returns the person again, so it counts one record. A person we hold nothing for returns 404 and costs nothing.
Step 4: Give the same data to an agent over MCP
The hosted MCP server is at https://api.leadocean.io/mcp. It signs in with OAuth, so no key is pasted. It exposes 13 tools. Seven are free, including leadocean_count_leads, leadocean_count_companies, leadocean_list_filters and leadocean_list_enum_values.
In Claude Code, add it as a remote server (setup page):
claude mcp add --transport http leadocean https://api.leadocean.io/mcpThen prompt the agent in plain language:
Use leadocean_count_leads to size US GTM Engineers with a mailable email.
Only if the total is under 500, search 10 of them and draft a two-line opener
from each person's career history. Do not export anything.The guardrail in the prompt matters. Tell the agent which tools spend records and give it a ceiling.
Step 5: Move to a file when the list is big
An agent loop is the wrong tool above a few hundred rows. Use an export: POST /v1/exports takes up to 50,000 rows a request and 500,000 a day. Bulk CSV export is not on Free, so this step needs Solo ($97 a month) or higher.
curl -s -X POST "https://api.leadocean.io/v1/exports" \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"filters": {"title": ["GTM Engineer"], "country": ["US"], "emailStatus": ["verified"]}, "limit": 5000}'The answer is a job id. Poll it, then download the CSV. Warm the sending domain before the first send: see inbox warm-up, Gmail warmup and inbox warming.
What you get
A real run of the free sizing tool on 21 October 2026 (leadocean_count_leads, title "GTM Engineer"). The counts include only mailable addresses (verified, catch_all_valid or catch_all), which is the tool's default.
| Filter | Mailable people | All people matching | Employers |
|---|---|---|---|
| title "GTM Engineer", worldwide | 475 | 1,617 | 404 |
| title "GTM Engineer", country US | 243 | 583 | 205 |
Response shape from the API reference for an enrich, with placeholder values:
{
"success": true,
"data": {
"profile_data": { "profile_full_name": "Jane Doe" },
"contact_data": {
"email_status": "verified",
"contact_emails": [{ "email": "jane@acme.com", "status": "verified" }],
"contact_current_experiences": [{ "job_title": "GTM Engineer", "company_name": "Acme", "company_domain": "acme.com" }]
},
"resume_data": {
"experiences": [{ "job_title": "Sales Operations Analyst", "company_name": "Example Co" }],
"educations": [],
"certifications": []
}
},
"meta": { "credits": 1 }
}Past employers in resume_data carry no company_id yet.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| 401 | Missing or wrong x-api-key | Copy the key from the app again and check $LEADOCEAN_API_KEY is exported. |
| 429 | Above the plan's rate limit (5 a second on Free, 200 on Agency) | Honour the Retry-After header and throttle the loop. |
| 402 | Free records are spent | Upgrade at /pricing. Counts and failed lookups still work. |
Empty data on a filter that should match | Enum value is not an exact string | Look it up with GET /v1/enums or leadocean_list_enum_values. |
meta.depthCapped is true, no nextCursor | One search stops at 10,000 rows | Add filters and split the list. |
| Export refused | Over 50,000 rows a request or 500,000 a day | Split the filters across requests and days. |
FAQ
What does a GTM engineer do?
A GTM engineer builds the systems behind outbound: data pulls, enrichment, routing, and agent workflows. The job sits between sales ops and engineering.
Do I need an AI agent to do this?
No. Steps 1 to 3 are plain scripts. An agent earns its place when the task needs judgement, such as picking a hook from career history.
How many records does the free plan cover?
You get 1,000 records for life, with no card. Sizing calls, counts and lookups that find nothing cost nothing.
Which plan fits a GTM team?
Solo at $97 a month suits one engineer and includes bulk CSV export. Agency at $497 a month suits a team: 200 requests a second and 5 keys. See /pricing. For more tooling, read 14 sales automation tools for founders and GTM engineers.
Build your GTM data layer on 1,000 free records
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →