How to Filter Rows in using the Baserow API?

I am using the Baserow API to extract the data rows matching a boolean TRUE/FALSE flag in one of our database tables in Baserow.

Whatever I am trying, the filter condition for rows does not work. It always returns the all rows unfiltered. I went through your API Documentation already. Can you help?

Here is my API Call to extract all rows from a table that are flagged:


I also tried searching by Field ID instead of Field Name:

{“filter_type”: “AND”, “filters”: [{“field”: [FIELD_ID], “type”: “boolean”, “value”: “1”}]}

The result is always the same. The API Call returns ALL rows (100) instead of the rows to be filtered only (ca. 11).

Can you advise how to make this work?

Hi @artoflogic,

it looks like you are putting your filter in the request body, but it belongs in the query parameters too. So the key of the query string would be “filters” and the value of that query string will be the JSON you have in body (you will need to encode it).

Hope this helps:)

Thank you very much. After trying a bit more and fixing some typos, I now got it to work. The filter now is applied. Success!

Please note some possible typos:

  • Its “filters” not “filter” to input in the Key Field
  • Some quotation marks have a different format. E.g. “1” will not work. “1” will work.
  • I choose the option without field names as I am sometimes changing the field column labels
  • Best to double and triple check the Table Number and Field Number. Its very easy to mix them up with other tables.

My tip for anybody interested in filtering the API Results is to use the “Open Filters Parameters Builder” in your own custom API Docs.

Thank you @petrs

1 Like