# La Growth Machine Lead Finder & Enrichment (`sameh.jarour/lgm-lead-enrichment`) Actor

Find people matching your ideal customer profile, enrich them with verified professional emails via the La Growth Machine API, and populate an LGM audience ready for outreach. Also enriches lead lists, existing LGM audiences, or any other Actor’s dataset.

- **URL**: https://apify.com/sameh.jarour/lgm-lead-enrichment.md
- **Developed by:** [Sameh George Jarour](https://apify.com/sameh.jarour) (community)
- **Categories:** Automation, Lead generation, Integrations
- **Stats:** 2 total users, 1 monthly users, 67.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Find the people who match your ideal customer profile, enrich them with verified professional emails through the **La Growth Machine API**, and drop them straight into an **LGM audience** — ready for your outreach campaigns. Bring your own LGM API key; everything runs in your own account.

### What does La Growth Machine Lead Finder & Enrichment do?

This Actor is a **lead generation and email enrichment pipeline** for [La Growth Machine](https://lagrowthmachine.com) users. You describe who you want to reach — job title, seniority, department, location — and the Actor does the rest:

🔎 **Finds people** matching your ICP on LinkedIn, with no LinkedIn login or cookie required — or scores a list of company websites and takes contacts only from the ones that qualify

✉️ **Enriches them** through the official La Growth Machine API — professional email, personal email, phone number, and LGM's own deliverability verdict

📥 **Populates your LGM audience** — creates it if it doesn't exist, then writes every lead into it so your campaigns can pick them up

📊 **Returns a clean dataset** with the outcome and reason for every single lead

It is not a LinkedIn scraper you have to babysit, and it is not a generic email guesser. It is a **La Growth Machine API alternative to manual prospecting**: the sourcing, the enrichment and the audience-building happen in one run.

### Why use this Actor instead of prospecting by hand?

Building a campaign audience normally means three disconnected tools: something to find people, something to find their emails, and a CSV you import by hand. Each hand-off loses data and costs a morning.

- **One run, one audience.** ICP in, populated LGM audience out.
- **It protects your LGM credits.** Enrichment costs real money per lead, so the Actor checks your balance first, skips leads that already have an email, drops profiles too thin to match, and refuses to start a run that would blow a cap you set.
- **Every miss is explained.** No silent gaps — each row says whether it was enriched, not found, skipped, or failed, and why.
- **Chains onto anything.** Point it at any other Actor's dataset and common column names map automatically.
- **Runs on the Apify platform**, so you get scheduling, a REST API, webhooks, monitoring, and integrations with Make, Zapier, n8n and Google Sheets for free.
- **Real-time mode.** It also runs as an HTTP service for enriching a single lead on demand from your own app.

#### Who is it for?

SDRs and growth marketers who already run outbound in La Growth Machine and want to stop hand-building audiences. You need an LGM account and an API key. You do not need to write any code.

### What data can this Actor extract?

| Field                   | Type    | Description                                                                                                              |
| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
| `firstname`, `lastname` | string  | The person's name                                                                                                        |
| `companyName`           | string  | Their current company                                                                                                    |
| `companyUrl`            | string  | Company website, when known                                                                                              |
| `linkedinUrl`           | string  | LinkedIn profile URL                                                                                                     |
| `proEmail`              | string  | **Professional email** found by La Growth Machine                                                                        |
| `emailStatus`           | string  | LGM's deliverability verdict, when it returns one. Often absent — check `proEmail` itself                                |
| `persoEmail`            | string  | Personal email, when LGM finds one                                                                                       |
| `phone`                 | string  | Phone number, when LGM finds one                                                                                         |
| `enrichStatus`          | string  | What enrichment did: `enriched`, `not_found`, `pending`, `not_enriched`, `enrichment_unavailable`, `skipped` or `failed` |
| `enrichMessage`         | string  | Why a lead was not enriched                                                                                              |
| `lgmSyncStatus`         | string  | Whether the lead reached your LGM audience: `synced`, `sync_failed`, `sync_disabled` or `not_synced`                     |
| `lgmSyncMessage`        | string  | Why a lead was not synced                                                                                                |
| `creditsUsed`           | number  | LGM credits this row consumed                                                                                            |
| `writtenBackToLgm`      | boolean | Convenience flag, `true` when `lgmSyncStatus` is `synced`                                                                |
| `enrichRequestId`       | string  | LGM's request id, to cross-reference your LGM API logs                                                                   |
| `source`                | object  | The original source row, untouched                                                                                       |

### How to find and enrich leads for La Growth Machine

1. **Get your API key** from [app.lagrowthmachine.com/settings/api](https://app.lagrowthmachine.com/settings/api) (you must be logged in).
2. **Paste it** into the *La Growth Machine API key* field. It is stored encrypted.
3. **Describe your ICP** — job title, location, seniority levels, job functions, or free-text keywords.
4. **Name the audience** you want populated in the *LGM audience to populate* field. It is created if it doesn't exist.
5. **Set a safety cap** — start with `maxLeads` of 10 for a cheap first run.
6. **Click Start** and watch the log. When it finishes, open the **Output** tab, or check the audience in your LGM account.

#### Example input

```json
{
    "lgmApiKey": "<your LGM API key>",
    "leadSource": "icpSearch",
    "targetAudience": "Q3 - Heads of Growth, France",
    "icpJobTitle": ["Head of Growth", "VP Marketing"],
    "icpLocation": "France",
    "icpSeniorityLevels": ["Director", "VP", "CXO"],
    "icpJobFunctions": ["Marketing", "Sales"],
    "maxProfilesToDiscover": 50,
    "enrichType": "EMAIL_ENRICH",
    "maxCreditsToSpend": 250
}
```

See the **Input** tab for every option with inline documentation.

### How much does it cost to find and enrich leads?

Two separate meters run, and it is important to understand both.

#### Apify platform cost

You pay for compute time, plus the LinkedIn people-search Actor when you use ICP search (roughly **$0.004 per profile discovered**, plus a small start fee). A 50-lead discovery run typically lands around **$0.25**. Apify's free tier covers a lot of experimentation.

#### La Growth Machine credits

Enrichment is billed by **LGM**, against your own account, not by Apify:

| `enrichType`               | What you get                        | LGM credits    | Works on brand-new people?    |
| -------------------------- | ----------------------------------- | -------------- | ----------------------------- |
| `EMAIL_ENRICH` *(default)* | Professional email + deliverability | **5** per lead | ✅ Yes                        |
| `NONE`                     | Sourcing and audience-building only | **0**          | ✅ Yes                        |
| `LINKEDIN_ENRICH`          | Refreshed LinkedIn profile fields   | **1** per lead | ❌ Needs an existing LGM lead |
| `FULL_ENRICH`              | LinkedIn profile + email            | **5** per lead | ❌ Needs an existing LGM lead |

**LGM charges credits whether or not a match is found**, so the Actor works hard not to waste them:

- ⛔ **Balance check first** — a run that cannot be paid for stops before spending anything on discovery.
- 🧢 **`maxCreditsToSpend`** refuses to start a run whose worst case exceeds your cap.
- ⏭️ **`skipAlreadyEnriched`** (on by default) passes through leads that already have a professional email, for free.
- 🎯 **`requireCompany`** (on by default) drops discovered profiles with no company, because LGM matches on name + company and those attempts rarely land.
- 🔢 **`maxLeads`** caps any run for a cheap trial.

#### Want to build audiences for free?

Set `enrichType` to `NONE`. The Actor finds people matching your ICP and writes them into your LGM audience **without spending a single LGM credit**. Useful for building audiences you'll enrich later, or if your plan doesn't include the enrichment API.

### Where can the leads come from?

ICP search is the default, but you can feed the Actor leads you already have.

| `leadSource`            | Use it when                                                                          | Requires                                                                                                                    |
| ----------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `icpSearch` *(default)* | You want new people matching a profile                                               | At least one ICP field (`icpJobTitle`, `icpLocation`, `icpSeniorityLevels`, `icpJobFunctions`, `icpCompany`, `icpKeywords`) |
| `leadScorer`            | You have company websites and want only the ones that fit, with contacts             | `scorerCompanyUrls`                                                                                                         |
| `lgmLinkedinImport`     | You have a LinkedIn or Sales Navigator search URL and want LGM to import it natively | `linkedinSearchUrl`, `lgmIdentityId`, `targetAudience`                                                                      |
| `leadList`              | You have a list to paste                                                             | `leads`                                                                                                                     |
| `lgmAudience`           | You want to fill email gaps in an audience you already have                          | `audienceId`                                                                                                                |

#### How to score companies first, then enrich only the good ones

Set `leadSource` to `leadScorer`. The Actor runs [Lead Scorer & Enricher](https://apify.com/advantageous_subcontra/lead-scorer-and-enricher) as a child job: it scores each company website against your rules, discovers department contacts at the ones that qualify, and hands those contacts straight into LGM enrichment. One run, no copying data between tools.

```json
{
    "leadSource": "leadScorer",
    "targetAudience": "Q3 - SaaS marketing leads",
    "leadScorer": {
        "companyUrls": ["https://acme.com", "https://globex.com"],
        "techScoringRules": [{ "tech": "Shopify", "weight": 10 }],
        "contentScoringRules": [{ "question": "Does the homepage describe a SaaS or platform business?", "weight": 8 }],
        "qualificationThreshold": 8,
        "targetDepartments": ["marketing", "sales"],
        "maxLeadsPerCompany": 3
    },
    "maxScorerSpendUsd": 10
}
```

Only companies scoring at or above `qualificationThreshold` reach contact discovery, and only their contacts reach LGM — so weak accounts cost you neither Apify credit nor LGM credits. Leave `techScoringRules` and `contentScoringRules` empty to skip the paid tech-detection and homepage-crawl steps entirely; every company then qualifies on the threshold alone.

`maxScorerSpendUsd` caps what the scorer may spend on Apify. It is **separate** from `maxCreditsToSpend`, which caps La Growth Machine enrichment — the two budgets are independent.

### You always get your leads

**La Growth Machine being unavailable never costs you the run.** If your credits run out, your plan doesn't cover the enrichment API, or a sync call is rejected, the Actor keeps going and still hands you every lead it found. What happened is recorded per row in two independent columns rather than swallowed in a failure.

`enrichStatus` — what enrichment managed to do:

| Value                    | Meaning                                                                      | Credits |
| ------------------------ | ---------------------------------------------------------------------------- | ------- |
| `enriched`               | LGM returned contact details                                                 | 5       |
| `not_found`              | LGM ran the lookup and found nothing                                         | 5       |
| `pending`                | LGM accepted it but had not finished when the run ended — may still complete | 5       |
| `not_enriched`           | You set `enrichType` to `NONE`                                               | 0       |
| `enrichment_unavailable` | LGM refused: no credits, or the plan doesn't include the enrichment API      | 0       |
| `skipped`                | Not attempted — already had an email, or too little data                     | 0       |
| `failed`                 | The request errored for that one lead                                        | 0       |

`lgmSyncStatus` — whether the lead reached your audience:

| Value           | Meaning                                                         |
| --------------- | --------------------------------------------------------------- |
| `synced`        | Written into your LGM audience                                  |
| `sync_failed`   | LGM rejected the write. `lgmSyncMessage` says why — retry these |
| `sync_disabled` | Write-back was off for this run                                 |
| `not_synced`    | Nothing worth writing, e.g. the lead itself failed              |

The two are deliberately separate. **A lead can land in your audience even when enrichment was unavailable**, and enrichment can succeed while the sync fails. Filter on either column independently.

Only two things actually fail a run: an input you need to fix, or an LGM key that can't be authenticated *when the leads themselves have to come from LGM*. Everything else degrades and still delivers.

### Output example

You can download the dataset in JSON, CSV, Excel, HTML, or XML from the **Output** tab, or pull it through the Apify API.

```json
[
    {
        "firstname": "Jean",
        "lastname": "Dupont",
        "companyName": "Acme Corp",
        "companyUrl": "https://acme.com",
        "linkedinUrl": "https://www.linkedin.com/in/jeandupont",
        "proEmail": "jean.dupont@acme.com",
        "emailStatus": "VALID",
        "persoEmail": null,
        "phone": "+33612345678",
        "enrichStatus": "enriched",
        "enrichMessage": null,
        "lgmSyncStatus": "synced",
        "lgmSyncMessage": null,
        "creditsUsed": 5,
        "writtenBackToLgm": true
    },
    {
        "firstname": "Marie",
        "lastname": "Martin",
        "companyName": "TechStart",
        "proEmail": null,
        "emailStatus": null,
        "enrichStatus": "not_found",
        "enrichMessage": "LGM completed the request but found no contact details for this lead.",
        "lgmSyncStatus": "synced",
        "lgmSyncMessage": null,
        "creditsUsed": 5,
        "writtenBackToLgm": true
    },
    {
        "firstname": "Paul",
        "lastname": "Bernard",
        "companyName": "Globex",
        "proEmail": null,
        "enrichStatus": "enrichment_unavailable",
        "enrichMessage": "La Growth Machine refused the enrichment: \"Please upgrade to enrich leads.\" ...",
        "lgmSyncStatus": "synced",
        "lgmSyncMessage": null,
        "creditsUsed": 0,
        "writtenBackToLgm": true
    }
]
```

The Output tab has five views: **Enriched leads** (everything), **Contactable only** (rows with a professional email), **Synced to LGM**, **Not synced to LGM** (with the reason, so you know what to retry), and **Enrichment problems**. Open the last two first whenever results look thin — they give the reason per row.

A `SUMMARY` record in the key-value store reports the two halves separately: an `enrichment` block (counts per status, hit rate, `lgmCreditsBilled` measured from your real balance before and after the run, the `lgmCreditsEstimated` upper bound, plus `available` and `unavailableReason` when enrichment was skipped) and an `lgmSync` block (synced, failed, not synced, and the target audience).

`lgmCreditsBilled` is measured as the difference between your LGM balance at the start and end of the run, because LGM does not report per-request billing. That makes it accurate for a single run, but not when several runs share one API key at the same time — concurrent runs each see the others' spend and over-report. Use `lgmCreditsEstimated` (list price x billable leads) as the per-run upper bound in that case.

### Real-time enrichment API

The Actor also runs in [Standby mode](https://docs.apify.com/platform/actors/development/programming-interface/standby) as an always-on HTTP service, for enriching one lead at a time from your own application:

```bash
curl -X POST "https://<username>--lgm-lead-enrichment.apify.actor/enrich" \
  -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"lead": {"firstname": "Jean", "lastname": "Dupont", "companyName": "Acme"}}'
```

`GET /credits` returns your current LGM balance. Full endpoint documentation renders in the **Standby** tab.

### Tips for better results

- **Target several job titles at once.** `icpJobTitle` takes a list — `["Head of Growth", "VP Marketing", "Demand Generation Manager"]`. Each title is searched separately and the results are merged and de-duplicated, which is the reliable way to cover a buyer persona whose title varies by company. Each title is its own search on Apify, and `maxProfilesToDiscover` is split across them, so the profile budget stays fixed as you add titles.
- **Give LGM a company.** Email enrichment matches on name + company. Leads with only a name rarely resolve, and the attempt still costs 5 credits.
- **Location is a keyword, not a geo filter.** Cookie-free search can return people outside your target location — or people whose surname simply matches it. Turn on `strictLocationMatch` to drop them, or set `linkedinCookie` for exact LinkedIn facets.
- **Most lookups are instant, a minority are not.** La Growth Machine answers most enrichments on the first API call, but some take minutes. Those come back as `pending` rather than failed, never as a loss. When the lead already exists in LGM, **LGM applies the result to the lead itself** once it finishes — so re-read the audience shortly after and the emails will be there. For leads not yet in LGM, their request ids are saved to the `PENDING_ENRICHMENTS` record so you can collect the result without paying again. Either way, `pending` in the dataset understates the final hit rate.
- **Trial before you scale.** Run with `maxLeads: 10` and check the hit rate in `SUMMARY` before committing hundreds of credits.
- **Schedule it.** Point it at a saved ICP and run it weekly to keep an audience topped up.

### FAQ

#### Do I need a paid La Growth Machine plan?

You need an LGM account with API access for anything, and **enrichment credits** for `EMAIL_ENRICH`, `LINKEDIN_ENRICH` and `FULL_ENRICH`. If LGM answers `403 "Please upgrade to enrich leads."`, your plan or credit balance doesn't cover the enrichment API.

**The run still completes.** The Actor switches to sourcing-only for the rest of the run, delivers every lead, syncs them to your audience, and marks each row `enrichment_unavailable` with the reason. Top up your credits and re-run to fill in the emails — or set `enrichType: "NONE"` to skip the attempt entirely.

#### Do I need a LinkedIn account or cookie?

No. ICP search runs cookie-free by default. Supplying a `linkedinCookie` is optional and only unlocks LinkedIn's exact geo, company and school filters.

#### Why did some leads come back without an email?

Check `enrichStatus`. LGM ran the lookup and found nothing (`not_found` — credits charged), the lead had too little identifying data to try (`skipped` — no credits), LGM refused enrichment for the whole account (`enrichment_unavailable` — no credits), or it is still working on it (`pending`). `enrichMessage` gives the specifics for each row.

#### Some leads say `sync_failed`. What now?

They're still in your dataset — nothing is lost. Open the **Not synced to LGM** view, read `lgmSyncMessage` for the cause, and re-run against those rows once it's resolved.

#### Can I run this on a schedule or from my own code?

Yes. Use the **Schedules** tab for recurring runs, or the **API** tab for the REST endpoints and ready-made code samples. It also works with Make, Zapier, n8n, and webhooks.

#### Where do I debug a failed enrichment?

Every LGM API call you make is logged at [app.lagrowthmachine.com/settings/api](https://app.lagrowthmachine.com/settings/api) with its status and result. The `enrichRequestId` in the output cross-references those logs directly.

#### Why is it slower than I expected?

LGM allows 50 API calls per 10 seconds per key, and the Actor deliberately stays under that so it never trips a rate limit. Raising `concurrency` will not push it past LGM's ceiling.

### Your feedback

Found a bug, or want a source or field that isn't there? Open a ticket in the **Issues** tab — feature requests are welcome.

### Legal and privacy disclaimer

This Actor only processes data that people have chosen to share publicly, together with data already inside your own La Growth Machine account. It does not access private LinkedIn data and does not require your LinkedIn credentials.

Your results will contain **personal data**. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not collect or process personal data unless you have a legitimate reason to do so, and you are responsible for how you use the output — including compliance with applicable law and with La Growth Machine's own terms. If you're unsure whether your reason is legitimate, consult your lawyers.

# Actor input Schema

## `lgmApiKey` (type: `string`):

Your LGM API key, from https://app.lagrowthmachine.com/settings/api. Stored encrypted. Can also be supplied as the LGM\_API\_KEY environment variable.

## `leadSource` (type: `string`):

Pick how this run should get its leads. Each choice has a matching section below — fill in that one and ignore the rest.

## `targetAudience` (type: `string`):

Name of the La Growth Machine audience that the enriched leads should land in. Created automatically if it does not exist. Leave empty to only produce a dataset without touching your LGM account.

## `icpJobTitle` (type: `array`):

The roles you are targeting, one per line, e.g. "Head of Growth", "VP Marketing", "Demand Generation Manager". Each title is searched separately and the results are merged and de-duplicated, so adding titles widens your reach. Note that each title costs its own search on Apify, and the profile budget is split across them.

## `icpLocation` (type: `string`):

Where they are based, e.g. "France" or "London". Cookie-free search treats this as a keyword rather than a geo filter — turn on "Enforce the ICP location" below to drop off-target people.

## `icpSeniorityLevels` (type: `array`):

Keep only people at these seniority levels. Leave empty for any seniority.

## `icpJobFunctions` (type: `array`):

Keep only people working in these departments. Leave empty for any function.

## `icpCompany` (type: `string`):

Optional. Company-name keyword, to prospect inside one specific account.

## `icpKeywords` (type: `string`):

Optional. Free-text search across role, skills and headline, e.g. "outbound SaaS".

## `maxProfilesToDiscover` (type: `integer`):

How many people the ICP search looks for. Search wide here: partial LinkedIn profiles and the 'only keep people with a company' filter both drop rows afterwards, so a narrow search often ends with nothing. Each discovered profile costs a small amount of Apify credit; only the ones that survive and get enriched cost LGM credits. With several job titles this budget is split across them.

## `requireCompany` (type: `boolean`):

Recommended. La Growth Machine matches emails on name + company, and every attempt costs credits whether or not it finds anything, so profiles with no company are dropped before enrichment. Ignored when 'What to enrich' is 'No enrichment', since there are no credits to protect there.

## `strictLocationMatch` (type: `boolean`):

Cookie-free search treats location as a keyword, so it can return people outside it (and even people whose surname matches). Turn this on to drop profiles whose location does not contain your ICP location.

## `linkedinCookie` (type: `string`):

Optional. Without it the search runs cookie-free, which is why no LinkedIn login is needed. Supplying your li\_at cookie unlocks LinkedIn's exact geo, company and school filters. Stored encrypted.

## `scorerCompanyUrls` (type: `array`):

The company websites to evaluate, one per line. Full URLs or bare domains both work.

## `scorerDepartments` (type: `array`):

Which teams to hunt for contacts in at the companies that qualify.

## `scorerMaxLeadsPerCompany` (type: `integer`):

Upper bound on contacts discovered at each qualifying company. This multiplies cost — 3 companies x 5 contacts is up to 15 billed leads.

## `scorerTechRules` (type: `array`):

Add points when a company's site uses a given technology. Leave empty to skip tech detection entirely, which is the paid BuiltWith step.

## `scorerContentRules` (type: `array`):

Yes/no questions an LLM answers against each homepage. Points are added when the answer is yes. Leave empty to skip the homepage crawl and the LLM, both paid steps.

## `scorerQualificationThreshold` (type: `integer`):

Companies scoring at or above this get their contacts found and enriched. The rest are dropped. Leave at 0 to accept every company.

## `scorerUseEmailFallback` (type: `boolean`):

Look up an email for any contact found with a name but no address. Small extra cost per resolved email.

## `maxScorerSpendUsd` (type: `integer`):

Hard cap on what the lead scorer may spend on Apify for tech detection, homepage crawling, the LLM, and contact discovery. 0 or empty = uncapped. Separate from 'Max LGM credits to spend', which caps La Growth Machine enrichment.

## `linkedinSearchUrl` (type: `string`):

Used with 'Import a LinkedIn search into LGM'. A LinkedIn people-search URL, a Sales Navigator search URL, or a LinkedIn post URL to pull engagers from.

## `lgmIdentityId` (type: `string`):

Which of your connected LinkedIn identities LGM should run the search as. Required for the LinkedIn import. The identity must have LinkedIn connected with the LGM widget open, otherwise LGM answers 404.

## `linkedinPostCategory` (type: `string`):

Only for a LinkedIn post URL: import the people who liked it, or those who commented.

## `autoImport` (type: `boolean`):

Ask LGM to keep importing new people who match the search as they appear.

## `linkedinImportWaitSecs` (type: `integer`):

LGM runs the LinkedIn search asynchronously inside your identity's session, so the audience starts empty. The run waits this long for leads to land before enriching them, and stops early once the count stops growing. 0 = do not wait (the audience is still created and the search still runs in LGM).

## `excludeContactedLeads` (type: `boolean`):

Skip people your LGM campaigns have already reached out to.

## `leads` (type: `array`):

The people to enrich. Each needs a first and last name plus a company name, company website, or LinkedIn URL — or an existing LGM lead ID on its own.

## `audienceId` (type: `string`):

Used when 'Where the leads come from' is 'LGM audience'. The 24-character audience id, visible in the LGM app URL or via the List Audiences endpoint.

## `enrichType` (type: `string`):

Email finds a professional email (5 LGM credits, works for people not yet in LGM). No enrichment sources the leads and puts them in your audience without spending any LGM credits — useful for building audiences, or when your plan does not include the enrichment API. LinkedIn refreshes LinkedIn profile fields (1 credit) and Full does both (5 credits); those two only work on leads that already exist in LGM.

## `skipAlreadyEnriched` (type: `boolean`):

Recommended. Rows that already carry a professional email are passed through untouched instead of spending credits to re-find it.

## `maxLeads` (type: `integer`):

Hard cap on how many leads are enriched and delivered. 0 or empty = no cap. This trims the results after the search; it does not shrink the search itself — use 'Max profiles to discover' for that.

## `maxCreditsToSpend` (type: `integer`):

Safety cap. The run refuses to start if its worst-case credit cost exceeds this. 0 or empty = no cap.

## `writeBackToLgm` (type: `boolean`):

Push every enriched email and phone number onto the lead in LGM. Defaults to on whenever an audience is named above, so your campaigns pick the leads up.

## `enrichMode` (type: `string`):

La Growth Machine answers most lookups immediately, but some take minutes. 'Polling' uses the immediate answer when there is one and checks back otherwise — the right default. 'Sync' only ever takes the first answer, so slow lookups come back empty. Leads still being worked on when the run ends are marked 'pending', not failed, and their request ids are saved so you can collect them without paying again.

## `concurrency` (type: `integer`):

How many leads to enrich in parallel. The Actor rate-limits itself to stay inside LGM's 50-calls-per-10-seconds budget regardless of this value.

## `pollIntervalSecs` (type: `integer`):

How often to check a pending enrichment in polling mode.

## `pollTimeoutSecs` (type: `integer`):

How long to wait for one slow lead before marking it 'pending'. LGM does finish most lookups instantly, but a minority stay pending for many minutes. Raising this makes runs slower; pending leads keep their request id either way, so nothing is lost.

## `maxCallsPerWindow` (type: `integer`):

Self-imposed rate limit. LGM rejects anything above 50 per 10 seconds per key; leave headroom if other tools share this key.

## Actor input object example

```json
{
  "leadSource": "icpSearch",
  "targetAudience": "Apify - enriched leads",
  "icpJobTitle": [
    "Head of Growth",
    "VP Marketing"
  ],
  "icpLocation": "France",
  "icpSeniorityLevels": [
    "Director",
    "VP",
    "CXO"
  ],
  "icpJobFunctions": [
    "Marketing",
    "Sales"
  ],
  "maxProfilesToDiscover": 50,
  "requireCompany": true,
  "strictLocationMatch": false,
  "scorerDepartments": [
    "marketing",
    "sales"
  ],
  "scorerMaxLeadsPerCompany": 3,
  "scorerQualificationThreshold": 0,
  "scorerUseEmailFallback": false,
  "maxScorerSpendUsd": 0,
  "autoImport": false,
  "linkedinImportWaitSecs": 300,
  "excludeContactedLeads": false,
  "enrichType": "EMAIL_ENRICH",
  "skipAlreadyEnriched": true,
  "maxLeads": 0,
  "maxCreditsToSpend": 0,
  "writeBackToLgm": true,
  "enrichMode": "polling",
  "concurrency": 5,
  "pollIntervalSecs": 5,
  "pollTimeoutSecs": 180,
  "maxCallsPerWindow": 40
}
```

# Actor output Schema

## `enrichedLeads` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "targetAudience": "Apify - enriched leads",
    "icpJobTitle": [
        "Head of Growth",
        "VP Marketing"
    ],
    "icpLocation": "France",
    "icpSeniorityLevels": [
        "Director",
        "VP",
        "CXO"
    ],
    "icpJobFunctions": [
        "Marketing",
        "Sales"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sameh.jarour/lgm-lead-enrichment").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "targetAudience": "Apify - enriched leads",
    "icpJobTitle": [
        "Head of Growth",
        "VP Marketing",
    ],
    "icpLocation": "France",
    "icpSeniorityLevels": [
        "Director",
        "VP",
        "CXO",
    ],
    "icpJobFunctions": [
        "Marketing",
        "Sales",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("sameh.jarour/lgm-lead-enrichment").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "targetAudience": "Apify - enriched leads",
  "icpJobTitle": [
    "Head of Growth",
    "VP Marketing"
  ],
  "icpLocation": "France",
  "icpSeniorityLevels": [
    "Director",
    "VP",
    "CXO"
  ],
  "icpJobFunctions": [
    "Marketing",
    "Sales"
  ]
}' |
apify call sameh.jarour/lgm-lead-enrichment --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sameh.jarour/lgm-lead-enrichment"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/eJBvWbs94uqfLcbJ5/builds/5XjMJa3P5ICi8JtMX/openapi.json
