---
title: "Get Filtered Filter Options"
method: POST
path: "/search/filter-options"
tags: ["Search"]
---

# Get Filtered Filter Options

`POST /search/filter-options`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/search/filter-options`
- Auth: HTTP bearer

The same values, but only those present in a SUBSET of the index.

The difference matters: `GET /search/filter-options` answers "what
industries exist", this answers "what industries exist among companies in
Spain". Building a dependent filter off the unfiltered list offers the
caller values that cannot return a single row once the other filters are
applied.

`filters` must contain at least one condition, which is the same refusal
`POST /search/contacts` makes - an unfiltered request scans the entire
open-data index.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- FilterOptionsRequest: Ask what values a set of fields holds, narrowed by a search. Mirrors the app's `FilteredFilterOptionsRequest` in substance - `fields` plus an ICP query - but in the PUBLISHED vocabulary. It SUBCLASSES the published `SearchRequest` rather than restating its fields, so `filters`, `page` and `limit` cannot drift away from the search they are meant to describe: a body that works against `POST /search/contacts` works here with two fields added. `filters` must be non-empty. That is not this contract being fussy - it is the same refusal `POST /search/contacts` makes, because an unfiltered request scans the entire open-data index.
  - `filters` SearchFilter[]: Filter conditions (AND logic)
    - `field` string, required: Field name to filter on (e.g., 'job_title', 'country', 'industry')
    - `operator` 'any_of' | 'contains' | 'all_of' | 'none_of' | 'is_empty' | 'is_not_empty' | 'between' | 'exists', required: Supported filter operators for search queries.
    - `value` unknown[]: Filter values
      - unknown
  - `page` integer: Page number (1-indexed)
  - `limit` integer: Results per page (max 100)
  - `resource` 'contacts' | 'companies', required: Which index the field names belong to. Decides the vocabulary.
  - `fields` string[], required: Developer field names, as used by `POST /search/{resource}`.

## Response `200`

Successful Response

- ApiResponseDictStrListFilterOptionItem
  - `data` object, required
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
