See the parameters' concepts for details.
By default, the filters can only be used from
count endpoints generated by the Content Type Builder and the CLI. If you need to implement a filter system somewhere else, read the programmatic usage section.
# Available operators
The available operators are separated in four different categories:
Filters are used as a suffix of a field name:
- No suffix or
ne: Not equals
lt: Less than
gt: Greater than
lte: Less than or equal to
gte: Greater than or equal to
in: Included in an array of values
nin: Isn't included in an array of values
ncontains: Doesn't contain
containss: Contains case sensitive
ncontainss: Doesn't contain case sensitive
null: Is null/Is not null
# Find users having
John as first name.
# Find restaurants having a price equal or greater than
# Find multiple restaurant with id 3, 6, 8.
# Or clauses
If you use the same operator (except for in and nin) the values will be used to build an
If you want to use
AND for your query you will have to create a custom query by using the Query documentation.
Strapi doesn't support the
AND operator for now.
# Deep filtering
Find restaurants owned by a chef who belongs to a restaurant with star equal to 5
Querying your API with deep filters may cause performance issues. If one of your deep filtering queries is too slow, we recommend building a custom route with an optimized version of your query.
This feature doesn't allow you to filter nested models, e.g.
Find users and only return their posts older than yesterday.
To achieve this, there are three options:
- Build a custom route.
- Modify your services.
- Use GraphQL.
This feature isn't available for the
Sort according to a specific field.
# Sort users by email.
# Sorting on multiple fields
Limit the size of the returned results.
The default limit is
# Limit the result length to 30.
You can require the full data set by passing a limit equal to
Skip a specific number of entries (especially useful for pagination).
# Get the second page of results.