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.


Return an array of entries matching an array of IDs


Order by date


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