Help

Re: Left Join / Lookup

279 0
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

3 Replies 3

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!

DJ, Lead Developer at BaseQL