PHPackages                             openeuropa/europa-search-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. openeuropa/europa-search-client

ActiveLibrary[API Development](/categories/api)

openeuropa/europa-search-client
===============================

A PHP client library for communicating with the Europa Search service.

1.x-dev(5mo ago)261.1k↑446.4%1EUPL-1.2PHPPHP &gt;=8.1CI failing

Since Oct 2Pushed 5mo ago28 watchersCompare

[ Source](https://github.com/openeuropa/europa-search-client)[ Packagist](https://packagist.org/packages/openeuropa/europa-search-client)[ RSS](/packages/openeuropa-europa-search-client/feed)WikiDiscussions 1.x Synced 3w ago

READMEChangelog (10)Dependencies (16)Versions (27)Used By (1)

Europa Search Client
====================

[](#europa-search-client)

[![Build Status](https://camo.githubusercontent.com/270f3a959477e6fba81827ded47b1242dc76282726f562a980ae488b507eb48b/68747470733a2f2f64726f6e652e66706669732e65752f6170692f6261646765732f6f70656e6575726f70612f6575726f70612d7365617263682d636c69656e742f7374617475732e737667)](https://drone.fpfis.eu/openeuropa/europa-search-client)[![Packagist](https://camo.githubusercontent.com/88aba6b414c0220bc776cdd96657f308c38d8fcef780367dc23e20be637c8bec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f70656e6575726f70612f6575726f70612d7365617263682d636c69656e742e737667)](https://packagist.org/packages/openeuropa/europa-search-client)

Description
-----------

[](#description)

*Europa Search Client* is a library offering a PHP API to consume Europa Search services.

Install
-------

[](#install)

Use [Composer](https://getcomposer.org/) to install the package:

```
$ composer require openeuropa/europa-search-client
```

Usage
-----

[](#usage)

All calls should be done by instantiating the client class:

```
require_once 'vendor/autoload.php';

$client = new \OpenEuropa\EuropaSearchClient\Client(
    new \GuzzleHttp\Client(),
    new \Http\Factory\Guzzle\RequestFactory(),
    new \Http\Factory\Guzzle\StreamFactory(),
    new \Http\Factory\Guzzle\UriFactory(),
    [
        // For a full list of options see "Configuration".
        'apiKey' => 'foo',
        'searchApiEndpoint' => 'https://example.com/search',
    ]
);
```

In the above example, we're passing the Guzzle HTTP client, request, stream and URI factories. But these can be replaced by any similar factories that are implementing the PSR interfaces. The last parameter is the configuration.

### Configuration

[](#configuration)

Possible configurations:

- `apiKey` (string): Used by the Search and Ingestion APIs.
- `database` (string): Used by Ingestion API.
- `infoApiEndpoint` (string, valid URI): The Search API info endpoint.
- `searchApiEndpoint` (string, valid URI): The Search API endpoint.
- `facetApiEndpoint` (string, valid URI): The Search API facets endpoint.
- `tokenApiEndpoint` (string, valid URI): The endpoint for Authorisation/Token API.
- `consumerKey` (string): Used by Authorisation/Token API.
- `consumerSecret` (string): Used by Authorisation/Token API.
- `textIngestionApiEndpoint` (string, valid URI): The Ingestion API endpoint to ingest text.
- `fileIngestionApiEndpoint` (string, valid URI): The Ingestion API endpoint to ingest files.
- `deleteApiEndpoint` (string, valid URI): The Ingestion API endpoint to delete a document from the index.

### Server info

[](#server-info)

```
$response = $client->getInfo();
```

Will return information about Europa Search server availability and API version.

### Searching

[](#searching)

#### Simple

[](#simple)

```
$response = $client->search('something to search');
```

The search can be fine-tuned by passing additional arguments. Check `\OpenEuropa\EuropaSearchClient\Contract\ClientInterface::search()` for a full list of parameters. The response is an `\OpenEuropa\EuropaSearchClient\Model\Search` object.

#### Facets

[](#facets)

```
$response = $client->getFacets('something to search');
```

The facets search can be fine-tuned by passing additional arguments. Check `\OpenEuropa\EuropaSearchClient\Contract\ClientInterface::getFacets()` for a full list of parameters. The response is an `\OpenEuropa\EuropaSearchClient\Model\Facets` object.

### Ingesting

[](#ingesting)

#### Text

[](#text)

```
$response = $client->ingestText('http://example.com/page/to/be/ingested', 'text to be ingested/index');
```

Check `\OpenEuropa\EuropaSearchClient\Contract\ClientInterface::ingestText()` for a complete list of parameters. The response is an `\OpenEuropa\EuropaSearchClient\Model\Ingestion` object.

#### File

[](#file)

```
$binaryString = file_get_contents(...);
$client->ingestFile('http://example.com/file/to/be/ingested', $binaryString);
```

Check `\OpenEuropa\EuropaSearchClient\Contract\ClientInterface::ingestFile()` for a complete list of parameters. The response is an `\OpenEuropa\EuropaSearchClient\Model\Ingestion` object.

#### Delete document

[](#delete-document)

```
$success = $client->deleteDocument('referenceID');
```

The function returns a boolean indicating if the operation was successful.

Contributing
------------

[](#contributing)

Please read [the full documentation](https://github.com/openeuropa/openeuropa) for details on our code of conduct, and the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance70

Regular maintenance activity

Popularity32

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity68

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

Recently: every ~123 days

Total

13

Last Release

172d ago

Major Versions

0.x-dev → 1.0.0-alpha12022-04-11

PHP version history (4 changes)0.x-devPHP &gt;=5.6

1.0.0-alpha1PHP &gt;=7.4

1.0.0-alpha4PHP &gt;=8.0

1.0.0-alpha9PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/153362?v=4)[Antonio De Marco](/maintainers/ademarco)[@ademarco](https://github.com/ademarco)

![](https://www.gravatar.com/avatar/d3b1f4079f9a82f6dd88fe6577d1256b4ecbbccbcd4a4ec9bea7c2fd6f72b99a?d=identicon)[DIGIT-CORE](/maintainers/DIGIT-CORE)

---

Top Contributors

[![claudiu-cristea](https://avatars.githubusercontent.com/u/473868?v=4)](https://github.com/claudiu-cristea "claudiu-cristea (119 commits)")[![drishu](https://avatars.githubusercontent.com/u/11507647?v=4)](https://github.com/drishu "drishu (61 commits)")[![brummbar](https://avatars.githubusercontent.com/u/8488617?v=4)](https://github.com/brummbar "brummbar (41 commits)")[![hernani](https://avatars.githubusercontent.com/u/707860?v=4)](https://github.com/hernani "hernani (30 commits)")[![abel-santos-corral](https://avatars.githubusercontent.com/u/34939110?v=4)](https://github.com/abel-santos-corral "abel-santos-corral (17 commits)")[![nagyad](https://avatars.githubusercontent.com/u/22004498?v=4)](https://github.com/nagyad "nagyad (14 commits)")[![saidatom](https://avatars.githubusercontent.com/u/2377368?v=4)](https://github.com/saidatom "saidatom (11 commits)")[![v1nc3nz00](https://avatars.githubusercontent.com/u/13203140?v=4)](https://github.com/v1nc3nz00 "v1nc3nz00 (10 commits)")[![sergepavle](https://avatars.githubusercontent.com/u/9432036?v=4)](https://github.com/sergepavle "sergepavle (6 commits)")[![upchuk](https://avatars.githubusercontent.com/u/5848933?v=4)](https://github.com/upchuk "upchuk (5 commits)")[![22Alexandra](https://avatars.githubusercontent.com/u/22908988?v=4)](https://github.com/22Alexandra "22Alexandra (4 commits)")[![imanoleguskiza](https://avatars.githubusercontent.com/u/14978592?v=4)](https://github.com/imanoleguskiza "imanoleguskiza (4 commits)")[![bbenbahloul](https://avatars.githubusercontent.com/u/23499981?v=4)](https://github.com/bbenbahloul "bbenbahloul (3 commits)")[![gorsky87](https://avatars.githubusercontent.com/u/21284516?v=4)](https://github.com/gorsky87 "gorsky87 (1 commits)")[![gillesdeudon](https://avatars.githubusercontent.com/u/8696408?v=4)](https://github.com/gillesdeudon "gillesdeudon (1 commits)")[![10atm-blue](https://avatars.githubusercontent.com/u/18004849?v=4)](https://github.com/10atm-blue "10atm-blue (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/openeuropa-europa-search-client/health.svg)

```
[![Health](https://phpackages.com/badges/openeuropa-europa-search-client/health.svg)](https://phpackages.com/packages/openeuropa-europa-search-client)
```

###  Alternatives

[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[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.

35729.6k2](/packages/telnyx-telnyx-php)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[sylius/sylius

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

8.5k5.8M712](/packages/sylius-sylius)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1237.8M120](/packages/web-auth-webauthn-lib)

PHPackages © 2026

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