---
title: Filter Parameters
subtitle: >-
  How to pass filter parameters via query strings or JSON request body to avoid
  URL length limits.
slug: /api/overview/filter-parameters
---

Many resources accept filters and other parameters which can be simply passed in
the GET query string. However, in certain cases, like filtering by a long list
of IDs, URLs can potentially exceed the recommended maximum URL length (2000
characters). To prevent problems with long URLs, parameters can also be
specified in a JSON-encoded dictionary in the request body under the `_params`
key. Since GET requests with a request body are against the specification, we
support the `x-http-method-override` HTTP header that lets you override the
request method.

For example, the following two requests are equivalent:

```bash
curl -X POST
     -u apikey:
     -H 'content-type: application/json'
     -H 'x-http-method-override: GET'
     -d '{"_params": { "lead_id": "THE_LEAD_ID" }}'
     https://api.close.com/api/v1/activity/
```

```bash
curl -u apikey: https://api.close.com/api/v1/activity/?lead_id=THE_LEAD_ID
```

The `x-http-method-override` header can also be used for clients that have
issues with request methods other than GET and POST.
