---
updatedAt: 2025-09-18T20:10:52.000Z
agentTools:
  projectIndex: https://developers.botify.com/llms.txt
---

# Filter Types and Formats

# Predicate Filters

The most common filter is the Predicate filter, which is used to filter on a specific field against a specific value.

```json
"filters": {
  "field": "url",
  "predicate": "eq",
  "value": "example.com/a"
}
```

See the [Predicates](https://developers.botify.com/docs/predicates) page for the list of predicate filters.

The `field` can contain a plain field slug or any function that can also be used as a dimension. For instance:

```json
"filters": {
  "field": {
    "function": "div",
    "args": ["crawl.20210102.http_code", 100]
  },
  "predicate": "eq",
  "value": 2
}
```

This filter will return rows when the HTTP code is 200 because the result of the function is equal to 2.

One way to compare two fields is to use the equality function in the predicate so the function returns `true` and filters on rows where the result is `true`:

```json
"filters": {
  "field": {
    "function": "eq",
    "args": [
      "crawl.20210102.http_code",
      "crawl.20201201.http_code"
    ]
  },
  "predicate": "eq",
  "value": true
}
```

Find all available functions on the [Functions page](https://developers.botify.com/docs/functions).

# Boolean Filters

BQL supports the boolean filters `and` and `or` to compound filters, which can be nested. For example:

```json
"filters": {
  "or": [
    {
      "field": "url",
      "predicate": "contains",
      "value": "mobile"
    },
    {
      "and": [
        {
          "field": "protocol",
          "predicate": "eq",
          "value": "http"
        },
        {
          "field": "host",
          "predicate": "eq",
          "value": "m.example.com"
        }
      ]
    }
  ]
}
```

# Negative Filters

To negate a filter and exclude rows that match this condition, encapsulate the nested filter in a `not`:

```json
"filters": {
  "not": {
    "field": "url",
    "predicate": "eq",
    "value": "example.com/a"
  }
}
```

#