When WordPress receives your request, any filter parameters are passed to WP_Query as parameters: https://codex.wordpress.org/Class_Reference/WP_Query#Parameters. What this means is that you can do some pretty advanced querying in the API, rather than filtering the results when you get them back.

## Passing filter parameters
To pass filter parameters to Rooftop, you need to include them in a filter[] querystring. What you pass into the filters is exactly what WordPress expects as parameters to WP_Query - do check out all the options.

Example parameters

We won't document an exhaustive list (for that, see the WP_Query docs), but here are some examples.

### Filter by slug
This will return an array of entries which match the slug. Note that there may be more than one! WordPress allows duplicate slugs in nested post types, provided they're not in the same tree.

/wp-json/wp/v2/pages?filter[name]=homepage

Return an array of entries matching an array of IDs

/wp-json/wp/v2/pages?filter[post__in][]=104&filter[post__in][]=105&filter[post__in][]=106

Order by date

/wp-json/wp/v2/news_articles?filter[orderby]=date

There is loads of flexibility with this - check out the WP_Query docs.