Skip to main content
Solved

Search a column for a specific value using the API

  • March 26, 2024
  • 2 replies
  • 278 views

Forum|alt.badge.img+5

Hi,

I am new to Airtable coming from Xano and using Thunkable as my mobile front end.

In Xano I can create and API endpoint which will allow me to search for a specific value in a column in a table.  I see that I use the AirTable API to get a record but that is by record id.

If I wanted to search by a field, email address for example, how would I accomplish this?

Thanks

Steve

Best answer by rk4bir

 

You can search the list using fields. Let's say I have a table that contains columns `source,` `name,` etc. Now, I want to get a list using a query that matches the `source` field/column and returns the field name and source

Here's how to do it:

My Formula: IF(LOWER(source) = LOWER("query"), 1, 0)

Encoded URL (Use this tool to transform your request to an encoded URL):

https://api.airtable.com/v0/<base>/<table>?fields%5B%5D=source&fields%5B%5D=name&filterByFormula=IF(LOWER(source)+%3D+LOWER(%22query%22)%2C+1%2C+0)

 

Send a GET request, and it'll return the search result. I hope it helps!

 

2 replies

rk4bir
Forum|alt.badge.img+3
  • New Participant
  • 2 replies
  • Answer
  • March 26, 2024

 

You can search the list using fields. Let's say I have a table that contains columns `source,` `name,` etc. Now, I want to get a list using a query that matches the `source` field/column and returns the field name and source

Here's how to do it:

My Formula: IF(LOWER(source) = LOWER("query"), 1, 0)

Encoded URL (Use this tool to transform your request to an encoded URL):

https://api.airtable.com/v0/<base>/<table>?fields%5B%5D=source&fields%5B%5D=name&filterByFormula=IF(LOWER(source)+%3D+LOWER(%22query%22)%2C+1%2C+0)

 

Send a GET request, and it'll return the search result. I hope it helps!

 


Forum|alt.badge.img+5
  • Author
  • New Participant
  • 2 replies
  • March 26, 2024

 

You can search the list using fields. Let's say I have a table that contains columns `source,` `name,` etc. Now, I want to get a list using a query that matches the `source` field/column and returns the field name and source

Here's how to do it:

My Formula: IF(LOWER(source) = LOWER("query"), 1, 0)

Encoded URL (Use this tool to transform your request to an encoded URL):

https://api.airtable.com/v0/<base>/<table>?fields%5B%5D=source&fields%5B%5D=name&filterByFormula=IF(LOWER(source)+%3D+LOWER(%22query%22)%2C+1%2C+0)

 

Send a GET request, and it'll return the search result. I hope it helps!

 


Thanks for the information Will give it a shot!