# Filter

Filters narrow your results to entities matching specific conditions. Use the `filter` parameter with attribute-value pairs:

```
filter=attribute:value,attribute2:value2
```

> **Note:**
> Filters are case-insensitive.

## Examples

```bash Works by type
curl "https://api.openalex.org/works?filter=type:book"
```

```bash Authors by ORCID status
curl "https://api.openalex.org/authors?filter=has_orcid:true,works_count:>100"
```

```bash Sources with many works
curl "https://api.openalex.org/sources?filter=works_count:>1000"
```

## Logical expressions

### Inequality

For numerical filters, use `<` and `>` for inequalities:

```bash
# Sources hosting more than 1000 works
https://api.openalex.org/sources?filter=works_count:>1000
```

Some attributes have convenience filters like `from_publication_date` and `to_publication_date`:

```bash
# Works published between Jan 1-26, 2022
https://api.openalex.org/works?filter=from_publication_date:2022-01-01,to_publication_date:2022-01-26
```

### Negation (NOT)

Prepend `!` to negate any filter:

```bash
# All institutions except those in the US
https://api.openalex.org/institutions?filter=country_code:!us
```

### Intersection (AND)

Comma-separated filters are combined with AND:

```bash
# Works cited more than once AND open access
https://api.openalex.org/works?filter=cited_by_count:>1,is_oa:true
```

For AND within a single attribute, repeat the filter or use `+`:

```bash Repeating filters
# Works with authors from France AND UK
https://api.openalex.org/works?filter=institutions.country_code:fr,institutions.country_code:gb
```

```bash Using + symbol
# Works with authors from France AND UK
https://api.openalex.org/works?filter=institutions.country_code:fr+gb
```

> **Note:**
> The `+` syntax doesn't work for search filters, boolean filters, or numeric filters.

### Addition (OR)

Use the pipe `|` to match any of multiple values:

```bash
# Works with authors from France OR UK
https://api.openalex.org/works?filter=institutions.country_code:fr|gb
```

This is efficient for retrieving many records by ID at once:

```bash
# Get two works by DOI in one request
https://api.openalex.org/works?filter=doi:https://doi.org/10.1371/journal.pone.0266781|https://doi.org/10.1371/journal.pone.0267149
```

> **Warning:**
> **OR limit:** You can combine up to 100 values with `|` in a single filter. Use `per_page=100` to get all results.

> **Warning:**
> **OR works within a filter, not between filters.** This will return an error:
> ```bash
> # INVALID: OR between different filters
> https://api.openalex.org/works?filter=institutions.country_code:fr|primary_location.source.issn:0957-1558
> ```

## Filter by saved collection

The `collection:` filter narrows results to the entities you've saved in one
of your [collections](/api/collections/). It's available on every entity
type collections support — `/works`, `/authors`, `/sources`, `/institutions`,
`/topics`, `/sdgs`, `/funders`, `/publishers`, `/keywords`, `/concepts` —
and requires a `Bearer` API key or JWT for the user who owns the collection.

```bash
GET https://api.openalex.org/works?filter=collection:col_beNWUTw6qY
Authorization: Bearer <jwt>
```

Negation with `!` is supported, and `collection:` combines with any other
filter. One `collection:` filter is allowed per request — see the
[Collections guide](/api/collections/) for the full set of caps and behaviors.

## Available filters by entity

Each entity type has its own set of filterable fields. See the API reference for complete filter lists:

| Entity | Filters |
|--------|---------|
| [Works](/api/works/) | `publication_year`, `type`, `open_access.is_oa`, `author.id`, `institutions.id`, `cited_by_count`, `doi`, `has_abstract`, and ~150 more |
| [Authors](/api/authors/) | `has_orcid`, `last_known_institutions.id`, `works_count`, `cited_by_count`, `orcid` |
| [Sources](/api/sources/) | `is_oa`, `is_in_doaj`, `type`, `country_code`, `host_organization`, `issn` |
| [Institutions](/api/institutions/) | `country_code`, `type`, `is_global_south`, `continent`, `ror`, `has_ror` |
| [Topics](/api/topics/) | `domain.id`, `field.id`, `subfield.id`, `works_count` |
| [Keywords](/api/keywords/) | `works_count`, `cited_by_count` |
| [Publishers](/api/publishers/) | `country_codes`, `hierarchy_level`, `ror`, `parent_publisher` |
| [Funders](/api/funders/) | `country_code`, `is_global_south`, `continent`, `ror`, `awards_count` |

> **Info:**
> **Looking for text search?** Filters match exact values. For full-text search in titles, abstracts, and other fields, see [Searching](/api/searching/).
