PHPackages                             dotsplatform/search-api-sdk - 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. dotsplatform/search-api-sdk

ActiveLibrary

dotsplatform/search-api-sdk
===========================

SDK for the Dots search service: item search index ingest and querying.

v1.0.0(today)00MITPHPPHP ^8.2|^8.3|^8.4|^8.5

Since Aug 14Pushed todayCompare

[ Source](https://github.com/dotsplatform/search-api-sdk-laravel)[ Packagist](https://packagist.org/packages/dotsplatform/search-api-sdk)[ RSS](/packages/dotsplatform-search-api-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (3)Used By (0)

search-api-sdk
==============

[](#search-api-sdk)

SDK for the Dots `search` service (DEV-18541): pushing item documents into the search index and running company-scoped item searches.

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

[](#installation)

```
composer require dotsplatform/search-api-sdk
```

Environment variables (the config is auto-discovered, publish it with `php artisan vendor:publish --tag=config` if needed):

```
RESOURCES_SEARCH_EXTERNAL_HOST=https://search-lambda.dotsdev.live
SEARCH_INTERNAL_GATEWAY_TOKEN=...

```

Bind the interface in the consumer's `AppServiceProvider::$bindings`:

```
use Dotsplatform\SearchApiSdk\Client\SearchClient;
use Dotsplatform\SearchApiSdk\Client\SearchHttpClient;

public array $bindings = [
    SearchClient::class => SearchHttpClient::class,
];
```

Tests can bind `SuccessSearchStubClient` / `FailSearchStubClient`.

Usage
-----

[](#usage)

```
use Dotsplatform\SearchApiSdk\Client\SearchClient;
use Dotsplatform\SearchApiSdk\DTO\Params\SearchItemDocumentParams;
use Dotsplatform\SearchApiSdk\DTO\Params\SearchItemsQueryParams;
use Dotsplatform\SearchApiSdk\DTO\Params\StoreSearchItemsParams;

// Ingest (batches of up to 500 documents).
$client->upsertItems($companyId, StoreSearchItemsParams::fromArray([
    'accountId' => $accountId,
    'items' => [
        SearchItemDocumentParams::fromArray([
            'id' => $dishToken,
            'categoryId' => $categoryToken,
            'status' => 1,
            'popular' => true,
            'priority' => 10,
            'price' => 250,
            'externalId' => '12345',
            'names' => ['ua' => 'Піца Маргарита', 'en' => 'Pizza Margherita'],
            'excerpts' => ['ua' => 'Томати і моцарела'],
            'descriptions' => ['ua' => 'Класична італійська піца'],
        ]),
    ],
]));

$client->deleteItems($companyId, [$dishToken]);
$client->purgeCompany($companyId);

// Search — returns ranked ids; hydrate full item data from your own DB.
$result = $client->search($companyId, SearchItemsQueryParams::fromArray([
    'q' => 'маргарита',
    'provider' => 'eloquent',
    'fields' => ['name', 'excerpt'],
    'langScope' => 'all',
    'statuses' => [1],
    'limit' => 20,
    'offset' => 0,
]));

$ids = $result->getIds();
$total = $result->getTotal();
```

Errors (transport failures and every HTTP status &gt;= 400) throw `SearchApiException` with the decoded error envelope in `getErrors()`.

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

[](#development)

```
composer install
composer init-pre-commit
vendor/bin/phpunit
vendor/bin/phpstan analyse --memory-limit=2G
vendor/bin/php-cs-fixer fix
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d9e72f4aaec1eb6f15b12504604863656c73ba4d536d2d090e414d8ce563923?d=identicon)[dotsplatfolrm](/maintainers/dotsplatfolrm)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dotsplatform-search-api-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/dotsplatform-search-api-sdk/health.svg)](https://phpackages.com/packages/dotsplatform-search-api-sdk)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11938.5M8.1k](/packages/illuminate-http)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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