PHPackages                             makina-corpus/nucliadb-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. makina-corpus/nucliadb-php-client

ActiveLibrary[API Development](/categories/api)

makina-corpus/nucliadb-php-client
=================================

PHP client for NucliaDB API

0.2.0(3y ago)18471[1 issues](https://github.com/makinacorpus/nucliadb-php-client/issues)[1 PRs](https://github.com/makinacorpus/nucliadb-php-client/pulls)MITPHPPHP &gt;=7.4

Since Sep 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/makinacorpus/nucliadb-php-client)[ Packagist](https://packagist.org/packages/makina-corpus/nucliadb-php-client)[ RSS](/packages/makina-corpus-nucliadb-php-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

NucliaDB PHP Client.
====================

[](#nucliadb-php-client)

Disclaimer : This library still in development. It had been setup in order to develop some PHP CMS specific modules, while keeping in common any possible part of code. At this state, the library implements only a small subset of the web api calls. Feel free to PR unimplemented ones to make this lib grow up. Some useful contributors' documentation can be found in this repository's [docs/contributors](docs/contributors) directory.

Usage
=====

[](#usage)

Initialize client API
---------------------

[](#initialize-client-api)

```
use Nuclia\ApiClient;

$token = '';
$kbid = '';
$zone = ''; //Such as 'europe-1'

$apiClient = new ApiClient($zone, $token, $kbid);
```

Using search API
----------------

[](#using-search-api)

The search API aims to reflect [NucliaDB search web API](https://docs.nuclia.dev/docs/api#tag/Search)

### Create a search API instance

[](#create-a-search-api-instance)

```
$searchApi = $apiClient->createSearchApi();
```

### Run a simple full text search

[](#run-a-simple-full-text-search)

```
use Nuclia\Query\SearchQuery;

$response = $searchApi->search((new SearchQuery())->setQuery('you+shall+not+pass'));
```

`$response` returns an instance of [Symfony HTTP Client response](https://symfony.com/doc/current/http_client.html#basic-usage)

Using resources API
-------------------

[](#using-resources-api)

The resources API aims to reflect [NucliaDB resources web API](https://docs.nuclia.dev/docs/api#tag/Resources)

### Create a resource API instance

[](#create-a-resource-api-instance)

```
$resourcesApi = $apiClient->createResourcesApi();
```

### Get resource.

[](#get-resource)

```
use Nuclia\Query\GetResourceQuery;

$rid = ''
$response = $resourcesApi->getResource($rid,(new GetResourceQuery()
    ->setShow(EnumArray::show([ShowEnum::VALUES, ShowEnum::BASIC]))
);
```

### Create resource.

[](#create-resource)

```
$response = $resourcesApi->createResource([
  'title' =>  'The Fellowship of the Ring',
  'links' => [
    'link-1' => [
      'uri' => 'https://en.wikipedia.org/wiki/The_Lord_of_the_Rings:_The_Fellowship_of_the_Ring'
    ]
  ]
]);
```

### Update resource.

[](#update-resource)

```
$rid = ''
$response = $resourcesApi->modifyResource(
  $rid,
  [
  'title' =>  'The Fellowship of the Ring (Updated)',
  'links' => [
    'link-1' => [
      'uri' => 'https://www.rottentomatoes.com/m/the_lord_of_the_rings_the_fellowship_of_the_ring'
    ]
  ]
]);
```

### Delete resource.

[](#delete-resource)

```
$rid = ''
$resourcesApi->deleteResource($rid);
```

Using resource fields API
-------------------------

[](#using-resource-fields-api)

The resource fields API aims to reflect [NucliaDB resource fields web API](https://docs.nuclia.dev/docs/api#tag/Resource-fields)

### Create a resource fields API instance

[](#create-a-resource-fields-api-instance)

```
$resourceFieldsApi = $apiClient->createResourceFieldsApi();
```

### Upload a binary File as a resource field

[](#upload-a-binary-file-as-a-resource-field)

```
$body = file_get_contents('The-Fellowship-Of-The-Ring.jpg', 'r');
$md5 = md5($body);
$rid = ''
$fieldId = '' // A free string used to identify your file field in resource.

$response = $resourceFieldsApi->uploadBinaryFile($rid, $fieldId, $body, (new UploadBinaryFileHeaders())->setMd5($md5));
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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 ~13 days

Total

3

Last Release

1309d ago

PHP version history (2 changes)0.0.0PHP &gt;=8.1

0.2.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/24b01c76ce2ea2bae613a3fdd58728be2650480bd264f8c848538c7b7e7a50dd?d=identicon)[slavielle](/maintainers/slavielle)

### Embed Badge

![Health badge](/badges/makina-corpus-nucliadb-php-client/health.svg)

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

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[storyblok/php-content-api-client

PHP Client for Storyblok Content API

11136.8k4](/packages/storyblok-php-content-api-client)[storyblok/php-management-api-client

Storyblok PHP Client for Management API

1224.4k1](/packages/storyblok-php-management-api-client)[smnandre/pagespeed-api

PageSpeed Insight PHP Api Client 🚀 Analyse web pages for performances metrics, core web vitals...

1511.5k](/packages/smnandre-pagespeed-api)

PHPackages © 2026

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