PHPackages                             typesense/typesense-php - 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. [Search &amp; Filtering](/categories/search)
4. /
5. typesense/typesense-php

ActiveLibrary[Search &amp; Filtering](/categories/search)

typesense/typesense-php
=======================

PHP client for Typesense Search Server: https://github.com/typesense/typesense

v6.0.0(6mo ago)2726.9M↓46%54[1 issues](https://github.com/typesense/typesense-php/issues)[1 PRs](https://github.com/typesense/typesense-php/pulls)20Apache-2.0PHPPHP &gt;=7.4CI passing

Since Apr 5Pushed 3w ago9 watchersCompare

[ Source](https://github.com/typesense/typesense-php)[ Packagist](https://packagist.org/packages/typesense/typesense-php)[ Docs](https://github.com/typesense/typesense-php)[ GitHub Sponsors](https://github.com/typesense)[ RSS](/packages/typesense-typesense-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (12)Versions (54)Used By (20)

Typesense PHP Client
====================

[](#typesense-php-client)

Official PHP client for the Typesense API:

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

[](#installation)

```
composer require php-http/curl-client typesense/typesense-php

```

You can also add `typesense/typesense-php` to your project's `composer.json`.

Typesense uses [HTTPlug](http://httplug.io/) as an abstraction layer for an HTTP client. You'll find the List of supported HTTP clients &amp; adapters [here](http://docs.php-http.org/en/latest/clients.html). Please be sure to install a supported client.

Usage
-----

[](#usage)

Read the documentation here:

Here are some examples that walk you through how to use the client: [doc/examples](examples)

### Escaping filter values

[](#escaping-filter-values)

Use `Typesense\FilterBy::escapeString()` to safely use string values in `filter_by`:

```
use Typesense\FilterBy;

$filterValue = "The 17\" O'Conner && O`Series \n OR a || 1%2 book? (draft), [alpha]";
$filterBy = 'tags:=' . FilterBy::escapeString($filterValue);
```

Compatibility
-------------

[](#compatibility)

Typesense Servertypesense-php&gt;= v30.0&gt;= v6.0.0&gt;= v28.0&gt;= v5.0.0&gt;= v26.0&gt;= v4.9.0&gt;= v0.23.0&gt;= v4.8.0&gt;= v0.21.0&gt;= v4.7.0&gt;= v0.20.0&gt;= v4.6.0&gt;= v0.19.0&gt;= v4.5.0&gt;= v0.18.0&gt;= v4.4.0&gt;= v0.17.0&gt;= v4.2.0&gt;= v0.16.0&gt;= v4.1.0&gt;= v0.15.0&gt;= v4.0.0Contributing
------------

[](#contributing)

Bug reports and pull requests are welcome on GitHub at \[\].

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

[](#development)

Run linter:

```
composer run-script lint:fix
```

Run Typesense Server:

```
composer run-script typesenseServer
```

Run tests:

```
docker compose up
cp phpunit.xml.dist phpunit.xml
composer run-script test
```

Credits
-------

[](#credits)

This client was originally developed by [Abdullah Al-Faqeir](https://github.org/abdullahfaqeir) from [DevLoops](https://github.com/devloopsnet) and was [adopted](https://github.com/devloopsnet/typesense-php/issues/4) as the official PHP client library for Typesense in Oct 2020.

Ongoing development and support is now provided by Typesense, in addition to our collaborators.

###  Health Score

68

—

FairBetter than 99% of packages

Maintenance83

Actively maintained with recent releases

Popularity65

Solid adoption and visibility

Community46

Growing community involvement

Maturity70

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~42 days

Total

53

Last Release

72d ago

Major Versions

v1.0.6 → v2.02020-06-01

v2.0.4 → v4.0.02020-10-13

v4.10.0-RC1 → v5.0.0-RC12024-08-28

v5.2.0-RC4 → v6.0.0-RC12025-11-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d1b146a782dfe8ce53d3ee7a8799009a072a9c5e7ea421f465b87f8b1cff9ea?d=identicon)[typesense](/maintainers/typesense)

---

Top Contributors

[![jasonbosco](https://avatars.githubusercontent.com/u/458383?v=4)](https://github.com/jasonbosco "jasonbosco (72 commits)")[![tharropoulos](https://avatars.githubusercontent.com/u/93339170?v=4)](https://github.com/tharropoulos "tharropoulos (69 commits)")[![haydenhoang](https://avatars.githubusercontent.com/u/94696449?v=4)](https://github.com/haydenhoang "haydenhoang (47 commits)")[![AbdullahFaqeir](https://avatars.githubusercontent.com/u/1428547?v=4)](https://github.com/AbdullahFaqeir "AbdullahFaqeir (37 commits)")[![karakhanyans](https://avatars.githubusercontent.com/u/12999189?v=4)](https://github.com/karakhanyans "karakhanyans (8 commits)")[![arayiksmbatyan](https://avatars.githubusercontent.com/u/23166391?v=4)](https://github.com/arayiksmbatyan "arayiksmbatyan (8 commits)")[![babeuloula](https://avatars.githubusercontent.com/u/4849233?v=4)](https://github.com/babeuloula "babeuloula (4 commits)")[![jeanmatthieud](https://avatars.githubusercontent.com/u/1443167?v=4)](https://github.com/jeanmatthieud "jeanmatthieud (3 commits)")[![eyupcanakman](https://avatars.githubusercontent.com/u/1732357?v=4)](https://github.com/eyupcanakman "eyupcanakman (2 commits)")[![regnerisch](https://avatars.githubusercontent.com/u/9422737?v=4)](https://github.com/regnerisch "regnerisch (2 commits)")[![mrVrAlex](https://avatars.githubusercontent.com/u/633883?v=4)](https://github.com/mrVrAlex "mrVrAlex (1 commits)")[![nikspyratos](https://avatars.githubusercontent.com/u/17888779?v=4)](https://github.com/nikspyratos "nikspyratos (1 commits)")[![pH-7](https://avatars.githubusercontent.com/u/1325411?v=4)](https://github.com/pH-7 "pH-7 (1 commits)")[![phiamo](https://avatars.githubusercontent.com/u/207291?v=4)](https://github.com/phiamo "phiamo (1 commits)")[![raphaelstolt](https://avatars.githubusercontent.com/u/48225?v=4)](https://github.com/raphaelstolt "raphaelstolt (1 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (1 commits)")[![vortextangent](https://avatars.githubusercontent.com/u/1971148?v=4)](https://github.com/vortextangent "vortextangent (1 commits)")[![alexander-schranz](https://avatars.githubusercontent.com/u/1698337?v=4)](https://github.com/alexander-schranz "alexander-schranz (1 commits)")[![angus-mcritchie](https://avatars.githubusercontent.com/u/53469513?v=4)](https://github.com/angus-mcritchie "angus-mcritchie (1 commits)")[![anthonybachour](https://avatars.githubusercontent.com/u/647694?v=4)](https://github.com/anthonybachour "anthonybachour (1 commits)")

---

Tags

php-clientsearchtypesensetypesense-php

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/typesense-typesense-php/health.svg)

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

###  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)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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