Pre-Black Friday: 20% off, for as long as you stayEARLYBFon Solo and AgencyEnds Nov 28Start free

Guide

How to Build a Marketing Database (7 Examples as Queries)

Seven segments a B2B marketing team actually uses, each written as a filter you can size for free and pull through the API.

Get your free API key →Free to start. No credit card. 1,000 records to spend whenever you like.

A marketing database is a set of saved filters over people and companies, not a spreadsheet you maintain. This guide gives you seven examples as queries you can run today.

TL;DR

  • You will define seven audiences, size each one for free, and pull a small sample of one. About 25 minutes.
  • Sizing spends 0 records. The sample search spends 25 and ten optional enrichments spend up to 10, so about 35 of your 1,000 free records.
  • Counts below were run on 2026-10-21. They describe mailable people unless a line says otherwise.

Prerequisites

  • A free LeadOcean account and API key from app.leadocean.io/register. No card. Export it as $LEADOCEAN_API_KEY.
  • curl and jq, or any HTTP client.
  • Optional: the hosted MCP server at https://api.leadocean.io/mcp, if you would rather size audiences from Claude. leadocean_count_leads and leadocean_count_companies are free.

Step 1: Pick seven segments

Seven examples cover most B2B marketing programs. Each one is a different way to cut the same database.

#DatabaseCut byFilters
1Role-basedWho they arejobLevel, jobFunction
2FirmographicCompany shapeemployeeRange, industry, hqCountry
3TechnographicTools on their sitetechnologies, technologyCategories
4GeographicWhere they sitcountry, salesRegion, continent
5Funding-basedMoney raisedfundingType, minLastFundingYear
6Account-basedA named company listdomain
7ReachabilityHow you can contact thememailStatus, hasPhone

Most real databases combine two or three of these. Start with one and add filters until the count fits your budget.

Step 2: Check the exact filter values

Enum filters take exact strings, so look them up before you guess. Both calls below are free.

bash
curl -s "https://api.leadocean.io/v1/enums" -H "x-api-key: $LEADOCEAN_API_KEY" | jq 'keys'
curl -s "https://api.leadocean.io/v1/filters" -H "x-api-key: $LEADOCEAN_API_KEY" | jq 'length'

In an MCP client, leadocean_list_enum_values does the same job. Ask it for job_function and employee_range before you build a query. A wrong value returns an empty set, not an error.

Step 3: Size each database for free

Add count=true as a query parameter and set limit to 1. The body stays flat JSON and filters are arrays.

bash
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": ["Advertising & Marketing"],
    "hqCountry": ["US"],
    "employeeRange": ["201-500"]
  }' | jq '.meta'

That is example 1 and 2 combined: VPs of marketing at US companies with 201 to 500 people. On 2026-10-21 it matched 7,103 mailable people across 4,034 companies. Note that meta.total is capped at 100,000.

The other examples follow the same pattern. Change the body, keep the call.

json
{ "technologies": ["HubSpot"], "jobFunction": ["Advertising & Marketing"], "jobLevel": ["Director"] }
json
{ "seniority": ["c_suite"], "hqCountry": ["GB"], "employeeRange": ["11-50"] }
json
{ "domain": ["acme.com", "globex.example"], "jobFunction": ["Advertising & Marketing"] }
json
{ "reachable": "strict", "jobLevel": ["C-Team"], "salesRegion": ["EMEA"] }

Funding queries are different. Do not put fundingType in a free count, because it can return a false total. Count without it, then add the funding filter to the search body:

json
{ "fundingType": ["Series A"], "minLastFundingYear": 2025, "jobLevel": ["C-Team"], "limit": 25 }

The funding filter narrows the list further at search time. Check the first page before you trust the size.

Step 4: Pull a 25-row sample

Pull one page before you commit to a segment. Check that titles and companies look like the audience you meant.

bash
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": ["Advertising & Marketing"],
    "hqCountry": ["US"],
    "employeeRange": ["201-500"],
    "limit": 25
  }' | jq '.meta'

Each person returned is one record, so this page spends 25. Page on with meta.nextCursor, passed back exactly as given. One search pages to 10,000 rows.

Step 5: Enrich only the rows you keep

Enrichment takes exactly one of linkedin_url, email, phone or person_id. Take the person_id from your sample.

bash
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": "PERSON_ID_FROM_STEP_4", "reveal_email": true}'

An enrichment that finds nothing costs nothing. Read email_status before you send: LeadOcean does not refund bounced emails.

Step 6: Move the full list out

For thousands of rows, use the Exports page in app.leadocean.io. It has a filter builder, a column picker and a price preview before you start, then a CSV download. Bulk CSV export is not on Free. It is included on Solo ($97 a month), and Agency ($497 a month) allows 50,000 rows a file.

Through the API, POST /v1/exports takes up to 50,000 rows a request and 500,000 a day. Numbered columns come back as email_1_address, email_1_status and phone_1_number.

What you get

The count from Step 3, run through the free MCP tool leadocean_count_leads on 2026-10-21:

QueryMailable peopleEmployersWithout the email filter
jobLevel VP, jobFunction Advertising & Marketing, hqCountry US, employeeRange 201-5007,1034,03423,473
technologies HubSpot, jobFunction Advertising & Marketing, jobLevel Director77,63124,979185,208
seniority c_suite, hqCountry GB, employeeRange 11-5030,10919,500150,925

"Mailable" means verified, catch_all_valid or catch_all. That is the default for counts, not a promise that every address will land.

Response shape from the API reference (placeholder values):

json
{
  "success": true,
  "data": [
    {
      "profile_data": { "profile_full_name": "Jane Doe", "profile_headline": "VP Marketing at Acme" },
      "contact_data": { "has_email": true, "email_status": "verified" }
    }
  ],
  "meta": { "total": 7103, "nextCursor": "..." }
}

Troubleshooting

ErrorCauseFix
401Missing or wrong x-api-key headerCopy the key again from the app and check $LEADOCEAN_API_KEY is set
429More than the plan's rate limit (5 requests a second on Free, 200 on Agency)Honour Retry-After, or batch your calls
402The 1,000 free records are spentCheck GET /v1/account, then move to Solo or Agency
Empty resultsA bad enum value, such as VP Marketing in jobLevelLook the value up with /v1/enums or leadocean_list_enum_values
Odd total with a funding filterThe free count does not support fundingTypeCount without it, then add it at search time
Export refusedOver 50,000 rows a request or 500,000 a day, or Free planSplit the filters, or upgrade for bulk CSV

FAQ

What is a marketing database?

It is a store of people and company records you can filter into audiences for campaigns. With LeadOcean the database is already built: 693M people and 67M companies. You save the filters, not the rows.

How many records does a database like this cost?

Sizing costs none. A search page costs one record per person returned. A free account holds 1,000 records for life, and paid plans use a fair-use pace instead of credits.

Can I keep the lists fresh?

The dataset refreshes monthly, and each record carries its own fetched_at date. Re-run your saved filters on a schedule instead of storing old exports.

Do I need a CRM first?

No. The Exports page gives you a CSV with email status per row. Load that into whichever CRM or sequencer you already use.

For related reading, see technographic data prompts, enrichment tools compared by use case, what firmographic data is and pricing.

Size your first marketing database free

Free to start. No credit card. 1,000 records to spend whenever you like.

Get your free API key →