Help

How to filter multiple columns using the AT API (CURL, FilterByFormula)

Topic Labels: API
Solved
Jump to Solution
2185 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Partnerships_Co
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi, I want to query and filter a table based on several filters sent via the URI as parameters.
I found the Airtable API doc suggesting that I use the AT API encoder and use FIlterByFormula.
I tried it and it all works perfectly. but for only one formula. meaning it only works for one column. but I have around 8 columns I want to query.
How can I add more than one FilterByFormula in the URI?

If the URI Looks like this:
https://api.airtable.com/v0/app0uHEtrxyWp3uzn/tbl1MB1FIAfGmnX4I?api_key=NULL&filterByFormula=REGEX_M...

how can I make it like:
https://api.airtable.com/v0/app0uHEtrxyWp3uzn/tbl1MB1FIAfGmnX4I?api_key=NULL&filterByFormula=REGEX_M...

And keep adding appending to it, This is me testing it on Postman.
Airtable API

When I try to add more than one Formula:
Airtable API 2

1 Solution

Accepted Solutions
Partnerships_Co
5 - Automation Enthusiast
5 - Automation Enthusiast

He @Vivid-Squid Thank you for the response.
I have figured it out.
Indeed you must use AND(). URI will be formed as follow:

filterByFormula=AND(expression1, expression2)
eg: …?filterByFormula=AND(SEARCH(“like”, “like me”), {price} > 100, …)

In case someone runs into the same issue.

See Solution in Thread

2 Replies 2

Hi @Partnerships_Content,
I do not know if you can have more than one filterbyformula in a URL. I think you need to place an AND() in your one formula.

This page will help you build out the proper URL: https://codepen.io/airtable/full/MeXqOg?baseId=appQQtcKJH671c8ga&tableId=tblxBd3hOHeysr9EY

Partnerships_Co
5 - Automation Enthusiast
5 - Automation Enthusiast

He @Vivid-Squid Thank you for the response.
I have figured it out.
Indeed you must use AND(). URI will be formed as follow:

filterByFormula=AND(expression1, expression2)
eg: …?filterByFormula=AND(SEARCH(“like”, “like me”), {price} > 100, …)

In case someone runs into the same issue.