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

# List ICPs

> Retrieves all Ideal Customer Profiles (ICPs) for the authenticated user

Retrieves a list of all ICPs (Ideal Customer Profiles) that the currently authenticated user has access to. ICPs define the criteria for targeting leads, including lead provider search filters, custom filtering criteria, and CRM integration settings.

## Authentication

This endpoint requires authentication. The user must be signed in to access their ICPs.

<Note>
  Only ICPs where the authenticated user is listed in the `userIds` array are
  returned. Users cannot access ICPs they don't have permission to view.
</Note>

## Request

This endpoint does not require any query parameters or request body.

## Response

Returns an array of ICP objects.

<ResponseField name="icps" type="array">
  An array of ICP objects the user has access to.

  <Expandable title="ICP object properties">
    <ResponseField name="id" type="string" required>
      Unique UUID identifier for the ICP.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      The name of the ICP.
    </ResponseField>

    <ResponseField name="description" type="string | null" required>
      A description of the ICP. May be `null` if no description has been set.
    </ResponseField>

    <ResponseField name="createdAt" type="string" required>
      ISO 8601 timestamp of when the ICP was created.
    </ResponseField>

    <ResponseField name="updatedAt" type="string" required>
      ISO 8601 timestamp of when the ICP was last updated.
    </ResponseField>

    <ResponseField name="leadProviderCriteria" type="array" required>
      Array of lead provider search criteria. Each criteria specifies a provider and filters for finding leads.

      <Expandable title="Lead provider criteria object">
        <ResponseField name="provider" type="string" required>
          The lead provider. Currently supports `"baseProvider"`.
        </ResponseField>

        <ResponseField name="type" type="string">
          The type of search: `"person"` or `"company"`. Legacy criteria without this field default to person search.
        </ResponseField>

        <ResponseField name="filters" type="object" required>
          Provider-specific filter object containing search parameters like job titles, locations, industries, company size, etc.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="customFilterCriteria" type="array" required>
      Array of custom filter criteria applied after lead provider search.

      <Expandable title="Custom filter types">
        **Website Filter** (`type: "website"`)

        * `provider`: Provider for website analysis (e.g., `"browserUse"`)
        * `prompt`: Prompt for evaluating company websites

        **Web Scraping Filter** (`type: "webscraping"`)

        * `provider`: Scraping provider (e.g., `"firecrawl"`)
        * `extractionPrompt`: Prompt for data extraction
        * `pageFindingPrompt`: Prompt for finding relevant pages
        * `includeSearchStrings`: Array of strings to include
        * `excludeSearchStrings`: Array of strings to exclude

        **AI Filter** (`type: "ai"`)

        * `entityType`: Entity to evaluate (`"company"` or `"person"`)
        * `prompt`: AI evaluation prompt

        **Max People Per Company** (`type: "maxPeoplePerCompany"`)

        * `value`: Maximum number of leads per company (default: 1)

        **Max Percent From CRM** (`type: "maxPercentFromCRM"`)

        * `value`: Maximum percentage of leads from CRM (default: 100)

        **Min Days Until Reuse** (`type: "minDaysUntilReuse"`)

        * `value`: Minimum days before a lead can be reused (default: 365)

        **Match Field With Regex** (`type: "matchFieldWithRegex"`)

        * `field`: Field path (e.g., `"firstName"`, `"company.headcount"`)
        * `regex`: Regex pattern to match
      </Expandable>
    </ResponseField>

    <ResponseField name="crmFilters" type="object | null | undefined">
      CRM integration filters for sourcing leads from connected CRM systems. This field is both optional and nullable.

      <Expandable title="CRM filters object">
        <ResponseField name="provider" type="string" required>
          CRM provider. Currently supports `"bullhorn"`.
        </ResponseField>

        <ResponseField name="textSearch" type="string | null | undefined">
          Free-text search for occupation/title field (e.g., `"Head OR Leit* OR Direktor"`). This field is both optional and nullable.
        </ResponseField>

        <ResponseField name="filters" type="array">
          Array of structured filter conditions with `path`, `mode`, `value`, and `exclude` properties.
        </ResponseField>

        <ResponseField name="query" type="string | null | undefined">
          Legacy query field. Optional and nullable. Retained for backward compatibility.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="userIds" type="array" required>
      Array of Clerk user IDs that have access to this ICP.
    </ResponseField>

    <ResponseField name="leadsPerList" type="number" required>
      Number of leads to include per generated lead list. Default is 10.
    </ResponseField>

    <ResponseField name="activeUntil" type="string | null" required>
      ISO 8601 timestamp indicating when the ICP expires. `null` means no expiration.
    </ResponseField>
  </Expandable>
</ResponseField>

## Response Examples

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Enterprise Tech Buyers",
      "description": "IT decision makers at large enterprises in DACH region",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-20T14:22:00.000Z",
      "leadProviderCriteria": [
        {
          "provider": "baseProvider",
          "type": "person",
          "filters": {
            "job_title": ["CTO", "VP Engineering", "IT Director"],
            "location": {
              "country": ["Germany", "Austria", "Switzerland"]
            },
            "company": {
              "employee_size": {
                "min": 500,
                "max": 10000
              }
            }
          }
        }
      ],
      "customFilterCriteria": [
        {
          "type": "maxPeoplePerCompany",
          "value": 2
        },
        {
          "type": "minDaysUntilReuse",
          "value": 180
        }
      ],
      "crmFilters": null,
      "userIds": ["user_abc123", "user_xyz789"],
      "leadsPerList": 25,
      "activeUntil": "2024-12-31T23:59:59.000Z"
    },
    {
      "id": "660e9500-f39c-52e5-b827-557766551111",
      "name": "SMB Marketing Leaders",
      "description": null,
      "createdAt": "2024-02-01T09:00:00.000Z",
      "updatedAt": "2024-02-01T09:00:00.000Z",
      "leadProviderCriteria": [
        {
          "provider": "baseProvider",
          "type": "person",
          "filters": {
            "job_title": ["Marketing Director", "CMO", "Head of Marketing"],
            "company": {
              "employee_size": {
                "min": 50,
                "max": 200
              }
            }
          }
        }
      ],
      "customFilterCriteria": [],
      "crmFilters": {
        "provider": "bullhorn",
        "textSearch": "Marketing*",
        "filters": []
      },
      "userIds": ["user_abc123"],
      "leadsPerList": 10,
      "activeUntil": null
    }
  ]
  ```

  ```json 401 theme={null}
  {
    "error": {
      "code": "UNAUTHORIZED",
      "message": "User not authenticated"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Status Code | Error Code       | Description                                               |
| ----------- | ---------------- | --------------------------------------------------------- |
| 401         | `UNAUTHORIZED`   | User is not authenticated. Ensure a valid session exists. |
| 500         | `INTERNAL_ERROR` | An unexpected server error occurred.                      |
