Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Retrieve a record by fields

Topic Labels: API
1669 2
Showing results for 
Search instead for 
Did you mean: 

Hi, I’ve been working on a Next.js app with Airtable.

I’m trying to retrieve a single record by specifying the field (not reocrd ID provided by Airtabe).

I refered to the document below, but it only mentions the way of doing it by the record ID.

The code below is working fine, but I’d like to get a record by the specified column (eg. where “user_id” = 987813 ).

//export const getServerSideProps = async (context) => {
export async function getServerSideProps(context) {
    let todos = await table.find('rec1PDbe0ww22feo3');
    return {
        props: {
            initialTodos:  getMinifiedRecord(todos),


2 Replies 2

To get a specific record based on field values you need to get records for the table with filterByFormula. You will then get an array of only the records that match that condition.

Thanks for the reply.

Now I found the way to do it with select method, do you know if they have it with find method?

let todos = await{maxRecords: 1,filterByFormula: "NOT({email} = '')"}).firstPage();