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

# Filters

> The filter vocabulary shared by company search, saved segments and ICP and Intent Builder profiles: fields, operators, list values and the relationship shortcut.

`POST /v1/trackers/{tracker_code}/companies` takes a `filters` tree of rules combined with `and` or `or`, nested as deep as you need. The same rules describe Portal segments (`GET /v1/segments`) and the rules of ICP Builder and Intent Builder profiles.

```json theme={null}
{
  "start_date": "2026-09-01",
  "end_date": "2026-09-27",
  "sort": "score",
  "limit": 20,
  "relationship": "prospects",
  "filters": {
    "operator": "and",
    "conditions": [
      { "field": "branch_international", "operator": "starts_with", "value": ["73", "87"] },
      { "field": "icp_score", "operator": "equals", "value": 100 },
      { "field": "sessions", "operator": "greater_than_or_equal", "value": 2 },
      {
        "operator": "or",
        "conditions": [
          { "field": "url", "operator": "contains", "value": "/pricing" },
          { "field": "url", "operator": "contains", "value": "/demo" }
        ]
      }
    ]
  }
}
```

## Fields

| Group | Fields |
| - | - |
| Firmographic text | `name`, `domain`, `country` (ISO-2), `city`, `province`, `postal_code`, `employee_range`, `branch_local`, `branch_international`, `legal_form`, `description` |
| Firmographic number | `employees`, `branch_code`, `sales_volume`, `founded_year` |
| Region | `region` with values `BENELUX`, `DACH`, `EMEA`, `APAC`, `AMER` |
| Activity in the window | `sessions`, `pages`, `duration`, `unique_visitors`, `active_days`, `visitors`, `persona_visitors`, `form_submissions`, `leadbot_submissions`, `first_seen`, `last_seen` |
| All time | `sessions_total`, `pages_total`, `duration_total`, `is_new`, `is_returning` |
| Flags | `is_ai_agent`, `in_crm`, `is_shared_network` |
| Scores | `lead_score`, `engagement_score`, `icp_score`, `intent_score`, `score` |
| Traffic source of any session in the window | `source`, `medium`, `campaign`, `term`, `content`, `referrer`, `referrer_host`, `click_provider`, `paid_source`, `organic_source`, `social_source`, `ai_source` |
| Pages viewed | `url`, `page_title` (at most 5 such rules per request, windows up to 365 days) |
| Tags | `tag` with tag ids from `GET /v1/tags` |

`branch_international` is the SIC 1987 code every company carries regardless of country, so `starts_with ["73"]` selects business services everywhere. `branch_local` codes differ per country (SBI in the Netherlands, NACE in Belgium) and only make sense with a country filter. The [reference pages](https://docs.leadinfo.com/reference/industries.md) list the accepted values for industries, [company sizes](https://docs.leadinfo.com/reference/company-sizes.md), [countries and regions](https://docs.leadinfo.com/reference/countries-and-regions.md), [traffic channels](https://docs.leadinfo.com/reference/traffic-channels.md) and [contact fields](https://docs.leadinfo.com/reference/contact-fields.md).

## Operators

| Kind | Operators |
| - | - |
| Text | `equals`, `not_equals`, `contains`, `not_contains`, `starts_with`, `not_starts_with`, `ends_with`, `not_ends_with`, `in`, `not_in`, `is_known`, `is_unknown` |
| Number and date | `equals`, `not_equals`, `in`, `not_in`, `greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal`, `between`, `not_between`, `is_known`, `is_unknown` |
| Relative dates (`first_seen`, `last_seen`) | `less_than_x_units_ago`, `more_than_x_units_ago` with `unit` = `hours`, `days`, `weeks`, `months` |
| Flags | `equals` with `true` or `false` |
| Tags | `in`, `not_in`, `all`, `is_known`, `is_unknown` |

`contains`, `starts_with`, `ends_with` and their negations accept a list as "any of": `url contains ["/pricing", "/tarieven"]` matches either page. `between` takes exactly two values. Dates are `YYYY-MM-DD`.

## Traffic source fields

`medium` filters the raw value; the Portal's Medium categories are `direct`, `referral`, `email`, `cpc`, `organic`, `social`, `ai` and `email_tracker`. `paid_source` (Google Ads, Linkedin Ads, Microsoft Ads, Facebook Ads), `organic_source` (Google, Bing, DuckDuckGo, Ecosia, Yahoo!), `social_source` and `ai_source` (ChatGPT, Claude.ai, Google Gemini, Perplexity.ai, Microsoft Copilot and others) select the source within a channel. `campaign` matches the UTM or ad campaign name and `click_provider` the ad platform recognised from click ids.

## The relationship shortcut

`relationship=prospects` applies the usual prospecting exclusions in one parameter: not in a connected CRM, not tagged customer, competitor or not-interesting, not an AI assistant and not shared-network traffic. `relationship=existing` keeps companies in a CRM or tagged customer. Opportunities default to `prospects`, the list endpoints to `all`. To leave out your own relationship tags as well, such as Partner or Login, add `exclude_tag_ids` or a `tag` rule with `not_in`.

## Segments

Pass `segment_id` to apply a segment saved in the Portal. The API translates its rules into this vocabulary and lists anything it could not translate in `meta.unsupported_rules`, so you always know what was applied.


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