> ## 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.

# Find companies lookalikes

> Find companies that look like your target accounts. Provide one or more LinkedIn company URLs; the API uses them to generate a lookalike search and streams results to your webhook. Location IDs can be retrieved using the Location IDs endpoint.

Find companies that look like your target accounts. Send one or more LinkedIn company URLs; the API uses them (up to 3 for keyword generation) to build a lookalike search and delivers results to your webhook. The response includes an import `id`, `total` count, and a `preview` of the first 10 matching companies.

You must provide either `company_linkedin_url` or `company_linkedin_urls`, plus `webhook_url`. Optionally filter by `company_size`, `included_locations`, and `excluded_locations`, and cap results with `limit`.

## Location IDs Reference

Location IDs used in `included_locations` and `excluded_locations` can be retrieved using the [Location IDs endpoint](/api-reference/endpoints/miscellaneous/location-ids). Provide a location name (e.g. "San Francisco") and the API returns matching locations with their IDs.


## OpenAPI

````yaml POST /intents/accounts/lookalikes
openapi: 3.0.1
info:
  title: Pipecorn Accounts API
  description: Pipecorn Accounts API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.pipecorn.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /intents/accounts/lookalikes:
    post:
      summary: Find company lookalikes
      description: >-
        Find companies that look like your target accounts. Provide one or more
        LinkedIn company URLs; the API uses them to generate a lookalike search
        and streams results to your webhook. Location IDs can be retrieved using
        the Location IDs endpoint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - webhook_url
              properties:
                webhook_url:
                  type: string
                  format: uri
                  description: URL to receive lookalike results
                  example: https://your-company.com/webhooks/lookalikes
                company_linkedin_url:
                  type: string
                  format: uri
                  description: >-
                    Single LinkedIn company URL to use as reference (use this or
                    company_linkedin_urls)
                  example: https://www.linkedin.com/company/acme-corp
                company_linkedin_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                  description: >-
                    LinkedIn company URLs to use as reference, up to 3 used for
                    LLM keyword generation (use this or company_linkedin_url)
                  example:
                    - https://www.linkedin.com/company/acme-corp
                    - https://www.linkedin.com/company/example-inc
                streaming:
                  type: boolean
                  description: Whether to stream results to the webhook as they are found
                  example: false
                limit:
                  type: integer
                  minimum: 1
                  description: Maximum number of companies to return
                  example: 100
                company_size:
                  type: array
                  items:
                    type: string
                  description: Company size range filters (e.g. headcount bands)
                  example:
                    - 51-200
                    - 201-500
                included_locations:
                  type: array
                  items:
                    type: integer
                  description: >-
                    Location IDs to include (use Location IDs endpoint to
                    resolve names)
                  example:
                    - 103644278
                excluded_locations:
                  type: array
                  items:
                    type: integer
                  description: Location IDs to exclude
                  example: []
      responses:
        '201':
          description: Lookalike search started; results will be sent to the webhook
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Confirmation message
                    example: >-
                      Lookalike search started successfully. You will receive
                      the results on your webhook shortly.
                  id:
                    type: string
                    description: Unique identifier for the import/search
                    example: 550e8400-e29b-41d4-a716-446655440000
                  total:
                    type: integer
                    description: Total number of companies that will be processed
                    example: 100
                  preview:
                    type: array
                    description: First 10 matching companies as a preview
                    items:
                      type: object
                      properties:
                        company_name:
                          type: string
                          example: Acme Corp
                        industry:
                          type: string
                          example: Software Development
                        linkedin_id:
                          type: string
                          description: LinkedIn company numeric ID
                          example: '12345'
                        linkedin_url:
                          type: string
                          format: uri
                          example: https://www.linkedin.com/company/12345
        '400':
          description: >-
            Bad request (e.g. missing company URL, invalid URLs, or processing
            error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_url:
                  value:
                    error: 400
                    message: >-
                      Either company_linkedin_url or company_linkedin_urls is
                      required in your payload
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    defaultApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````