PHPackages                             juanbenitez/supabase-api - 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. juanbenitez/supabase-api

ActiveLibrary[API Development](/categories/api)

juanbenitez/supabase-api
========================

Minimal PHP implementation of the Supabase API.

42[2 PRs](https://github.com/juanbenitez/supabase-api/pulls)PHP

Since Jul 3Pushed 2y ago2 watchersCompare

[ Source](https://github.com/juanbenitez/supabase-api)[ Packagist](https://packagist.org/packages/juanbenitez/supabase-api)[ RSS](/packages/juanbenitez-supabase-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

A minimal PHP implementation of the Supabase API (WIP)
======================================================

[](#a-minimal-php-implementation-of-the-supabase-api-wip)

[![Latest Version on Packagist](https://camo.githubusercontent.com/612e40a8d3d5b618aa8a67fb208e4ce3311c363070b7baa87a876037116254c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75616e62656e6974657a2f73757061626173652d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juanbenitez/supabase-api)[![Tests](https://github.com/juanbenitez/supabase-api/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/juanbenitez/supabase-api/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/40c624f50721938effc498c8e7350f1bc415306758559a9e96ef5a9de2785845/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a75616e62656e6974657a2f73757061626173652d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juanbenitez/supabase-api)

This is a minimal PHP implementation of the [Supabase API](https://supabase.com/docs/guides/api) wich is supported by [PostgREST](https://postgrest.org/en/stable/index.html). It contains only the methods I needed. However, I'm open to PRs that add extra methods to the client.

Supabase-api is built with help of the awesome [Saloon](https://docs.saloon.dev/) package.

**Be aware that is a work in progress, it's in pre-alpha state, use it at your own risk.**

Here are a few examples on how you can use the package:

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

[](#installation)

You can install the package via composer:

```
composer require juanbenitez/supabase-api
```

Usage
-----

[](#usage)

Define a request class for a table in your DB.

```
use Juanbenitez\SupabaseApi\Request\ReadRowsRequest;

class UsersReadRowsRequest extends ReadRowsRequest
{
    protected ?string $table = 'users';
}
```

```
$connector    = new SupabaseConnector('https://testbaseurl.supabase.co/rest/v1/', 'TEST_SUPABASE_SERVICE_KEY');
$usersRequest = $connector->request(new UsersReadRowsRequest());

$usersRequest->select(['last_name', 'first_name', 'age'])
            ->where('age', '18')
            ->orderBy('created_at', 'desc')
            ->limit(5);

$response = $usersRequest->send();
$response->throw();

echo "status:". $response->status() . PHP_EOL;
print_r ($response->json());
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Juan Benitez](https://github.com/juanbenitez)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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://www.gravatar.com/avatar/487a162039743962716643523cd698811bd71b15e92d20eea96fa0b58b112447?d=identicon)[juanbenitez](/maintainers/juanbenitez)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![juanbenitez](https://avatars.githubusercontent.com/u/2771799?v=4)](https://github.com/juanbenitez "juanbenitez (5 commits)")

---

Tags

apiphppostgresqlpostgrestsupabase

### Embed Badge

![Health badge](/badges/juanbenitez-supabase-api/health.svg)

```
[![Health](https://phpackages.com/badges/juanbenitez-supabase-api/health.svg)](https://phpackages.com/packages/juanbenitez-supabase-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M271](/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)
