Skip to main content

How to retrieve table column metadata?

  • November 7, 2017
  • 4 replies
  • 75 views

Forum|alt.badge.img+4

I’d like to retrieve types of columns in a table and their metadata, e.g. type, select options and colours.
Is there an API for this?

4 replies

Forum|alt.badge.img+19
  • Inspiring
  • 366 replies
  • November 7, 2017

There’s no metadata available at all. :frowning:


  • New Participant
  • 3 replies
  • November 9, 2017

@Chester_McLaughlin 's solution here is the best you will do:

I read his post, thought, wow, that seems like a terrible hack, but tried it, and got remarkably useful information out of it. An API, it is not.

I’d love to see a metadata API tho, it would make writing generic tools which interact with existing bases a whole lot easier.


Forum|alt.badge.img+3
  • New Participant
  • 3 replies
  • January 26, 2021

There’s now this: Accessing the metadata API.


  • New Participant
  • 2 replies
  • February 14, 2021

Hi!

I know is too late, but maybe somebody can use it. I need to access to the Column Metadata too, like to check the options in a selectable field. I’m using a workaround for that, and it is to perform a call to the Airtable Web API, the API that they use on the Airtable Web Client.

fetch(`https://airtable.com/v0.3/application/${baseId}/read`, {
    "headers": {
        "accept": "*/*",
        "x-airtable-application-id": baseId,
        "x-requested-with": "XMLHttpRequest",
        "x-time-zone": "Europe/Berlin",
        "x-user-locale": "us",
        "Cookie": `__Host-airtable-session=${AIRTABLE_SESSION}; __Host-airtable-session.sig=${AIRTABLE_SESSION_SIG};`
    }
})

You need to use a couple of cookies, but they seem to work fine for very long time. You can see more information in my GitHub: GitHub - xavivaldes/airtable-schema: Workaround to retrieve the Base schema from Airtable. Waiting for improvements on Metadata API.

Thank you!