> ## Documentation Index
> Fetch the complete documentation index at: https://developer.salesforge.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Turn lookalike companies into leads

> Find companies similar to your best customers with Leadsforge API, then search for people at those companies.

Start from companies you already know work well, such as your best customers, and find more companies like them. Then find the right people at those companies and enrich them.

* **Service:** Leadsforge API
* **Base URL:** `https://api.leadsforge.ai/public/v1`
* **Cost:** the preview and the people search are free up to a monthly allowance, then each request costs credits; the lookalike search charges your lookalike price for each company returned; enrichment is charged per value found. See [Credits](https://developer.salesforge.ai/leadsforge-api/concepts/credits.md).

All examples send your API key in the `Authorization` header and read it from `$LEADSFORGE_API_KEY`.

**1. Preview lookalikes**

Send 1 to 10 company domains, without scheme or path. The preview returns company metadata only and is free up to a monthly allowance, so use it to tune your filters before a paid search.

```bash theme={null}
curl -sS https://api.leadsforge.ai/public/v1/lookalikes/preview \
  -H "Authorization: $LEADSFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": ["salesforge.ai"],
    "employeeRanges": ["11-50", "51-200"],
    "locations": [{"type": "country", "id": "US"}]
  }'
```

Filter values come from free endpoints: `GET /lookalikes/filters/employee-ranges`, `GET /lookalikes/filters/locations` and `GET /lookalikes/filters/funding-stages`.

**2. Search lookalikes page by page**

The search uses the same filters plus `page` (from 1) and `pageSize` (1 to 100). It reserves your lookalike price for a full page and charges only for the companies returned.

```bash theme={null}
curl -sS https://api.leadsforge.ai/public/v1/lookalikes/search \
  -H "Authorization: $LEADSFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: lookalikes-salesforge-page-1" \
  -d '{
    "domains": ["salesforge.ai"],
    "employeeRanges": ["11-50", "51-200"],
    "locations": [{"type": "country", "id": "US"}],
    "page": 1,
    "pageSize": 25
  }'
```

```json theme={null}
{
  "companies": [
    {
      "name": "Mailforge",
      "domain": "mailforge.ai",
      "website": "https://mailforge.ai",
      "industry": "Software Development",
      "keywords": ["sales engagement", "cold email"]
    }
  ],
  "totalCount": 340,
  "page": 1,
  "totalPages": 14
}
```

The `Idempotency-Key` is remembered for 10 minutes: a retry with the same key returns the same page without charging again. Use a new key for each page.

**3. Find people at those companies**

Pass the returned domains to `POST /search` in `companyDomains.include`, together with the people filters you need.

```bash theme={null}
curl -sS https://api.leadsforge.ai/public/v1/search \
  -H "Authorization: $LEADSFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "limit": 100,
    "companyDomains": {"include": ["mailforge.ai"]},
    "leadSeniorities": {"include": ["head", "vp"]},
    "leadDepartments": {"include": ["sales"]},
    "maxContactsPerCompany": 3
  }'
```

Seniority and department values come from `GET /search/filters/seniorities` and `GET /search/filters/departments`. `maxContactsPerCompany` keeps a few people per company instead of everyone.

**4. Enrich the people**

Send the person IDs from the search (each lead's `id`) to an enrichment job, exactly as in [Find emails for search results](https://developer.salesforge.ai/products/leadsforge/find-emails-for-search-results.md).

## Related resources

* [Search and enrichment](https://developer.salesforge.ai/leadsforge-api/concepts/search-and-enrichment.md)
* [Credits](https://developer.salesforge.ai/leadsforge-api/concepts/credits.md)
* [Find emails for search results](https://developer.salesforge.ai/products/leadsforge/find-emails-for-search-results.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.