PHPackages                             knut/airtable-php - 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. knut/airtable-php

ActiveLibrary[API Development](/categories/api)

knut/airtable-php
=================

The Airtable PHP library provides convenient access to the Airtable API using PHP.

08[2 issues](https://github.com/knut/airtable-php/issues)PHPCI failing

Since Jul 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/knut/airtable-php)[ Packagist](https://packagist.org/packages/knut/airtable-php)[ RSS](/packages/knut-airtable-php/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Airtable API PHP client
=======================

[](#airtable-api-php-client)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Convenient access to [Airtable](https://airtable.com/invite/r/4v89cs8n) data using PHP.

Requirements
------------

[](#requirements)

PHP 5.6.0 and later.

Installation
------------

[](#installation)

You can install the library via [Composer](https://getcomposer.org/). Run the following command:

```
composer require knut/airtable-php
```

Usage
-----

[](#usage)

### Creating a Client

[](#creating-a-client)

1. Register for an [Airtable](https://airtable.com/invite/r/4v89cs8n) account and find your API key here:
2. Create a new base and find your Base ID here:

> Your API key carries the same privileges as your user account, so be sure to keep it secret!

Now you can create your Airtable client:

```
$airtable = new \Airtable\Client($apiKey, $baseId);
```

### Finding Records

[](#finding-records)

Now you can query a set of records from a table in your base using the following syntax:

```
$records = $airtable->companies->find();
```

where `companies` is the name of your table in your Airtable base. Note how you can access all table by named properties on the Airtable client.

> Note that you can only request a maximimum of 100 records in a single query. To retrieve more records, use the "batch" feature below.

**Finding Records by View-name**

In Airtable you can create pre-defined filters in named [Views](https://support.airtable.com/hc/en-us/articles/202624989-Guide-to-views). This can be a very useful starting point for many queries as you don't have to specify all the filters in code, just reference a named View.

This is how you find records for a named View:

```
$records = $airtable->companies->find(['view' => 'Name of your view in Airtable']);
```

**Finding Records by Filtering Formula**

You can use a [Formula](https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference) to filter your records by code using the `filterByFormula` parameter.

In example to only include records where `website_url` isn't empty you can use:

```
$records = $airtable->companies->find([
    'filterByFormula' => "NOT({website_url} = '')"
]);
```

**Select only what you need**

Very often you don't need all the data in a result set. You can use the `fields` parameter to reduce the amount of data transferred.

For example, to only return data from `name` and `website_url`, specify these two field names in your parameters:

```
$records = $airtable->companies->find([
    'fields' => ['name', 'website_url']
]);
```

**Sorting**

You can specify a sort order, limit and offset as part of our query.

```
```

**Limit**

TBD

**Pagination**

TBD

### Batch Querying All Records

[](#batch-querying-all-records)

TBD

### Finding a Record

[](#finding-a-record)

Records can be queried by `id` using the `find` function on a table:

```
$company = $airtable->companies->find("rec3APJV3yRHlpHoA");
```

### Creating a Record

[](#creating-a-record)

Records can be created using the `create`function on a table:

```
$company = $airtable->companies->create([
    'name' => 'New Company',
    'website_url' => 'https://example.com',
]);
```

### Updating a Record

[](#updating-a-record)

Records can be updated using the `update` function on a table:

```
$company->name = 'An Updated Company';
$updatedRecord = $airtable->companies->update($company);
```

### Deleting a Record

[](#deleting-a-record)

Records can be deleted using the `delete` function on a table.

```
$result = $airtable->companies->delete($record);
```

Development
-----------

[](#development)

Get Composer. For example, on Mac OS:

```
brew install composer
```

Install dependencies:

```
composer install
```

Run the test suite using [`phpunit`](https://phpunit.de/)

```
$ ./vendor/bin/phpunit
```

Code coverage report is found in `build/coverage-report`.

Contributing
------------

[](#contributing)

1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/49418?v=4)[Knut Urdalen](/maintainers/knut)[@knut](https://github.com/knut)

---

Top Contributors

[![knut](https://avatars.githubusercontent.com/u/49418?v=4)](https://github.com/knut "knut (7 commits)")

### Embed Badge

![Health badge](/badges/knut-airtable-php/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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