Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Re: Left Join / Lookup

1746 1
cancel
Showing results for 
Search instead for 
Did you mean: 
George_Nelson
4 - Data Explorer
4 - Data Explorer

Hello,

I’m trying to understand the AT API when it comes to getting the values of a linked table.

For example, in Table one I have the following fields:
ID
Entity Name
List of Part IDs

In Table 2 I have the following fields:
ID
Part Number
Part Name

So when I create the URL to pull the values in Table 1, how do I “lookup” and show the Part Number and Part Name from Table 2 for each Part ID in Table 1?

I’m new to Airtable, and have spent hours and hours trying to figure this out, but so far have been unsuccessful. All help will be greatly appreciated.

Thanks,
George

4 Replies 4

Hi George, and welcome to the community!

The API doesn’t expose data in its linked form; it provides only the raw data. As such, you must perform all of the relational logic in the script environment; ergo - you must request both tables - the primary and related linked table and then mash them together.

Yeah, that sucks, right?

The only way I have been able to overcome this is to enhance the API with a logical GraphQL layer and that’s a lot of work. One client of mine was building so many API integrations with many developers that a GraphQL layer actually made practical financial sense. But if it’s just you and two related tables, strap in and enjoy the wild ride building a process that iterates across the primary table and uses the record IDs exposed in the linked fields to match up with the secondary table.

Thanks @Bill.French. Not the answer I was hoping for. LOL. At least I know I wasn’t crazy. GraphQL is beyond my current experience, so based on your explanation think I’ll go a different route. :frowning:

Thanks again!

djseeds
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey George (and anyone else who might find this helpful),

I know this thread is from 2022, but for anyone still trying to solve this in 2024 and beyond, I wanted to share an updated resource. Like Bill mentioned, Airtable’s API requires pulling data from linked tables separately and merging it manually.

If you're still facing this issue, I’ve written an article that walks through both approaches: one using Airtable’s API and another using a GraphQL layer (like BaseQL) that makes it much easier to query linked records directly. You can check it out here: Cross-Table Joins with Airtable API.

Hope this helps anyone still searching for a solution!

djseeds
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi GabyTango (and anyone else who might be tackling this now),

I know this post is from back in February, but for anyone else running into the same problem, I thought I’d add some extra info.

As kuovonne explained, the Airtable REST API limits you to retrieving data from one table at a time, so you’d need to make multiple requests and manually combine the data from linked records.

For anyone still looking for a more efficient solution, a GraphQL API like BaseQL might be useful. It allows you to query across multiple tables in a single request—similar to SQL joins—making it much easier to work with linked records.

Here’s a guide I wrote on handling cross-table joins with Airtable that could be helpful: Cross-Table Joins with Airtable API.

Hopefully this helps anyone else facing this issue!