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

> ## Agent Instructions
> Setting up Context.dev for a user? Follow https://docs.context.dev/agent-quickstart.md. MCP clients sign in with OAuth and need no API key; application code reads CONTEXT_DEV_API_KEY.

# Filter and sort

> Select news by one source category, date window, and ordering.

`filterBy` accepts one category filter at a time, plus an optional date range. Combining categories returns a validation error.

## Find press releases

Send this body to `POST /news/search`. See the [Quickstart](/quickstart) for authentication and SDK setup.

```json theme={null}
{
  "searchBy": {
    "type": "entity",
    "entity": {
      "type": "domain",
      "domain": "stripe.com"
    }
  },
  "filterBy": {
    "articleType": [
      "press_release"
    ],
    "date": {
      "from": 1785542400000,
      "to": 1788220799999
    }
  },
  "sortBy": {
    "type": "newest"
  }
}
```

## Filter categories

| Field             | Values                                                                        |
| ----------------- | ----------------------------------------------------------------------------- |
| `sourceDomain`    | Up to three publisher domains.                                                |
| `sourceCountry`   | Up to three lowercase ISO country codes.                                      |
| `articleLanguage` | Up to three supported language codes.                                         |
| `articleType`     | Up to three of `editorial`, `press_release`, `regulatory_filing`, `advisory`. |

`date.from` and `date.to` are inclusive epoch milliseconds; `from` must be at most `to`. Either bound can be omitted. The example window covers August 2026 in UTC; calculate new bounds for a rolling window.

`sortBy.type` is `newest` (default) or `relevance`. Use the same filters and sort for every [pagination request](/news/paginate).
