> For the complete documentation index, see [llms.txt](https://api.clearinghouse.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.clearinghouse.net/api-reference-v2p1/new-features/query-behavior.md).

# Query Behavior

API v2.1 supports flexible query parameters so you can filter and retrieve exactly the records you need.

## Filtering

You can retrieve resources, documents, and dockets associated with a specific case by including the case parameter in your request. You may also retreive dockets via their RECAP ID. For example:

* **Filter cases by type:** `/api/v2p1/cases/?case_type=5039`
* **Filter resources associated with a specific case:** `/api/v2p1/cases/11085/resources`
* **Filter dockets associated with a specific case:** `/api/v2p1/cases/11085/dockets`
* **Filter dockets associated with a recap\_id:** `/api/v2p1/dockets/?recap_id=72085714`
* **Filter documents associated with a specific case:** `/api/v2p1/cases/11085/documents`

{% hint style="warning" %}
You cannot filter `document`, `resources`, and `dockets` without specifying a case (with the exception of searching for recap\_id via dockets. See note above.)

**For example:** `/api/v2p1/documents/?document_status=Approved` Will return

```
{
  "detail": "Not found."
}
```

{% endhint %}

When accessing the URL endpoints for resources, documents, or dockets, please refer to these pages for detailed response examples:

* [Documents](/api-reference-v2p1/objects/document.md)
* [Resources](/api-reference-v2p1/objects/resource.md)
* [Dockets](/api-reference-v2p1/objects/docket.md)
