> ## 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 (preview)

> Preview the people who look like a given LinkedIn profile

Find people similar to a LinkedIn profile, such as your best customer or your ideal buyer, before extracting any of them. Pipecorn reads the profile and builds a Sales Navigator people search:

* job titles similar to the profile's current title
* the same industry and company size as their current company
* the same tenure in role

This is the same search as **Signals → Similar people** in the app. It is the free first step:

1. **Preview** (this endpoint) returns the number of matching people, the Sales Navigator search URL and up to 25 sample leads.
2. **[Extract](https://docs.pipecorn.com/api-reference/endpoints/signals/lead_lookalikes.md)** saves the search and extracts the leads.

## Requirements

* Free: no credits and no plan quota.
* A connected LinkedIn account with Sales Navigator. The search runs live on Sales Navigator, so there is no `live: false` mode.

## Body

* `linkedin_url` **(required)**: the person's LinkedIn profile (`https://www.linkedin.com/in/<name>`)
* `extended`: `true` widens the search: it drops the tenure filter and includes the company sizes next to the person's. Defaults to `false`.
* `included_locations` / `excluded_locations`: Sales Navigator location IDs, from [Location IDs](https://docs.pipecorn.com/api-reference/endpoints/miscellaneous/location-ids.md) with live results

The extract-only keys `limit`, `webhook_url` and `name` are accepted and ignored, so the same body works for both calls. Any other key is rejected with `422`.

## Example request

```json theme={null}
{
  "linkedin_url": "https://www.linkedin.com/in/jane-doe",
  "included_locations": ["105015875"]
}
```

## Example response

```json theme={null}
{
  "total_count": 840,
  "search_url": "https://www.linkedin.com/sales/search/people?query=(filters%3AList(...))",
  "preview": [
    {
      "full_name": "John Roe",
      "headline": "VP Sales at Acme",
      "current_company": "Acme",
      "current_title": "VP Sales",
      "linkedin_id": "123456789",
      "profile_url": "https://www.linkedin.com/in/ACwAAA..."
    }
  ]
}
```

A profile LinkedIn doesn't return answers `404`.


## OpenAPI

````yaml POST /intents/leads/lookalikes/preview
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/preview:
    post:
      summary: Preview lookalike leads
      description: >-
        Build the Sales Navigator search for people similar to a LinkedIn
        profile (similar titles, same industry, company size and tenure) and
        return its count, URL and up to 25 sample leads. Free. Requires a
        connected Sales Navigator account. The extract-only keys (`limit`,
        `webhook_url`, `name`) are accepted and ignored. 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
                  description: Accepted and ignored.
                webhook_url:
                  type: string
                  format: uri
                  description: Accepted and ignored.
                name:
                  type: string
                  description: Accepted and ignored.
      responses:
        '200':
          description: The lookalike search
          content:
            application/json:
              schema:
                type: object
                required:
                  - total_count
                  - search_url
                  - preview
                properties:
                  total_count:
                    type: integer
                    example: 840
                  search_url:
                    type: string
                    format: uri
                    description: Sales Navigator people search built from the profile.
                  preview:
                    type: array
                    maxItems: 25
                    items:
                      type: object
                      properties:
                        full_name:
                          type: string
                        headline:
                          type: string
                        current_company:
                          type: string
                        current_title:
                          type: string
                        linkedin_id:
                          type: string
                        profile_url:
                          type: string
                          format: uri
              example:
                total_count: 840
                search_url: >-
                  https://www.linkedin.com/sales/search/people?query=(filters%3AList(...))
                preview:
                  - full_name: John Roe
                    headline: VP Sales at Acme
                    current_company: Acme
                    current_title: VP Sales
                    linkedin_id: '123456789'
                    profile_url: https://www.linkedin.com/in/ACwAAA...
        '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:
  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.