Help

Search for data using filterByFormula

Topic Labels: API
5897 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Mohammad_Hashem
4 - Data Explorer
4 - Data Explorer

Hi,

I have a table with a column called Last Name. I want to search for all rows which the last name, for example, contains riva. Then it would have to return rows for the last names Trivax and Trivedi for example.

I use the following cURL command:

curl "https://api.airtable.com/v0/appXXX/MyTable?maxRecords=3&filterByFormula='SEARCH('riva', {Last Name})'" -H "Authorization: Bearer MyAPIKey"

But it doesn’t work. I also have tried replacing { and } and space with proper url encoding, but still no luck. Any suggestion how the cURL command for this should be written?

Thanks

1 Reply 1
Andrew_Johnson1
8 - Airtable Astronomer
8 - Airtable Astronomer

The field type of “last name” should be of type “single line text” or “Long text”.
Have you tried using the formula directly in your base, by creating a test field?
Does it work fine then, or are you getting an error?

Also the “{” and “}” symbol also has to be URL encoded.
So it would look something like

filterByFormula=SEARCH(‘riva’%2C+%7BLast+Name%7D)