Skip to main content

Accessing data

Getting started

Once you've setup your account, you'll be able to access your data right away.

Head over to your dashboard and click on one of your Airtable bases. Scroll down to find a list of the tables in your base.

Tables

Next to each of them, you'll be able to quickly copy the base URL for each of the tables. The first time you request data from each of the tables, it will load the data in the cache. Subsiquent requests should be blazingly fast, globally. The TTL timer will start from this initial request.

Views

One of the more powerful features of Airtable is its ability to create views to filter and sort your data.

We strongly recommend that you utilise this feature, as it can...

  • decrease your payload,
  • make filtering faster, and
  • help protect or hide sensitive or non relevant data.

In order to fetch data from a view, you can simply append ?view= to the end of your URL.

When we cache data, we take this view into account.

Selecting fields

Just like in the Airtable API, you can further select the fields that you want to be returned in your response. Doing this will reduce the resulting payload size, speeding up the response and your application.

To do this, set the fields parameter to the end of your request, like ?fields=.

You are able to set multiple values by concatenating them with commas. For instance, if you want to return the Name, Date and Complete fields, you would use ?fields=Name,Date,Complete.

Per page

When requesting data, you can set how many records you want returned at a time.

The lower this number, the quicker the payload response. We recommend setting this as small as possible.

We do set a maximium page size at 100; however if you would like this changed, let us know.

You can set this by adding the per_page query parameter to your request, like ?per_page=100.

When we cache data, we take this setting into account.

Formulas

Not only are you able to use views to filter and sort the data in your response, you're also able to use Airtable formulas in your request.

Unless you're a wizard with Airtable formulas, I recommend that you use Airtable's forumla builder and tester before using this in production. However it is a very powerful tool that allows you to use the full range of your Airtable data.

You can set this by adding the filter query parameter to your request, like ?filter=<FORMULA>.

When we cache data, we take this setting into account.

Protection

By default, API routes are unprotected. If you want to secure them, you can go to your dashboard page, select on of your bases and click the 'Create token' button.

This will then generate a random UUID-based token string used to protected API calls to the base, and to the purge cache API endpoint.

In order to request the data, or purge the cache, you will need to include an Authorization header with a bearer token; ie. Bearer 1235-abced-etc.

When you create a token, the caches for the tables below it will be cleared.

URL structure

If you look at a API URL, you'll notice that it's broken down into a couple of parts. Here is an example URL:

https://airproxy.app/api/v1/data/64480431-d2e1-459b-baba-7f2c283b803x/Marketing/Forex

The URL can be broken down into these smaller parts.

  1. The first is the base url, https://airproxy.app/api/v1/data/.
  2. The second is your user ID, 64480431-d2e1-459b-baba-7f2c283b803x.
  3. The third is either your base ID or name, ie. Marketing.
  4. Finally, the last section is either your table ID or name, ie. Forex.