Airtable API

Airtable is best tool to organize the data into tabular form. So, if you want to access Airtable data with API then you can build Airtable API without any code and server.

Overview

Base Endpoint

For Airtable API, the format of your endpoint ⤵️

https://v1.nocodeapi.com/<username>/airtable/<token>

- username- your nocodeapi username.

- token- every api have unique token. See your API card when you setup API.

API Error Codes:

If your query fails, API will return a 3-digit error-code and info as plain text

Error response example: If you provide a invalid key or do not send one, you will be responded with Unauthorised Access in below format.

{
    "error": 1,
    "code": 401,
    "info": "Unauthorized"
}

Common API Errors:

Code Info [affected API endpoints]
200 (OK)Standard response for successful GET, POST, UPDATE & DELETE
400 (Bad Request)Error response when creating (POST) or updating (UPDATE, DELETE).
401 (Unauthorized)Error response when wrong or invalid API key
402 (Payment Required)Returned if pro feature is tried to be accessed from free account
403 (Forbidden)Error response when action is forbidden by the user (API owner)
404 (No such route) Route is not valid or query params is in-valid.
429 (Rate limit exceeded)Your API request limit exceeded per month.
500 (Server error)Server error

API Endpoints

Get All Records

Make the GET request on below endpoint with tableName query param and you will get all records

https://v1.nocodeapi.com/<username>/airtable/<token>?tableName=<tableName>

- API Response:

{
    "records": [
        {
            "id": "rec2CO7nLufSs5pKx",
            "fields": {
                "title": "Example",
                "website": "https://example.com"
            },
            "createdTime": "2020-02-13T09:15:15.000Z"
        },
        {},
        {}
    ]
}

- Request Parameters:

ObjectDescription
tableName[Required] Name of your Airtable base table.
view[optional] By default is Grid view
perPage[optional] Total number of records you want in one request.(0-100). *PRO users can get more than 100 records or pass 'all' to get all.. Just pass perPage=all
offset[optional] To get next page records.
sortBy[optional] Field Name by which you wanna sort the response
sortDirection[optional] Sort the responce ascending or descending order
filterByFormula[optional] A formula used to filter records. Here is list of formulas

- Code Examples

const axios = require('axios');
    
axios({
    method: 'get',
    url: 'https://v1.nocodeapi.com/<username>/airtable/<token>', 
    params: {tableName: '<tableName>'},
}).then(function (response) {
        // handle success
        console.log(response);
}).catch(function (error) {
        // handle error
        console.log(error);
})

Get Single Record

Make the GET request on below endpoint with tableName & id query param and you will get single record.

https://v1.nocodeapi.com/<username>/airtable/<token>?tableName=<tableName>&id=<record_id>

- API Response:

{
    "id": "rec2CO7nLufSs5pKx",
    "fields": {
        "title": "Example",
        "website": "https://example.com"
    },
    "createdTime": "2020-02-13T09:15:15.000Z"
}

- Request Parameters:

ObjectDescription
tableName[Required] Name of your Airtable base table.
id[Required] Record ID.

- Code Examples

const axios = require('axios');
    
axios({
    method: 'get',
    url: 'https://v1.nocodeapi.com/<username>/airtable/<token>', 
    params: {tableName: '<tableName>',id: '<record_id>'},
}).then(function (response) {
        // handle success
        console.log(response);
}).catch(function (error) {
        // handle error
        console.log(error);
})

Create Records

Make POST requeston below endpoint with array of object or objects you want to create into your Airtable table.

https://v1.nocodeapi.com/<username>/airtable/<token>?tableName=<tableName>

[Required] body row array format ⤵️

[
    {
        "title": "Example 2",
        "website": "https://example2.com"
    }
]

- Code Examples

const axios = require('axios');
    
axios({
    method: 'post',
    url: 'https://v1.nocodeapi.com/<username>/airtable/<token>', 
    params: {tableName: '<tableName>'},
    data: [{"title":"Example 2","website":"https://example2.com"}]
}).then(function (response) {
        // handle success
        console.log(response);
}).catch(function (error) {
        // handle error
        console.log(error);
})

Update Records

Make PUT request on below endpoint with array of object or objects you want to update into your Airtable table.

https://v1.nocodeapi.com/<username>/airtable/<token>?tableName=<tableName>

[Required] body row array format ⤵️

[
    {
        "id": "rec2CO7nLufSs5pKx",
        "fields": {
            "title": "New Example 2",
            "website": "https://example2.com"
        }
    }
]

- Code Examples

const axios = require('axios');
    
axios({
    method: 'put',
    url: 'https://v1.nocodeapi.com/<username>/airtable/<token>', 
    params: {tableName: '<tableName>'},
    data: [{"id":"rec2CO7nLufSs5pKx","fields":{"title":"New Example 2","website":"https://example2.com"}}]
}).then(function (response) {
        // handle success
        console.log(response);
}).catch(function (error) {
        // handle error
        console.log(error);
})

Delete Records

Make DELETE request on below endpoint with array of record IDs you want to delete records into your Airtable table.

https://v1.nocodeapi.com/<username>/airtable/<token>?tableName=<tableName>

[Required] body row array format ⤵️

[
    "rec2CO7nLufSs5pKx",
    "rec40zVHDN4nW4jVu"
]

- Code Examples

const axios = require('axios');
    
axios({
    method: 'delete',
    url: 'https://v1.nocodeapi.com/<username>/airtable/<token>', 
    params: {tableName: '<tableName>'},
    data: ["recI3bT7iVPg6DSfE","rec40zVHDN4nW4jVu"]
}).then(function (response) {
        // handle success
        console.log(response);
}).catch(function (error) {
        // handle error
        console.log(error);
})