PHPackages                             guym4c/airtable-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. guym4c/airtable-client

ActiveLibrary[API Development](/categories/api)

guym4c/airtable-client
======================

PHP Airtable API client

v4.0.0(5y ago)102.0k1MITPHPCI failing

Since Jul 9Pushed 5y ago2 watchersCompare

[ Source](https://github.com/guym4c/airtable-client)[ Packagist](https://packagist.org/packages/guym4c/airtable-client)[ Docs](https://github.com/guym4c/airtable-client)[ RSS](/packages/guym4c-airtable-client/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (5)Versions (26)Used By (0)

`airtable-client`[![](https://camo.githubusercontent.com/32ca1a43d3868a150e5d7c685bf1b13b2238bfca16a3707f2cbf7bc41ecd9197/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6775796d34632f6169727461626c652d636c69656e742e737667)](https://camo.githubusercontent.com/32ca1a43d3868a150e5d7c685bf1b13b2238bfca16a3707f2cbf7bc41ecd9197/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6775796d34632f6169727461626c652d636c69656e742e737667)
==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#airtable-client)

A modern PHP API client for Airtable.

Install
=======

[](#install)

via Composer:

```
composer require guym4c/airtable-client
```

Usage
=====

[](#usage)

Get yourself an instance of the client:

```
$airtable = new \Guym4c\Airtable\Airtable(/* YOUR API KEY */, /* YOUR BASE ID */);
```

You can now access CRUD (create, read, update, delete) operations on the tables in your base.

```
$airtable->get($table, $recordId);
$airtable->create($table, $jsonArray);
$airtable->update($record /* more on this below */); // you may pass an additional boolean as TRUE for a destructive update
$airtable->delete($table, $recordId); // returns a boolean - whether deletion was successful
```

Records
-------

[](#records)

The client will provide an instance of a `Record` after Get, Create and Update operations. `Record` exposes getters for the table it is in, its Airtable ID, the JSON data array, and the time that it was fetched from Airtable.

You can also access fields in the record as properties of the `Record`:

```
$myField = $record->field;
```

Where your Airtable field names have spaces in, you can use the curly brace syntax - `$record->{'field name with spaces'};`.

Fields that relate to other tables in the base are automatically detected. If you are accessing the field as a property, the client does not know which table the relation is directed towards, and will return you a `Loader` that you can pass the table name to and resolve the relation.

```
$relatedRecord = $record->field->load('relatedTable');
```

You can also just call `$record->load($field, $table);` to get straight to the related record.

Listing records
---------------

[](#listing-records)

You can get more than 1 record by calling `$airtable->list($table)`. You can filter these results by passing an extra `Filter` parameter - see your base's API docs for details on what the properties of `Filter` do.

There are two filter shorthand methods: `search($table, $field, $value)` and `find($table, $field, $value)`. `search()` performs an Airtable search for `$value` in `$table`.`$field`, and as such will return substring matches. `find()` will only return exact matches.

As `list()` results are paginated, `list()` returns the completed `Request` object to you. You can then either get the list of `Record`s that were fetched using `getRecords()`, or move to the next page using `nextPage()`. Bear in mind that the page pointer will eventually reset on Airtable's end.

Batch jobs
----------

[](#batch-jobs)

`$airtable->createAll()` and `$airtable->updateAll()` allow requests to be batched. You can pass as many arrays and records to these methods respectively, and the client will use batch requests to create them all.

Rate limits
-----------

[](#rate-limits)

Airtable's API is rate-limited to 5 queries per second. If you exceed this limit, the client will throttle requests, blocking as it does. If this rate is exceeded on Airtable's end and you are put into the 30-second penalty box, calls to the API will raise an exception.

### Caching

[](#caching)

Commonly, you may have some tables within your base where data is more stagnant. To prevent these from affecting your rate limit, you may provide the client constructor an implementation of the [Doctrine Cache](https://www.doctrine-project.org/projects/doctrine-cache/en/1.8/index.html) interface, and an array of tables you consider 'cachable'.

```
$airtable = new \Guym4c\Airtable\Airtable($apiKey, $baseId, $cache, ['cachable_table_one', 'cachable_table_two']);
```

The client will respond to requests that have no filters or sorts applied from the cache, and attempt to respond to `get()`, `search()` and `find()` too. You can clear the cache by calling the client's `flushCache()` method. A table's cache will also be dropped when records are created, modified or deleted by the client.

Cachable tables must have less than 101 records, as the client will not cache tables that Airtable paginates.

Advanced
--------

[](#advanced)

The client constructor exposes additional parameters for advanced usage.

```
public function __construct(
    string $key,
    string $baseId,
    ?CacheProvider $cache = null,
    array $cachableTables = [],
    ?string $apiEndpoint = null,
    array $headers = [],
    bool $isRateLimited = true
) {
```

- `$key` (required): API key
- `$baseId` (required): Airtable base ID
- `$cache`: Doctrine Cache instance
- `$cachableTables`: Tables that are cached by the client
- `$apiEndpoint`: An API endpoint to use as an alternative to the official Airtable API endpoint. Must include the version path.
- `$headers`: Associative array of headers to append to requests
- `$isRateLimited`: Whether to enforce the Airtable rate limit (default `true`)

If you are using the client across multiple applications, you may come up against the rate limit if your clients all attempt to contact Airtable at once. The last three constructor parameters are provided to enable you to proxy requests to Airtable through a central throttle.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 98% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~68 days

Total

23

Last Release

2003d ago

Major Versions

v0.1.3 → v1.02019-07-21

v1.3.3 → v2.0.02019-11-23

v2.4.2 → v3.0.02020-12-22

v3.0.0 → v4.0.02020-12-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2103489?v=4)[Guy Mac](/maintainers/guym4c)[@guym4c](https://github.com/guym4c)

---

Top Contributors

[![guym4c](https://avatars.githubusercontent.com/u/2103489?v=4)](https://github.com/guym4c "guym4c (49 commits)")[![ricklambrechts](https://avatars.githubusercontent.com/u/1367665?v=4)](https://github.com/ricklambrechts "ricklambrechts (1 commits)")

---

Tags

apiclientairtable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/guym4c-airtable-client/health.svg)

```
[![Health](https://phpackages.com/badges/guym4c-airtable-client/health.svg)](https://phpackages.com/packages/guym4c-airtable-client)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k8.8M83](/packages/openai-php-laravel)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[resend/resend-php

Resend PHP library.

596.2M35](/packages/resend-resend-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

72287.1k1](/packages/mozex-anthropic-laravel)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
