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

# Search Exclusions (Legacy)

> Suppress known people or companies from search results with inline IDs or reusable saved exclusion lists.

This page covers the original search routes, which keep working. For new integrations, use [Search Exclusions](https://docs.sixtyfour.ai/api-reference/search/search-exclusions.md) with `/v1/lists`.

Exclusions keep known people or companies, such as existing customers or do-not-contact lists, out of search results.

The API searches first, then removes excluded records before returning results. Matching behavior is unchanged.

## Choosing an approach

| Need | Use |
| - | - |
| Exclude a few people or companies in one request | `exclude_entity_ids` |
| Reuse a large suppression list | `exclude_list_ids` |
| Build a saved list from IDs in the request | `POST /search/exclusion-lists` with `source.type = "entity_ids"` |
| Build a saved list from a CSV upload | `POST /search/exclusion-lists` with `source.type = "resource_handle"` |
| Build a saved list from a completed search | `POST /search/exclusion-lists` with `source.type = "search_id"` |

## Supported endpoints

| Endpoint | Notes |
| - | - |
| `POST /search/query` | Send exclusions on the first request. |
| `POST /search/start-deep-search` | See [Deep search](#deep-search). |
| `POST /search/export` | Applies exclusions to the CSV. A `search_id` does not carry exclusions, so send them again. See [Export search results](https://docs.sixtyfour.ai/api-reference/legacy/search-results.md#export-search-results). |
| `POST /search/exclusion-lists` | Creates reusable saved exclusion lists. See [Saved exclusion lists](#saved-exclusion-lists). |

## Inline exclusions

Inline exclusions apply only to the request that sends them.

### People

Use `exclude_entity_ids`. In people mode it accepts LinkedIn public IDs or LinkedIn profile URLs:

```json theme={null}
{
  "mode": "people",
  "query": "VP Engineering in New York",
  "exclude_entity_ids": ["jane-doe", "https://linkedin.com/in/john-smith"]
}
```

### Companies

Company searches use `exclude_entity_ids`:

```json theme={null}
{
  "mode": "company",
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" }
  },
  "exclude_entity_ids": [
    "1441",
    "linkedin.com/company/acme-robotics",
    "acme.com"
  ]
}
```

Company identifiers can be:

* Numeric LinkedIn company IDs
* LinkedIn company URLs
* LinkedIn company slugs
* Exact website domains

Identifiers that match no company (unresolvable) or more than one (ambiguous) are skipped.

## Saved exclusion lists

Saved lists are reusable, organization-scoped suppression lists. Each list has an `entity_type` of `person` or `company`, and `entity_type` defaults to `person`. A person list can only be used in people search, and a company list only in company search.

Creating a list is asynchronous. A successful request returns `202 Accepted` with the list `id` and `status: "pending"`:

```json theme={null}
{
  "id": "11111111-1111-1111-1111-111111111111",
  "status": "pending"
}
```

Poll `GET /search/exclusion-lists/{list_id}` every 10 seconds or slower, and use the list only after `status` is `ready`. See [List status](#list-status).

### Create from inline IDs

Use `source.type = "entity_ids"` for both people and companies.

People:

```json theme={null}
{
  "name": "Do not contact people",
  "entity_type": "person",
  "source": {
    "type": "entity_ids",
    "entity_ids": ["jane-doe", "https://linkedin.com/in/john-smith"]
  }
}
```

Companies:

```json theme={null}
{
  "name": "Customer accounts",
  "entity_type": "company",
  "source": {
    "type": "entity_ids",
    "entity_ids": ["1441", "linkedin.com/company/acme-robotics", "acme.com"]
  }
}
```

### Create from a CSV upload

Upload the file with `POST /storage/csv/upload` (CSV, JSON, or NDJSON), then pass the `handle_id` it returns as `resource_handle_id`:

```json theme={null}
{
  "name": "CSV suppression list",
  "entity_type": "company",
  "source": {
    "type": "resource_handle",
    "resource_handle_id": "8f14e45f-1111-2222-3333-abcdefabcdef",
    "id_column": "company_url"
  }
}
```

`id_column` is optional if the API can detect the right column. Column names match without regard to case, spaces, or punctuation, so `public_id`, `publicId`, and `Public ID` are the same column. Without `id_column`, the API uses the column whose name comes first in this list:

| `entity_type` | Recognized columns, in priority order |
| - | - |
| `person` | `public_id`, `public_ids`, `entity_id`, `linkedin_url`, `linkedin`, `url`, `profile_url` |
| `company` | `company_id`, `company_ids`, `entity_id`, `linkedin_url`, `linkedin`, `url`, `website_domain`, `domain`, `website` |

A file with a single column whose header is not recognized is read as a headerless list: its first line is treated as an ID. A file with several columns and none recognized needs `id_column`. Values are deduplicated, and a CSV must be UTF-8.

### Create from a completed search

Use `source.type = "search_id"` to turn a completed search into a reusable list. The source search mode must match the list `entity_type`: a people search produces a `person` list, a company search a `company` list. `max_results` sets how many top results the list captures, from 1 to 250,000 (the default). `name` is optional for this source; it defaults to the search's query and the date.

```json theme={null}
{
  "name": "Companies from last search",
  "entity_type": "company",
  "source": {
    "type": "search_id",
    "search_id": "22222222-2222-2222-2222-222222222222",
    "max_results": 5000
  }
}
```

The `source` can carry its own exclusions, so the list is built from the search results minus another list:

```json theme={null}
{
  "name": "Search results except current customers",
  "entity_type": "company",
  "source": {
    "type": "search_id",
    "search_id": "22222222-2222-2222-2222-222222222222",
    "max_results": 5000,
    "exclude_list_ids": ["11111111-1111-1111-1111-111111111111"]
  }
}
```

> [!WARNING]
>
> `search_id` stores only the query, not any exclusions you applied when browsing the results. If the list should match what you previewed, send the same exclusions in the `source`.

## Using a saved list in search

Pass the list ID in `exclude_list_ids`:

```json theme={null}
{
  "mode": "company",
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" }
  },
  "exclude_list_ids": ["11111111-1111-1111-1111-111111111111"]
}
```

Saved lists and inline exclusions combine in the same request:

```json theme={null}
{
  "mode": "company",
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" }
  },
  "exclude_list_ids": ["11111111-1111-1111-1111-111111111111"],
  "exclude_entity_ids": ["acme.com"]
}
```

## Manage saved lists

`GET /search/exclusion-lists` returns every list in the organization, most recent first. `GET /search/exclusion-lists/{list_id}` returns one:

```json theme={null}
{
  "id": "11111111-1111-1111-1111-111111111111",
  "name": "Customer accounts",
  "entity_type": "company",
  "status": "ready",
  "size": 2,
  "source_type": "entity_ids",
  "source_total_available": null,
  "id_column": null,
  "unresolved_count": 1,
  "error_message": null,
  "created_at": "2026-08-12T18:00:00+00:00",
  "updated_at": "2026-08-12T18:00:41+00:00"
}
```

| Field | Description |
| - | - |
| `status` | See [List status](#list-status). |
| `size` | Unique members, once the list is `ready`. |
| `source_type` | `entity_ids`, `resource_handle`, or `search_id`. |
| `source_total_available` | For a `search_id` source, the search's full match count. Larger than `size` when `max_results` capped the list. |
| `id_column` | The column read from an uploaded file. |
| `unresolved_count` | Company lists only: input values dropped because they matched no company or more than one. |
| `error_message` | Why the list failed. |

### List status

| Status | Meaning |
| - | - |
| `pending`, `materializing` | The list is being built. Keep polling. |
| `ready` | The list can be used in `exclude_list_ids`. |
| `failed` | The list could not be built. Read `error_message`. A list still building 60 minutes after its last update reads as `failed`. |

Every list that is not deleted counts toward the active-list limit, including `pending` and `failed` lists. Delete failed lists to free their slots.

### Delete a list

`DELETE /search/exclusion-lists/{list_id}` deletes a list and returns:

```json theme={null}
{
  "success": true,
  "id": "11111111-1111-1111-1111-111111111111"
}
```

Searches that use the list stop working: an open cursor that applies it fails, and so does any new request that names it. Start paging again without the list.

## Limits

| Limit | Value |
| - | - |
| Saved lists per request (`exclude_list_ids`) | 5 (10 with extended exclusion limits) |
| Active saved lists per organization | 20 (40 with extended exclusion limits) |
| Inline IDs per request | 1,000 |
| IDs per `entity_ids` source | 10,000 |
| Members per saved list | 250,000 |
| List name | 1–200 characters. Required unless `source.type` is `search_id` |

Extended exclusion limits are enabled per organization; contact [support@sixtyfour.ai](mailto:support@sixtyfour.ai) to request them. Lists are immutable: to change one, create a new list and delete the old one.

## Pagination

Send exclusions on the first `/search/query` request. With exclusions, a page can hold fewer rows than `page_size`, even zero, while `has_more` is `true`. See [Paginate with cursors](https://docs.sixtyfour.ai/api-reference/legacy/search-results.md#paginate-with-cursors).

## Deep search

```json theme={null}
{
  "query": "VP Engineering at Series B SaaS companies in New York",
  "mode": "people",
  "max_results": 500,
  "exclude_list_ids": ["11111111-1111-1111-1111-111111111111"],
  "exclude_entity_ids": ["jane-doe"]
}
```

For `output_mode: "csv"`, Sixtyfour applies exclusions before producing the CSV. Rows removed by `exclude_list_ids` are not replaced, so the CSV can hold far fewer than `max_results` rows. To get up to `max_results` eligible rows, start the search with `output_mode: "query_only"` and page with exclusions through `POST /search/query`, or export it with `POST /search/export`.

For `output_mode: "query_only"`, the `search_id` stores the query, not your exclusions. Send them again with the `search_id` on `POST /search/query`:

```json theme={null}
{
  "search_id": "22222222-2222-2222-2222-222222222222",
  "exclude_list_ids": ["11111111-1111-1111-1111-111111111111"],
  "exclude_entity_ids": ["jane-doe"]
}
```

## Errors

For error responses (400, 403, 422, etc.), see [Handling Errors](https://docs.sixtyfour.ai/api-reference/errors.md).


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