I’m working on a project where users need to connect their Airtable account and select which table they want to use. The user already gives me their API key, but I can’t figure out how to get a complete list of all tables in their workspace.
I know the standard API endpoints require both the base ID and table name in the URL. However, the official documentation only shows examples for working with specific tables once you already know their names.
What I need is an endpoint or method that returns all available tables, so my users can choose from a dropdown menu. Is this possible with the current API? If so, what’s the correct way to make this request?
I’ve tried looking through the API reference but couldn’t find anything about listing tables programmatically.
Hit this exact problem 6 months back building an internal sync tool. Metadata API’s your best bet, but there’s some stuff others missed.
You can’t use personal access tokens - OAuth only. Total pain to set up, but that’s Airtable for you.
Once OAuth’s working, it’s pretty simple:
- GET
/v0/meta/bases for all their bases
- Loop through and GET
/v0/meta/bases/{baseId}/tables for each
- Parse table names and IDs for your dropdown
Huge tip - metadata responses are bloated as hell. They dump every field type, validation rule, view config, you name it. If you just want table names for a dropdown, strip everything else before storing. I was hitting memory walls until I cleaned up my response parsing.
Watch the rate limits too. Metadata API’s stricter than regular endpoints. I threw in a 200ms delay between base calls and never had problems after.
yep, airtable api is a bit tricky. u gotta use the metadata api to get the base schema and extract the table names from there. not the easiest, but it does the job.
Hit this exact issue last month building something similar. The metadata API approach works, but here’s the catch - you need the base ID before fetching tables. If users don’t know their base IDs, call https://api.airtable.com/v0/meta/bases first to list all bases, then iterate through for tables. OAuth’s way more complex than API keys, so heads up there. Cache the table data since metadata calls eat into your rate limits and table structures rarely change. Response format’s clean though - each table gives you ID, name, and description, perfect for dropdowns.
Yeah, the Metadata API is what you want, but it needs extra setup. You’ll have to use OAuth auth instead of just an API key to get schema info. Once you’re authenticated, hit https://api.airtable.com/v0/meta/bases/{baseId}/tables with a GET request. This gives you everything about your tables - names, field configs, views, the works. The response has a tables array with each table’s ID and name for your dropdown. Just heads up - this endpoint has different rate limits than the regular data API, so throttle your requests if you’re pulling from multiple bases.
Just went through this too - OAuth setup’s a pain but totally worth it. Heads up: the metadata endpoint can timeout on larger workspaces, so throw in some error handling. Also watch out for users with empty bases or missing table permissions.