> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.scaleabm.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.scaleabm.org/_mcp/server.

# SalesNav Structured Filters

> 28 filter types for precise LinkedIn lead search — school, company, title, tenure, geography, industry, and more

# SalesNav Structured Filters

The `POST /api/salesnav/search` endpoint supports 28 structured filter types for precise lead search, matching the full SalesNav UI filter panel. The catalogue below is authoritative — the `SalesNavFilterType` union in `src/services/salesnav-api.ts` is the source of truth.

## Quick Example

```json
POST /api/salesnav/search
{
  "filters": [
    { "type": "SCHOOL", "values": [{ "text": "University of Cambridge" }] },
    { "type": "REGION", "values": [{ "text": "London" }] },
    { "type": "SENIORITY_LEVEL", "values": [{ "id": "8", "text": "CXO" }] }
  ],
  "maxResults": 25
}
```

Filter values can be **names** (auto-resolved via typeahead) or **numeric IDs** (faster, more reliable).

## Filter Types

### Company Filters

| Type                   | Description                                                                     | Supports Exclude |
| ---------------------- | ------------------------------------------------------------------------------- | :--------------: |
| `CURRENT_COMPANY`      | Current employer                                                                |        Yes       |
| `PAST_COMPANY`         | Previous employer                                                               |        Yes       |
| `COMPANY_HEADCOUNT`    | Size: B=1-10, C=11-50, D=51-200, E=201-500, F=501-1K, G=1K-5K, H=5K-10K, I=10K+ |        No        |
| `COMPANY_TYPE`         | Public/private/etc                                                              |        No        |
| `COMPANY_HEADQUARTERS` | HQ location                                                                     |        Yes       |

### Role Filters

| Type                        | Description                                                                | Supports Exclude |
| --------------------------- | -------------------------------------------------------------------------- | :--------------: |
| `CURRENT_TITLE`             | Current job title                                                          |        Yes       |
| `PAST_TITLE`                | Previous job title                                                         |        Yes       |
| `FUNCTION`                  | Job function (Engineering, Sales, etc)                                     |        Yes       |
| `SENIORITY_LEVEL`           | 3=Entry, 4=Senior, 5=Manager, 6=Director, 7=VP, 8=CXO, 9=Partner, 10=Owner |        Yes       |
| `YEARS_AT_CURRENT_COMPANY`  | Tenure at current company                                                  |        No        |
| `YEARS_IN_CURRENT_POSITION` | Tenure in current role                                                     |        No        |
| `YEARS_OF_EXPERIENCE`       | Total work experience                                                      |        No        |

### Personal Filters

| Type               | Description               | Supports Exclude |
| ------------------ | ------------------------- | :--------------: |
| `SCHOOL`           | Education institution     |        Yes       |
| `REGION`           | Geography/location        |        Yes       |
| `INDUSTRY`         | Industry vertical         |        Yes       |
| `GROUP`            | LinkedIn group membership |        No        |
| `FIRST_NAME`       | First name (text)         |        No        |
| `LAST_NAME`        | Last name (text)          |        No        |
| `PROFILE_LANGUAGE` | Profile language          |        No        |

### Relationship Filters

| Type            | Description                                  | Supports Exclude |
| --------------- | -------------------------------------------- | :--------------: |
| `RELATIONSHIP`  | Connection degree (1st, 2nd, 3rd+, TeamLink) |        No        |
| `CONNECTION_OF` | Shared connections with a specific profile   |        No        |

### Toggle Filters (boolean — no values needed)

| Type                       | Description                                    |
| -------------------------- | ---------------------------------------------- |
| `RECENTLY_CHANGED_JOBS`    | Changed jobs in last \~90 days                 |
| `POSTED_ON_LINKEDIN`       | Posted content recently                        |
| `FOLLOWS_YOUR_COMPANY`     | Follows your company page                      |
| `PAST_COLLEAGUE`           | Shared a company with you                      |
| `WITH_SHARED_EXPERIENCES`  | Any shared experience (school, company, group) |
| `VIEWED_YOUR_PROFILE`      | Viewed your profile recently                   |
| `VIEWED_YOUR_COMPANY_PAGE` | Viewed your company page recently              |

Toggle filters are passed with an empty `values` array:

```json
{ "type": "RECENTLY_CHANGED_JOBS", "values": [] }
```

## Filter Logic

* **Multiple values in ONE filter = OR**: `PAST_COMPANY` with Barclays + HSBC → worked at either
* **Multiple filter TYPES = AND**: `SCHOOL` + `REGION` → went to school AND lives in region
* **Exclusion**: `"selectionType": "EXCLUDED"` → NOT this value

## Typeahead Resolution

Resolve names to IDs before searching:

```bash
GET /api/salesnav/typeahead?type=SCHOOL&query=Cambridge
→ [{ "id": "4522", "text": "University of Cambridge" }, ...]
```

Supported typeahead types: `SCHOOL`, `COMPANY_WITH_LIST`, `INDUSTRY`, `TITLE`, `BING_GEO`, `FUNCTION`, `GROUP`, `CONNECTION_OF`.

## Performance Tips

* **2-3 filters** is the sweet spot — best result quality
* **4+ filters** starts to narrow significantly
* **Use numeric IDs** when possible — skips typeahead round-trip
* **Avoid mixing keywords + filters** — keywords dilute filter precision
* **Toggle filters combine freely** — 2+ toggles work together

## Common Patterns

See [Query Patterns](/guides/playbooks/query-patterns) for tested examples including:

* Career trajectory analysis (ex-bankers at startups)
* Competitive intelligence (who left X for Y)
* Diaspora mapping (Greek/Indian/Nigerian tech workers abroad)
* Alumni at target companies
* Buying signals (viewed profile + changed jobs)