# Filter and refine search
Source: https://nordvec.com/docs/guides/how-to/filter-search#the-request

## The request [#the-request]

Only `query` is required. Everything else narrows or bounds the results.

```bash
curl https://nordvec.com/api/v1/documents/search \
  -H "Authorization: Bearer $NORDVEC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "renewal terms",
    "limit": 20,
    "datasource": "contracts",
    "sourceProvider": "google",
    "createdAfter": "2026-01-01T00:00:00Z",
    "createdBefore": "2026-07-01T00:00:00Z"
  }'
```

| Field | Type | Notes |
|---|---|---|
| `query` | string | Required. 1 to 500 characters. Quoted phrases, `or` and a leading `-` to exclude a word are understood. |
| `limit` | integer | Optional. 1 to 50, default 20. How many results to return. |
| `datasource` | string | Optional. Restrict to one datasource by its slug (up to 200 characters). |
| `sourceProvider` | string | Optional. Restrict to one connector provider, for example `google`, `sharepoint` or `slack`. |
| `createdAfter` | string | Optional. ISO 8601 timestamp with an offset; only documents created at or after it. |
| `createdBefore` | string | Optional. ISO 8601 timestamp with an offset; only documents created at or before it. |
| `contentType` | string | Optional. Restrict to one knowledge type, the `type` a pushed document or a knowledge file declares (for example `policy` or `runbook`). |

<Callout>
Every filter is combined with AND: a document must match the query **and** every
filter you supply. Leave a filter out to widen the search.
</Callout>