PHPackages                             databreakers/php-data-api-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. databreakers/php-data-api-client

ActiveLibrary[API Development](/categories/api)

databreakers/php-data-api-client
================================

PHP client for DataBreakers DataAPI.

v2.1.0(8y ago)225.3k4MITPHPPHP &gt;=5.5.0

Since Nov 12Pushed 8y agoCompare

[ Source](https://github.com/DataBreakers/php-data-api-client)[ Packagist](https://packagist.org/packages/databreakers/php-data-api-client)[ Docs](https://databreakers.com)[ RSS](/packages/databreakers-php-data-api-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (15)Used By (0)

PHP client for DataBreakers DataAPI
===================================

[](#php-client-for-databreakers-dataapi)

This library provides PHP implementation of client for DataBreakers DataAPI.

Requirements
------------

[](#requirements)

Library requires PHP version 5.4 (or higher) and [Guzzle](http://guzzlephp.org).

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

[](#installation)

The best way to install it is using the [Composer](http://getcomposer.org/):

```
$ composer require databreakers/php-data-api-client
```

Quickstart
----------

[](#quickstart)

```
use DataBreakers\DataApi;

// Create a new instance of Client and provide your credentials
$client = new DataApi\Client('yourAccountId', 'yourSecretKey');

// Define items attributes (do this only when items attributes aren't defined in recommender yet)
$client->addItemsAttribute('title', DataApi\DataType::TEXT, 'en', DataApi\MetaType::TITLE);
$client->addItemsAttribute('color', DataApi\DataType::TEXT, 'en');
$client->addItemsAttribute('weight', DataApi\DataType::INTEGER);

// Add some items (if you are adding multiple items, users or interactions it's much faster to use batches)
$itemsBatch = (new DataApi\Batch\EntitiesBatch())
	->addEntity('fridgeId', [
		'title' => 'Fridge',
		'color' => 'white',
		'weight' => 55
	])
	->addEntity('carId', [
		'title' => 'Car',
		'color' => 'blue',
		'weight' => 1547
	]);
$client->insertOrUpdateItems($itemsBatch);

// Define users attributes (do this only when users attributes aren't defined in recommender yet)
$client->addUsersAttribute('name', DataApi\DataType::TEXT, 'en', DataApi\MetaType::TITLE);
$client->addUsersAttribute('age', DataApi\DataType::INTEGER);

// Add some users
$usersBatch = (new DataApi\Batch\EntitiesBatch())
	->addEntity('johnId', [
		'name' => 'John Smith',
		'age' => 35
	])
	->addEntity('sophiaId', [
		'name' => 'Sophia White',
		'age' => 27
	]);
$client->insertOrUpdateUsers($usersBatch);

// Add interactions between users and items
$interactionsBatch = (new DataApi\Batch\InteractionsBatch())
	->addInteraction('johnId', 'carId', 'Like')
	->addInteraction('johnId', 'carId', 'Purchase')
	->addInteraction('johnId', 'fridgeId', 'Dislike')
	->addInteraction('sophiaId', 'carId', 'Detail view')
	->addInteraction('sophiaId', 'fridgeId', 'Purchase');
$client->insertInteractions($interactionsBatch);

// And finally obtain ten recommendations for Sophia and car item!
$recommendations = $client->getRecommendations('sophiaId', 'carId', 10);

// If you want to send more recommendation requests at once, you can use recommendations batch
$batchRecommendations = $client->getRecommendationsBatch((new DataApi\Batch\RecommendationsBatch())
	->requestRecommendations('req1', 10, 'johnId', 'fridgeId', 20)
	->requestRecommendationsForUser('req2', 5, 'sophiaId', 15)
	->requestRecommendationsForItem('req3', 1, 'fridgeId', 10)
);
```

---

[DataBreakers](https://databreakers.com) – we are your data sense

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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 ~58 days

Recently: every ~120 days

Total

14

Last Release

3078d ago

Major Versions

v1.2.8 → v2.0.02017-06-19

PHP version history (2 changes)v1.0.1PHP &gt;=5.4.0

v2.0.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a34c5a70829149e23e12455370e8c4d9c17f0a58b4601fda1c746defca8d176?d=identicon)[janveselynet](/maintainers/janveselynet)

---

Top Contributors

[![janveselynet](https://avatars.githubusercontent.com/u/3398651?v=4)](https://github.com/janveselynet "janveselynet (101 commits)")[![jakubkratina](https://avatars.githubusercontent.com/u/712021?v=4)](https://github.com/jakubkratina "jakubkratina (3 commits)")[![semerak-michal](https://avatars.githubusercontent.com/u/6069348?v=4)](https://github.com/semerak-michal "semerak-michal (1 commits)")

### Embed Badge

![Health badge](/badges/databreakers-php-data-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/databreakers-php-data-api-client/health.svg)](https://phpackages.com/packages/databreakers-php-data-api-client)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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