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

# Lookalike leads

> Extract the people who look like a given LinkedIn profile

Extract the people similar to a LinkedIn profile into a lead search. Run the [preview](https://docs.pipecorn.com/api-reference/endpoints/signals/lead_lookalikes_preview.md) first to see how many match for free.

Pipecorn builds the same Sales Navigator search as the preview, then saves it as an API lead search. It runs exactly like [`POST /leads/advanced_search`](https://docs.pipecorn.com/api-reference/endpoints/leads/advanced_search):

* Extraction uses your daily profile-extraction plan quota, not credits.
* Leads are enriched as they are extracted.

## Body

Takes the same keys as the preview (`linkedin_url`, `extended`, `included_locations`, `excluded_locations`), plus:

* `limit`: the number of leads to extract, up to 2,500. Defaults to every match, capped at 2,500.
* `webhook_url`: where the leads are POSTed as the search runs
* `name`: the name of the search

## Getting the results

The response returns the search `id` right away. Poll `status_url`, which is [`GET /searches/{id}`](https://docs.pipecorn.com/api-reference/endpoints/searches/show), until `status` is `finished`, or receive the leads on `webhook_url`. When no one matches, the request answers `200` with `total_count: 0` and creates no search.

## Example request

```json theme={null}
{
  "linkedin_url": "https://www.linkedin.com/in/jane-doe",
  "limit": 200,
  "webhook_url": "https://your-company.com/webhooks/lookalikes"
}
```

## Example response

```json theme={null}
{
  "message": {
    "id": "8e1dcba0-f0bb-4071-99fc-f18ba6559ccc",
    "search_name": "Lookalikes - API - 18/11/2026 15:02",
    "search_url": "https://www.linkedin.com/sales/search/people?query=(filters%3AList(...))",
    "expected_profiles_count": 840,
    "created_at": "2026-11-18T15:02:11Z"
  },
  "status_url": "https://app.pipecorn.com/api/v2/searches/8e1dcba0-f0bb-4071-99fc-f18ba6559ccc"
}
```

`expected_profiles_count` is the number of people matching before `limit`, capped at 2,500.


## OpenAPI

````yaml POST /intents/leads/lookalikes
openapi: 3.0.1
info:
  title: Pipecorn Signals API
  description: Pipecorn Accounts API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.pipecorn.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /intents/leads/lookalikes:
    post:
      summary: Extract lookalike leads
      description: >-
        Save the lookalike search for a LinkedIn profile as an API lead search
        and extract its leads, like POST /leads/advanced_search. Uses the daily
        profile-extraction plan quota, not credits. Requires a connected Sales
        Navigator account. Poll `status_url` (`GET /searches/{id}`) or receive
        the leads on `webhook_url`. Unknown keys return 422.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - linkedin_url
              properties:
                linkedin_url:
                  type: string
                  format: uri
                  description: LinkedIn profile of the person to find lookalikes of.
                  example: https://www.linkedin.com/in/jane-doe
                extended:
                  type: boolean
                  default: false
                  description: >-
                    Widen the search: drop the tenure filter and include the
                    neighbouring company sizes.
                included_locations:
                  type: array
                  items:
                    type: string
                  description: >-
                    Sales Navigator location IDs (numeric). Get them from POST
                    /locations with live results. An ID from another source
                    returns `422`.
                  example:
                    - '105015875'
                excluded_locations:
                  type: array
                  items:
                    type: string
                  description: Sales Navigator location IDs to exclude.
                  example:
                    - '105015875'
                limit:
                  type: integer
                  minimum: 1
                  maximum: 2500
                  description: Leads to extract. Defaults to every match, capped at 2,500.
                  example: 200
                webhook_url:
                  type: string
                  format: uri
                  description: Receives the leads as the search runs.
                  example: https://your-company.com/webhooks/lookalikes
                name:
                  type: string
                  description: Name of the search.
                  example: Lookalikes of Jane
      responses:
        '200':
          description: No one matches; no search was created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: No similar profiles found, so no search was created
        '201':
          description: Search created
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - status_url
                properties:
                  message:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: UUID of the search.
                      search_name:
                        type: string
                      search_url:
                        type: string
                        format: uri
                        description: Sales Navigator search built from the profile.
                      expected_profiles_count:
                        type: integer
                        description: People matching before `limit`, capped at 2,500.
                      created_at:
                        type: string
                        format: date-time
                  status_url:
                    type: string
                    format: uri
                    description: '`GET /searches/{id}`. Same value as the `Location` header.'
              example:
                message:
                  id: 8e1dcba0-f0bb-4071-99fc-f18ba6559ccc
                  search_name: Lookalikes - API - 18/11/2026 15:02
                  search_url: >-
                    https://www.linkedin.com/sales/search/people?query=(filters%3AList(...))
                  expected_profiles_count: 840
                  created_at: '2026-11-18T15:02:11Z'
                status_url: >-
                  https://app.pipecorn.com/api/v2/searches/8e1dcba0-f0bb-4071-99fc-f18ba6559ccc
          headers:
            Location:
              description: '`GET /searches/{id}`'
              schema:
                type: string
                format: uri
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
        '400':
          description: '`linkedin_url` is missing.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: linkedin_url is required
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: LinkedIn does not return this profile.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Profile not found on LinkedIn
        '422':
          description: >-
            Unprocessable entity: invalid `linkedin_url`, `extended`, locations,
            `limit` or `webhook_url`; no usable LinkedIn or Sales Navigator
            connection; or keys the endpoint does not accept.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_url:
                  summary: Not a profile URL
                  value:
                    error: >-
                      linkedin_url must be a LinkedIn profile URL (e.g.
                      https://www.linkedin.com/in/jane-doe)
                unknown_parameter:
                  summary: Unknown key in the body
                  value:
                    error: Unauthorized parameters detected
                    unauthorized_params:
                      - job_titles
                    permitted_params:
                      - linkedin_url
                      - extended
                      - included_locations
                      - excluded_locations
                      - limit
                      - webhook_url
                      - name
        '429':
          description: LinkedIn rate limited the connected account. Retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  headers:
    Idempotent-Replayed:
      description: >-
        `true` when this response is a replay of an earlier request sent with
        the same `Idempotency-Key`. Nothing was run or charged again.
      schema:
        type: string
        enum:
          - 'true'
  schemas:
    Error:
      required:
        - error
      type: object
      properties:
        error:
          description: >-
            Human-readable error message. A few validation errors return a list
            of messages instead of a single string.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        message:
          type: string
          description: >-
            Longer explanation, sent by validators that add context. Such errors
            may also carry extra top-level keys like `valid_values` or
            `example`.
        details:
          type: string
          description: >-
            Parser message, sent with `"Invalid JSON format in request body"`
            when the request body is not valid JSON.
        unauthorized_params:
          type: array
          items:
            type: string
          description: >-
            The request keys the endpoint does not accept, sent with
            `"Unauthorized parameters detected"`.
        permitted_params:
          type: array
          items:
            type: string
          description: >-
            Sent with `"Unauthorized parameters detected"`. The stack endpoints
            list every key they accept; hiring and growth list the accepted keys
            present in the request.
  securitySchemes:
    defaultApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````

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