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

How-to guide

How to Find Work Emails (in VS Code)

One server entry, one browser sign-in, then three prompts. Count for free, search, then reveal the address.

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

TL;DR

  • Setup takes about 10 minutes. The three prompts after it take about 2.
  • The run below spends 6 LeadOcean records: 3 people returned by search, 3 reveals. Counting spends 0.
  • Search never returns addresses. Only leadocean_get_lead with reveal_email does, so you pay for an address only when you ask for it.

Prerequisites

  • VS Code with chat set up. The VS Code MCP docs, October 2026, cover adding a server.
  • A LeadOcean account. Start free: no card, 1,000 records, one-off, work email required.
  • For Steps 5 and 6 only: an API key from your account, exported as $LEADOCEAN_API_KEY. The MCP steps need no key.

Step 1: Add the LeadOcean server

Open the Command Palette and run MCP: Add Server. Choose HTTP, paste https://api.leadocean.io/mcp and use leadocean as the server ID. Pick Global for a personal setup, or a workspace destination to share it with a team.

The older .vscode/mcp.json file still works. VS Code's docs, October 2026, keep it for compatibility and label it deprecated in the guided flow. The full setup is on the VS Code MCP page.

json
{
  "servers": {
    "leadocean": {
      "type": "http",
      "url": "https://api.leadocean.io/mcp"
    }
  }
}

Do not add a headers entry. The server uses OAuth 2.1, so there is no key to paste.

Step 2: Sign in and check the tools

VS Code shows a trust or sign-in prompt for the new server. Approve the sign-in in your browser and return to the editor.

Then check the tools. In a Copilot session, open Chat: Open Customizations > Tools. In a Local harness session, use Configure Tools in the chat input. You should see 13 leadocean_ tools. Seven of them are free.

Step 3: Count before you spend

Ask for a count first. Counting is free, however many times you run it.

text
Count VP-level sales leaders in Canada. Count only, do not pull anyone.
Use work emails with status verified. Tell me which filters you used.

The agent calls leadocean_count_leads. By default it counts people whose best email is verified or catch_all. Passing emailStatus replaces that default. Pass emailType: ["work"] to ask for the current employer's address. Resolve any enum string with leadocean_list_enum_values before you guess it.

Step 4: Search, then reveal the work email

Now pull a small sample. Search returns profiles and flags, never addresses.

text
Search 3 people: jobLevel VP, jobFunction "Sales & Business Development",
country CA, emailType work, emailStatus verified. Then call leadocean_get_lead
with reveal_email true for each person_id. Show email, email_status and
verified_batch_date in a table. Stop after 3 reveals.

leadocean_search_leads costs 1 record per person returned, so 3. Each leadocean_get_lead costs 1 record, with or without reveal_email. A person we hold nothing for costs nothing.

Check email_status before you send. A verified flag in search is an upper bound. The enriched answer is the correct one. The enriched record also carries career history when we hold it: past roles, education and certifications.

Step 5: Run the same lookup from the terminal

For scripts, call the REST API from the VS Code terminal. Take the person_id from a search row (meta.source_ids.person_id). The id below is a placeholder.

bash
curl -s "https://api.leadocean.io/v2/people/email/work?person_id=123456789" \
  -H "x-api-key: $LEADOCEAN_API_KEY"

This returns one current work address or data: null. Use it when you already hold a person_id or a LinkedIn URL and want only the address, not the full record. It costs 1 record per call, including a call that finds nothing. The MCP and REST API spend from one balance.

Step 6: Export the full list

Three people from chat is a test. For a list of 1,000, do not loop leadocean_get_lead in a prompt. Each loop turn is a model call, and an export writes the whole list to one CSV file. Use the Exports page in the app at app.leadocean.io, or POST /v1/exports with the filters you tested here.

bash
curl -s https://api.leadocean.io/v1/exports \
  -H "x-api-key: $LEADOCEAN_API_KEY" -H "content-type: application/json" \
  -d '{
    "name": "VP sales, Canada, verified work email",
    "filters": {
      "jobLevel": ["VP"],
      "jobFunction": ["Sales & Business Development"],
      "country": ["CA"],
      "emailType": ["work"],
      "emailStatus": ["verified"]
    },
    "limit": 1000
  }'

Exports take up to 50,000 rows a request and 500,000 a day. Bulk CSV export is not on Free. It is included on Solo at $97 a month and on Agency at $497 a month. The reply shows perRow and remaining, the price of the job before it runs.

What you get

Step 3 is a count. On 2026-10-21 the Step 3 filters (VP, Sales & Business Development, Canada, emailType work, emailStatus verified) returned 1,602 people at 1,209 companies from leadocean_count_leads. It cost 0 records.

That is people whose best email is a verified work address, and it is an upper bound until each address is enriched. Without the two email filters, the default count is 5,574 people with a verified, catch_all_valid or catch_all email. With no email condition at all, the same filters match 18,800 people.

Step 4 returns one row per person in this shape. This is the response shape from the API reference, with placeholder values:

json
{
  "success": true,
  "data": {
    "contact_data": {
      "contact_emails": [
        {
          "email": "jane.doe@acme.com",
          "type": "work",
          "status": "verified",
          "verified_batch_date": "2026-09-20",
          "priority": 1,
          "score": 0.0
        }
      ],
      "has_email": true,
      "email_status": "verified",
      "email_type": "work"
    }
  }
}

verified_batch_date is the date our own verifier tested the address. A null there means the check was not ours. It does not mean the address is unverified.

Total cost of the run: 3 returned by search plus 3 reveals is 6 records. On the free plan that leaves 994 of 1,000.

The status tells you what to do with each address. Use this table on every reveal.

email_statusWhat it meansAction
verifiedOur verifier sent to the address and it accepted.Safe to send.
catch_all_validA catch-all domain where we confirmed the mailbox exists.Safe to send.
catch_allThe domain accepts everything, so we cannot confirm the mailbox.Send with care. It can bounce.
risky, role, derivedA guess, a shared mailbox such as info@, or an untested pattern.Hold back or verify first.
invalid, spam_trap, abuse, disposableUndeliverable or harmful.Do not send.

Ask for emailType: ["work"] on purpose. work_other is a business address at a different company, usually a former employer. It is the one most likely to bounce.

Troubleshooting

ErrorCauseFix
401Missing or wrong x-api-key on a REST call (Step 5).Check $LEADOCEAN_API_KEY in the terminal. MCP sign-in uses OAuth, not a key.
402Your 1,000 free records are spent. The free plan is one-off.Check leadocean_get_account. Move to Solo at $97 a month.
429Above your plan's rate limit (5 a second on Free, 50 on Solo, 200 on Agency), a fair-use window, or the daily export ceiling.Honour Retry-After and retry. Ask the agent to work in small batches.
Empty resultsA filter value is not in the catalogue, such as an invented job function.Call leadocean_list_enum_values and pass the exact string, for example Sales & Business Development.
data: null from the work endpointNo current-employer address is verified, catch_all_valid or catch_all.It does not mean the person has no email. Widen with the personal endpoint only if you accept that risk.
Tools missing in chatThe server is stopped, untrusted or not signed in.Start the server, accept the trust and sign-in prompts, then reopen the tools list.

FAQ

Do I need an API key to find work emails in VS Code?

No. The MCP server signs you in with OAuth. You need $LEADOCEAN_API_KEY only for REST calls like Step 5.

Why does search not return the email?

Search returns thin profiles and flags: has_email, email_status and email_type. Addresses come only from leadocean_get_lead with reveal_email, so you pay for an address only when you ask for it.

What does it cost to run this at scale?

The free plan holds 1,000 records, one-off. Solo is $97 a month for one person, and Agency is $497 a month for teams. Paid plans have a fair-use pace instead of credits, with no per-record price. See pricing.

Can I send to every address I find?

Not blindly. Send to verified. catch_all domains accept everything, so those can still bounce. There is no refund for bounces, so read email_status first. See find work emails in Claude Code and the Find Work Email skill for the same flow elsewhere, or the find work email enrichment for a bulk route.

Find your first verified work email from VS Code

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

Get your free API key →