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

# Autosuggest

> Suggest filter values such as companies, titles, and skills as someone types.

`POST /v2/search/entities/autosuggestions` suggests filter values, such as companies, titles or skills, as someone types. Use it behind a search box; use [Entity resolution](https://docs.seekout.com/developer-platform/guides/entity-resolution.md) when you already have the full names.

## Suggest values for a prefix

Name one `source`, one `field` from that source's list below, and the `query` typed so far. You get up to five suggestions (`max_results`, 1 to 5). Public needs a `region`. ATS uses your organization's active ATS connection, so it takes neither; a `connection_ref` other than that connection is refused with `403` `invalid_source_binding`. Every other source takes neither. The `Idempotency-Key` header is required.

```bash theme={null}
curl --request POST "https://developer-api.seekout.io/v2/search/entities/autosuggestions" \
  --header "Authorization: Bearer $SEEKOUT_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $(uuidgen)" \
  --data '{
    "schema_version": "public_entity_autosuggest_request.v2",
    "source": "public",
    "field": "company",
    "region": "north_america",
    "query": "Exam"
  }'
```

```http theme={null}
HTTP/1.1 200 OK

{
  "schema_version": "public_entity_autosuggest_response.v2",
  "source": "public",
  "field": "company",
  "suggestions": [
    {
      "kind": "entity",
      "entity_id": 15,
      "entity_type": "company",
      "display_name": "Example Co",
      "count": null
    }
  ]
}
```

The response also carries a `billing` object that reports what the request charged. Current rates are available to signed-in accounts in the console.

## Two kinds of suggestion

| Kind | What it carries | How to search on it |
| - | - | - |
| `entity` | An `entity_id`, its `entity_type`, and a `display_name` | Put the `entity_id` in the matching `_ids` filter of `POST /v2/candidates/search` |
| `text` | A `display_name` and, when the source counts them, a `count` | Use the `display_name` as a text filter value |

Public fields always return `entity` suggestions. Location fields on healthcare, nursing and internal talent, and internal talent `titles`, return `entity` when the value maps to exactly one entity and `text` otherwise. Every other field returns `text`.

## Fields by source

A field from another source's list is refused with `422`. The `query` may be up to 256 characters for public and 512 for the other sources.

| Source | Fields |
| - | - |
| `public` | `certification`, `company`, `degree`, `industry`, `location`, `major`, `school`, `skill`, `title` |
| `github` | `cities`, `countries`, `cur_company`, `locations`, `organizations`, `repos`, `states`, `topics` |
| `academic` | `affiliations`, `categories`, `city`, `conferences`, `country`, `cur_company`, `journals`, `schools`, `sub_categories`, `tags` |
| `healthcare` | `city`, `country`, `hospital_affiliations`, `language`, `license_state`, `npi_category`, `schools`, `specialties`, `state`, `taxonomy_name`, `zip_code` |
| `nursing` | `city`, `country`, `cur_company`, `license_status`, `license_title`, `nurse_license_state`, `nurse_type`, `schools`, `specialties`, `state`, `zip_code` |
| `ats` | `application_type`, `current_stage`, `job_id`, `rejection_reason`, `recruiter`, `requisition_id`, `source`, `status` |
| `internal_talent` | `country`, `department`, `hierarchy`, `internal_skills`, `manager`, `office_location`, `titles` |

> [!NOTE]
>
> A location suggestion is not a city boundary. Location suggestions follow how SeekOut groups profiles within a region, not administrative borders.

## Billing and retries

Each successful request is one entity lookup unit, however many results it returns. An empty list of suggestions is still a completed lookup.

* Reuse the same `Idempotency-Key` to retry: inside 24 hours the stored answer comes back with `reused: true` and nothing is charged again.
* Reusing a key with a different body is `409`. Generate a new key for different work.
* Keep the original key after a timeout or a `503`. A fresh key is new work and is charged as such.

## Failures worth handling

| Status | Code | What to do |
| - | - | - |
| `402` | `insufficient_credits` | Add credits, then retry with a new idempotency key: the old key replays this refusal for 24 hours. Nothing was charged |
| `403` | Not applicable | The key needs the Candidates Search access set, and your organization must be enabled for the source |
| `409` | `idempotency_conflict` | The idempotency key was already used with a different body |
| `422` | Not applicable | The body breaks a rule on this page, such as a field the source does not support |
| `429` | Not applicable | Wait for `Retry-After`, then retry with the same key |
| `503` | Not applicable | Lookup is temporarily unavailable. Nothing was charged; retry after `Retry-After` with the same key |

To resolve full names in a batch and search on the ids, see [Entity resolution](https://docs.seekout.com/developer-platform/guides/entity-resolution.md).


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