# Building Queries

Archive uses the **same Boolean query language as the live API**. If a query works live, it works in Archive - in both the Wizard and the API.

## Operators

| Operator | Meaning | Example |
| --- | --- | --- |
| _space_ | AND | `bitcoin price` |
| `OR` | Either term | `ipod OR ipad` |
| `-` | Exclude | `apple -fruit` |
| `( )` | Group | `(ipod OR ipad) -android` |
| `"..."` | Exact phrase | `"machine learning"` |

Free-text terms match against the post **text and title**.

## Common filters

| Filter | Purpose | Example |
| --- | --- | --- |
| `site_type` | Limit by data type | `site_type:news` |
| `language` | Limit by language | `language:english` |
| `thread.country` | Limit by country | `thread.country:US` |
| `site` | Limit to a domain | `site:cnn.com` |
| `rating` | Reviews by score | `rating:5` |
| `person` / `organization` / `location` | Match entities | `organization:Microsoft` |

## Example

News and blogs about Microsoft, in English, excluding job posts:

```bash
Microsoft (site_type:news OR site_type:blogs) language:english -"job opening"
```

## Filter availability by date

Enrichment filters only exist in data from a certain date. If your timeframe starts earlier, those filters return little or nothing for the older months - and the API rejects some outright (see [Archive API](archive-api) error codes).

| Filter | Available from |
| --- | --- |
| Entities (`person`, `organization`, `location`) | March 2015 |
| `performance_score` | May 2015 |
| `domain_rank` | April 2016 |
| Sentiment | June 2016 |
| Social signals | August 2016 |
| Site categories | August 2016 |
| Review ratings | February 2017 |

> [!TIP]
> Validate the query with a free sample first, then reuse the exact same query in the Wizard or in `setArchiveQuery`.

