Filtering responses

Use filters to reduce responses sizes and bandwidth, ensuring you get just the data you need.

Using filters in your request can significantly cut down on the response size from the server as well as ensure that you eliminate any of the data that you don't need to get the job done.

Get only certain fields

You can use the fields filter in your URL query to define which fields:

  • You want returned in your response.
  • You want excluded in your response.


You can only target first-level fields, which will return any nested fields.

For example, when querying the accounts endpoint, instead of receiving the entire response from the server, you can add ?fields=id,balance to the end of your query to get just the account ID and the balance (see the Filtered tab in the code example below).


HTTP/1.1 200 OK
Content-Type: application/json
Content-Size: 341 Bytes # Unfiltered size

  "balance": {
      "current": 63054.93,
      "available": 62985.22
5a772f98-befc-4217-8ae7-a087e73a7c28/?fields=id,balance # Filtered query

HTTP/1.1 200 OK
Content-Type: application/json
Content-Size: 73 Bytes # Returned filtered response

  "balance": {
      "current": 63054.93,
      "available": 62985.22

Filter response data

You can use additional filters in your URL query to narrow down the responses you receive. Belvo supports the following operators for your queries:


Filterable fields per endpoint

To know which fields you can filter, check out our API reference docs.

If you find that you aren't able to filter a certain field and would like to, please reach out to Belvo Support at [email protected].

OperatorUse when you wantExample
=To get results that exactly match a value.fieldA=OpenFinance
gtTo get results that are greater than a given value.fieldA__gt=5000
ltTo get results that are smaller than a given value.fieldA__lt=6000
gteTo get results that are greater than or equal to a given value.fieldA__gte=5000
lteTo get results that are smaller than or equal to a given value.fieldA__lte=6000
inTo get results for any of the listed elements. Works with strings.fieldA__in=monday,wednesday,friday
rangeTo get results that are between two values. Works with dates and numbers. Separate the two values with a comma.fieldA__range=1,5
&To combine queries.query1&query2

To use the operators, just add them to the end of the query field (remember to use double underscores, __, between the field and the operator). The example below will only return accounts where the currency is COP and the balance_available is between 3000 and 5000:

Target nested fields

You might want to target nested fields within the response. In the example below, if you wanted to target the current field, then the query path would be: account__balance__current. Please note that double underscores (__) are used to indicate that a field is nested within another field.

   "type":"Cuentas de efectivo",


Below you'll see some examples of how to apply filters to your calls 🤓.

Transaction equal to a given ID

Use id={the-id-you-want}:

Transactions from an account with certain balance

Use account__balance__current__gt={value} . You'll need to use double underscores to get the current balance as the current field is nested with balance and account:

Account details for one of many account IDs

Use id__in={id1},{id2},{id3}:

Links with a certain external_id

Use external_id={id}:{id}