PHPackages                             cultuurnet/search-v3 - 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. cultuurnet/search-v3

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

cultuurnet/search-v3
====================

Cultuurnet search service for version 3

2.0.0(1y ago)028.0k↓26.9%4[1 PRs](https://github.com/cultuurnet/search-v3/pulls)3Apache-2.0PHPPHP ^8CI passing

Since Jan 15Pushed 1y ago18 watchersCompare

[ Source](https://github.com/cultuurnet/search-v3)[ Packagist](https://packagist.org/packages/cultuurnet/search-v3)[ RSS](/packages/cultuurnet-search-v3/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (13)Used By (3)

search-v3
=========

[](#search-v3)

This PHP library allows you to integrate with publiq's Search API3.

For legacy purposes, we also maintain a separate branch `main-php7`, if you need compatibility with PHP 7.4.

Full API documentation:
Getting an API key:

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

[](#installation)

```
composer require cultuurnet/search-v3
```

Usage
-----

[](#usage)

Set up a Guzzle client with a URL and API key for the test environment of Search API3 like this:

```
$httpClient = new GuzzleHttp\Client([
    'base_uri' => 'https://search-test.uitdatabank.be/',
    'headers' => [
        'X-Api-Key' => 'YOUR_API_KEY_FOR_TEST_ENV',
    ],
]);
```

Then, set up the search-v3 `SearchClient` like this:

```
$searchClient = new CultuurNet\SearchV3\SearchClient(
    $httpClient, // HTTP client set up in the previous step
    new CultuurNet\SearchV3\Serializer\Serializer() // Built-in serializer to deserialize the JSON responses
);
```

You can then perform searches like this:

```
$searchQuery = new \CultuurNet\SearchV3\SearchQuery();
$events = $searchClient->searchEvents($searchQuery); // Search events
$places = $searchClient->searchPlaces($searchQuery); // Search places
$offers = $searchClient->searchOffers($searchQuery); // Search both events + places
```

The results are an instance of `\CultuurNet\SearchV3\ValueObjects\PagedCollection`, which supports the following methods:

```
// Get pagination info
$events->getItemsPerPage();
$events->getTotalItems();

// Get the search results, as instances of CultuurNet\SearchV3\ValueObjects\Event
// and CultuurNet\SearchV3\ValueObjects\Place
$events->getMember()->getItems();

// Get the facet results as an instance of CultuurNet\SearchV3\ValueObjects\FacetResults
$events->getFacets();
```

To customize your search, you can configure `\CultuurNet\SearchV3\SearchQuery` like this:

```
$searchQuery = new \CultuurNet\SearchV3\SearchQuery();

// Embed the JSON-LD of the search results, instead of only the ID and type.
$searchQuery->setEmbed(true);

// Set the number of which result to fetch first. Defaults to 0.
// If the first page had a limit of 30 for example, and you want to get the results of the second page, set the start to
// 30. (So the start is always the limit multiplied by the page number you want to get, starting with 0.)
$searchQuery->setStart(0);

// Set the max amount of results to return per page.
$searchQuery->setLimit(30);

// Add a sort (see SAPI3 docs for possible fields to sort on)
$searchQuery->addSort('created', 'ASC');

// Remove a sort
$searchQuery->removeSort('created');

// Add a search parameter (see src/Parameter for all options)
$searchQuery->addParameter(
    new CultuurNet\SearchV3\Parameter\AudienceType(
        CultuurNet\SearchV3\Parameter\AudienceType::AUDIENCE_EDUCATION
    )
);

// Remove a search parameter (see src/Parameter for all options)
$searchQuery->removeParameter(
    new CultuurNet\SearchV3\Parameter\AudienceType(
        CultuurNet\SearchV3\Parameter\AudienceType::AUDIENCE_EDUCATION
    )
);
```

Some parameters allow multiple options and can be added more than once:

```
$searchQuery->addParameter(new CultuurNet\SearchV3\Parameter\Label('foo'));
$searchQuery->addParameter(new CultuurNet\SearchV3\Parameter\Label('bar'));
// Will return only results that have both labels.
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance42

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity60

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

Recently: every ~248 days

Total

11

Last Release

649d ago

Major Versions

v1.3.6 → 2.0.02024-08-08

PHP version history (2 changes)v1.0PHP ^7.1

2.0.0PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/d36d172d00ced6637c459c23a28191f50ed5e6bbe46ec97e07b78f166fbdff18?d=identicon)[dev-publiq](/maintainers/dev-publiq)

![](https://www.gravatar.com/avatar/df052a58ecfa5a07fd2b4cb12bb128ab28ff4b8e82fb0831eab81623b898ddb4?d=identicon)[madewithlove-machine-user](/maintainers/madewithlove-machine-user)

---

Top Contributors

[![stijnswaanen](https://avatars.githubusercontent.com/u/2233159?v=4)](https://github.com/stijnswaanen "stijnswaanen (140 commits)")[![bertramakers](https://avatars.githubusercontent.com/u/959026?v=4)](https://github.com/bertramakers "bertramakers (96 commits)")[![zuuperman](https://avatars.githubusercontent.com/u/1125693?v=4)](https://github.com/zuuperman "zuuperman (70 commits)")[![lucwollants](https://avatars.githubusercontent.com/u/1322949?v=4)](https://github.com/lucwollants "lucwollants (61 commits)")[![ThomasJacobsWK](https://avatars.githubusercontent.com/u/30793308?v=4)](https://github.com/ThomasJacobsWK "ThomasJacobsWK (27 commits)")[![wtrv](https://avatars.githubusercontent.com/u/4246645?v=4)](https://github.com/wtrv "wtrv (16 commits)")[![jdrieghe](https://avatars.githubusercontent.com/u/12606789?v=4)](https://github.com/jdrieghe "jdrieghe (10 commits)")[![JonasVHG](https://avatars.githubusercontent.com/u/4658984?v=4)](https://github.com/JonasVHG "JonasVHG (9 commits)")[![brampauwelyn](https://avatars.githubusercontent.com/u/9402377?v=4)](https://github.com/brampauwelyn "brampauwelyn (6 commits)")[![timdiels1](https://avatars.githubusercontent.com/u/7079398?v=4)](https://github.com/timdiels1 "timdiels1 (2 commits)")[![Numkil](https://avatars.githubusercontent.com/u/5604686?v=4)](https://github.com/Numkil "Numkil (1 commits)")[![nagytomas](https://avatars.githubusercontent.com/u/44770495?v=4)](https://github.com/nagytomas "nagytomas (1 commits)")

---

Tags

upw

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cultuurnet-search-v3/health.svg)

```
[![Health](https://phpackages.com/badges/cultuurnet-search-v3/health.svg)](https://phpackages.com/packages/cultuurnet-search-v3)
```

###  Alternatives

[algolia/algoliasearch-magento-2

Algolia Search &amp; Discovery extension for Magento 2

1881.8M16](/packages/algolia-algoliasearch-magento-2)[statamic-rad-pack/meilisearch

meilisearch search driver for Statamic

1661.7k](/packages/statamic-rad-pack-meilisearch)

PHPackages © 2026

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