PHPackages                             hkulekci/qdrant - 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. hkulekci/qdrant

ActiveLibrary[API Development](/categories/api)

hkulekci/qdrant
===============

PHP Client for Qdrant

v1.0.0(2mo ago)172238.5k↓15%31[5 issues](https://github.com/hkulekci/qdrant-php/issues)[1 PRs](https://github.com/hkulekci/qdrant-php/pulls)9MITPHPPHP ^8.1CI passing

Since Apr 24Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/hkulekci/qdrant-php)[ Packagist](https://packagist.org/packages/hkulekci/qdrant)[ RSS](/packages/hkulekci-qdrant/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (10)Dependencies (28)Versions (18)Used By (9)

Qdrant PHP Client
=================

[](#qdrant-php-client)

[![Test Application](https://github.com/hkulekci/qdrant-php/actions/workflows/test.yaml/badge.svg)](https://github.com/hkulekci/qdrant-php/actions/workflows/test.yaml) [![codecov](https://camo.githubusercontent.com/7c1c74d1ab107fe01f6b2edc2beaf7021a12f10998e0056dbe43279aee427579/68747470733a2f2f636f6465636f762e696f2f6769746875622f686b756c656b63692f716472616e742d7068702f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d354b3846414930433942)](https://codecov.io/github/hkulekci/qdrant-php)

This library is a PHP Client for Qdrant.

Qdrant is a vector similarity engine &amp; vector database. It deploys as an API service providing search for the nearest high-dimensional vectors. With Qdrant, embeddings or neural network encoders can be turned into full-fledged applications for matching, searching, recommending, and much more!

Installation
============

[](#installation)

You can install the client in your PHP project using composer:

```
composer require hkulekci/qdrant
```

### Connecting to Qdrant

[](#connecting-to-qdrant)

```
include __DIR__ . "/../vendor/autoload.php";
include_once 'config.php';

use Qdrant\Qdrant;
use Qdrant\Config;
use Qdrant\Http\Builder;

$config = new Config(QDRANT_HOST);
$config->setApiKey(QDRANT_API_KEY);

$transport = (new Builder())->build($config);
$client = new Qdrant($transport);
```

### Creating a Collection

[](#creating-a-collection)

```
use Qdrant\Endpoints\Collections;
use Qdrant\Models\Request\CreateCollection;
use Qdrant\Models\Request\VectorParams;

$createCollection = new CreateCollection();
$createCollection->addVector(new VectorParams(1536, VectorParams::DISTANCE_COSINE), 'content');
$response = $client->collections('contents')->create($createCollection);
```

### Inserting Points Into Collection

[](#inserting-points-into-collection)

```
use Qdrant\Models\PointsStruct;
use Qdrant\Models\PointStruct;
use Qdrant\Models\VectorStruct;

$openai = OpenAI::client(OPENAI_API_KEY);

$query = 'sustainable agricultural startups';
$response = $openai->embeddings()->create([
    'model' => 'text-embedding-ada-002',
    'input' => $query,
]);
$embedding = array_values($response->embeddings[0]->embedding);

$points = new PointsStruct();
$points->addPoint(
    new PointStruct(
        (int) $imageId,
        new VectorStruct($embedding, 'content'),
        [
            'id' => 1,
            'meta' => 'Meta data'
        ]
    )
);
$client->collections('contents')->points()->upsert($points);
```

### Wait for Acknowledges

[](#wait-for-acknowledges)

While upsert data, if you want to wait for upsert to actually happen, you can use query parameters:

```
$client->collections('contents')->points()->upsert($points, ['wait' => 'true']);
```

You can check for more parameters : [https://qdrant.github.io/qdrant/redoc/index.html#tag/points/operation/upsert\_points](https://qdrant.github.io/qdrant/redoc/index.html#tag/points/operation/upsert_points)

### Search on Points

[](#search-on-points)

Search with a filter :

```
use Qdrant\Models\Filter\Condition\MatchString;
use Qdrant\Models\Filter\Filter;
use Qdrant\Models\Request\SearchRequest;
use Qdrant\Models\VectorStruct;

$searchRequest = (new SearchRequest(new VectorStruct($embedding, 'elev_pitch')))
    ->setFilter(
        (new Filter())->addMust(
            new MatchString('name', 'Palm')
        )
    )
    ->setLimit(10)
    ->setParams([
        'hnsw_ef' => 128,
        'exact' => false,
    ])
    ->setWithPayload(true);

$response = $client->collections('contents')->points()->search($searchRequest);
```

### Search on Points with OpenAI Embeddings

[](#search-on-points-with-openai-embeddings)

```
$openai = OpenAI::client(OPENAI_API_KEY);

$query = 'lorem ipsum dolor sit amed';
$response = $openai->embeddings()->create([
    'model' => 'text-embedding-ada-002',
    'input' => $query,
]);
$embedding = array_values($response->embeddings[0]->embedding);

$searchRequest = (new SearchRequest(new VectorStruct($embedding, 'content')))
    ->setLimit(10)
    ->setParams([
        'hnsw_ef' => 128,
        'exact' => false,
    ])
    ->setWithPayload(true);

$response = $client->collections('contents')->points()->search($searchRequest);

foreach ($response['result'] as $item) {
    echo $item['score'] . ';' . $item['payload']['id'] . ';' . $item['payload']['meta_data'] . PHP_EOL;
}
```

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

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

Every ~77 days

Recently: every ~165 days

Total

15

Last Release

80d ago

Major Versions

v0.5.8 → v1.0.02026-04-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/586318?v=4)[Haydar KÜLEKCİ](/maintainers/hkulekci)[@hkulekci](https://github.com/hkulekci)

---

Top Contributors

[![hkulekci](https://avatars.githubusercontent.com/u/586318?v=4)](https://github.com/hkulekci "hkulekci (125 commits)")[![gregpriday](https://avatars.githubusercontent.com/u/1126859?v=4)](https://github.com/gregpriday "gregpriday (20 commits)")[![yunwuxin](https://avatars.githubusercontent.com/u/2168125?v=4)](https://github.com/yunwuxin "yunwuxin (2 commits)")[![NiCr42](https://avatars.githubusercontent.com/u/18549424?v=4)](https://github.com/NiCr42 "NiCr42 (2 commits)")[![yaroslavpopovic](https://avatars.githubusercontent.com/u/12303752?v=4)](https://github.com/yaroslavpopovic "yaroslavpopovic (2 commits)")[![adrmrn](https://avatars.githubusercontent.com/u/22296760?v=4)](https://github.com/adrmrn "adrmrn (2 commits)")[![julien-jourde](https://avatars.githubusercontent.com/u/82051126?v=4)](https://github.com/julien-jourde "julien-jourde (2 commits)")[![mbukovy](https://avatars.githubusercontent.com/u/27806309?v=4)](https://github.com/mbukovy "mbukovy (2 commits)")[![fafiebig](https://avatars.githubusercontent.com/u/499340?v=4)](https://github.com/fafiebig "fafiebig (1 commits)")[![evil1morty](https://avatars.githubusercontent.com/u/42971559?v=4)](https://github.com/evil1morty "evil1morty (1 commits)")[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (1 commits)")

---

Tags

phpphp-clientqdrantqdrant-vector-database

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hkulekci-qdrant/health.svg)

```
[![Health](https://phpackages.com/badges/hkulekci-qdrant/health.svg)](https://phpackages.com/packages/hkulekci-qdrant)
```

###  Alternatives

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[openai-php/client

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

5.8k28.0M318](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)

PHPackages © 2026

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