PHPackages                             mbvienasbaitas/strapi-php-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. mbvienasbaitas/strapi-php-client

ActiveLibrary[API Development](/categories/api)

mbvienasbaitas/strapi-php-client
================================

PHP Client wrapper for Strapi API.

1.0.0(3y ago)52.7k↓33.3%1[1 PRs](https://github.com/mbvienasbaitas/strapi-php-client/pulls)1MITPHPPHP ^8.1

Since Jan 23Pushed 3y agoCompare

[ Source](https://github.com/mbvienasbaitas/strapi-php-client)[ Packagist](https://packagist.org/packages/mbvienasbaitas/strapi-php-client)[ RSS](/packages/mbvienasbaitas-strapi-php-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (1)

Strapi PHP Client library
=========================

[](#strapi-php-client-library)

[![Latest Version on Packagist](https://camo.githubusercontent.com/117160258b6b6c172a9f4eac58f7610b847e03a8430bbd0ac803a40812336733/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d627669656e61736261697461732f7374726170692d7068702d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mbvienasbaitas/strapi-php-client)[![Test Status](https://camo.githubusercontent.com/a96cde7c9dfbef429df2f840098bd1bfb55208526e24145e7ff4802eb0afc1aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d627669656e61736261697461732f7374726170692d7068702d636c69656e742f72756e2d74657374732e79616d6c3f6c6162656c3d7465737473266272616e63683d6d61696e)](https://camo.githubusercontent.com/a96cde7c9dfbef429df2f840098bd1bfb55208526e24145e7ff4802eb0afc1aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d627669656e61736261697461732f7374726170692d7068702d636c69656e742f72756e2d74657374732e79616d6c3f6c6162656c3d7465737473266272616e63683d6d61696e)[![Total Downloads](https://camo.githubusercontent.com/63a9a414ead2a9b7243f8f9342ddfc1319c555407bcd4ad0d84950b6aabdbc50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d627669656e61736261697461732f7374726170692d7068702d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mbvienasbaitas/strapi-php-client)

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

[](#installation)

To get started, simply require the project using [Composer](https://getcomposer.org/).
You will also need to install packages that "provide" [`psr/http-client-implementation`](https://packagist.org/providers/psr/http-client-implementation) and [`psr/http-factory-implementation`](https://packagist.org/providers/psr/http-factory-implementation).
A list with compatible HTTP clients and client adapters can be found at [php-http.org](http://docs.php-http.org/en/latest/clients.html).

**If you don't know which HTTP client to use, we recommend using Guzzle 7**:

```
composer require mbvienasbaitas/strapi-php-client guzzlehttp/guzzle http-interop/http-factory-guzzle:^1.0
```

Usage
-----

[](#usage)

```
use MBVienasBaitas\Strapi\Client\Client;
use MBVienasBaitas\Strapi\Client\Contracts\Requests\Collection\IndexRequest;
use MBVienasBaitas\Strapi\Client\Contracts\Requests\Options\OptionLocale;
use MBVienasBaitas\Strapi\Client\Contracts\Requests\Options\OptionSortAsc;

$client = new Client('{url}', '{token}');

$request = IndexRequest::make(
    new OptionLocale('en'),
    new OptionSortAsc('title'),
);

$endpoint = $client->collection('articles');

$response = $endpoint->index($request);
```

More usage examples can be found in [examples](examples) folder.

### Available request options

[](#available-request-options)

Each request can accept multiple options. Here is a list of all available options.

OptionDescription[OptionFields](src/Contracts/Requests/Options/OptionFields.php)Defines which fields to load.[OptionFilters](src/Contracts/Requests/Options/OptionFields.php)Applies specified filters.[OptionId](src/Contracts/Requests/Options/OptionFields.php)Sets active resource ID.[OptionJsonBody](src/Contracts/Requests/Options/OptionFields.php)Ads application/json body from a given array.[OptionLocale](src/Contracts/Requests/Options/OptionFields.php)Sets resource locale.[OptionPaginationOffset](src/Contracts/Requests/Options/OptionFields.php)Offset based pagination.[OptionPaginationPaged](src/Contracts/Requests/Options/OptionFields.php)Page based pagination.[OptionPopulateDeep](src/Contracts/Requests/Options/OptionFields.php)Sets populate option, requires `strapi-plugin-populate-deep` plugin to be installed in strapi build.[OptionPopulateNested](src/Contracts/Requests/Options/OptionFields.php)Defines which relations to load.[OptionPopulateWildcard](src/Contracts/Requests/Options/OptionFields.php)Loads all first level relations.[OptionPublicationStateLive](src/Contracts/Requests/Options/OptionFields.php)Set publication state to `live`.[OptionPublicationStatePreview](src/Contracts/Requests/Options/OptionFields.php)Set publication state to `preview`.[OptionSort](src/Contracts/Requests/Options/OptionFields.php)Define sorting options.[OptionSortAsc](src/Contracts/Requests/Options/OptionFields.php)Set single field sort in ascending order.[OptionSortDesc](src/Contracts/Requests/Options/OptionFields.php)Set single field sort in descending order.[OptionStreamBody](src/Contracts/Requests/Options/OptionFields.php)Set custom stream body, mainly used for media uploads.Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Credits
-------

[](#credits)

- [Edvinas Kručas](https://github.com/edvinaskrucas)
- [All Contributors](../../contributors)

This package structure was inspired by [meilisearch-php](https://github.com/meilisearch/meilisearch-php) package.

Alternatives
------------

[](#alternatives)

- [curl](https://docs.strapi.io/developer-docs/latest/developer-resources/content-api/integrations/php.html)
- [kazakevic/strapi-wrapper](https://github.com/kazakevic/strapi-wrapper)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1202d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0802c23b9fd902a5c8a571164693f46ae1c83e0b2c470941f3ca8d5f146c41d?d=identicon)[edvinaskrucas](/maintainers/edvinaskrucas)

---

Top Contributors

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

---

Tags

clientstrapi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mbvienasbaitas-strapi-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/mbvienasbaitas-strapi-php-client/health.svg)](https://phpackages.com/packages/mbvienasbaitas-strapi-php-client)
```

###  Alternatives

[openai-php/client

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

5.8k22.6M232](/packages/openai-php-client)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221516.6k3](/packages/codedredd-laravel-soap)[dhope0000/lxd

PHP-based API wrapper for LXD REST API.

136.2k](/packages/dhope0000-lxd)[brd6/notion-sdk-php

Notion SDK for PHP

5918.0k](/packages/brd6-notion-sdk-php)

PHPackages © 2026

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