PHPackages                             topbroker/topbroker-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. [API Development](/categories/api)
4. /
5. topbroker/topbroker-php

ActiveLibrary[API Development](/categories/api)

topbroker/topbroker-php
=======================

TopBroker API Client

1.5.0(3y ago)0160MITPHPPHP &gt;= 7.1

Since Feb 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/topbroker/tobroker-php)[ Packagist](https://packagist.org/packages/topbroker/topbroker-php)[ RSS](/packages/topbroker-topbroker-php/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

 [![](./frontend/images/logo.svg)](./frontend/images/logo.svg)

PHP bindings to the TopBroker API

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

[](#installation)

This library supports PHP 7.1 and later The recommended way to install is through [Composer](https://getcomposer.org):

```
composer require topbroker/topbroker-php php-http/guzzle6-adapter
```

Usage
-----

[](#usage)

Initialize your client using your access token:

```
use TopBroker\TopBrokerApi;
$topbroker = new TopBrokerApi('', '');
```

Estates
-------

[](#estates)

### Estate listing

[](#estate-listing)

```
/** Get Estate List */
$topbroker->estates->getList([]);

/** Get Estate List Flat and Houses,
 * Minimum 50 sq. m area, sort by price from highest to lowest  */
$topbroker->estates->getList([
  'estate_type' => ['house', 'flat'],
  'area_min' => 50,
  'sort_by' => 'price', 'sort_to' => 'desc',
  'per_page' => 10, 'page' => 1 ]);

/** Get Estate List By Custom Field */
$topbroker->estates->getList(['custom_fields' => [
  'c_f_e_zymos' => ['Discounted', 'Top']]
  ]);
```

### Get Estate Count By User ID

[](#get-estate-count-by-user-id)

```
$topbroker->estates->getCount(['user_id' => 123]);
```

### Get All available Estates Custom Fields

[](#get-all-available-estates-custom-fields)

```
$topbroker->estates->getCustomFields([]);
```

### Get Estates Custom Views

[](#get-estates-custom-views)

```
$topbroker->estates->getCustomViews([]);
```

### Get Estates Record Statuses

[](#get-estates-record-statuses)

```
$topbroker->estates->getRecordStatuses([]);
```

### Get Attributes for specific Estate Type

[](#get-attributes-for-specific-estate-type)

```
$topbroker->estates->getAttributes('commercial');
$topbroker->estates->getAttributes('flat');
$topbroker->estates->getAttributes('site');
$topbroker->estates->getAttributes('house');
```

### Create a Estate

[](#create-a-estate)

```
$topbroker->estates->createItem([
  'estate_type' => 'flat',
  'user_id' => 123,
  'municipality_id' => 461,
  'city_id' => 1,
  'block_id' => 1,
  'street_id' => 22189,
  'area' => 68.2,
  'sale_price' => 125000,
  'floor' => 2,
  'floor_count' => 5,
  'room_count' => 3,
  'custom_fields' => [
    'c_f_c_tags' => ['Good location']
    ]);
```

### Get Estate by ID

[](#get-estate-by-id)

```
$topbroker->estates->getItem(12345);
```

### Update Estate

[](#update-estate)

```
$topbroker->estates->updateItem(12345, [
  'name' => 'Johnny NewName',
  'custom_fields' => ['c_f_c_company_name' => 'Company ABC']
  ]);
```

### Get Estate Photos

[](#get-estate-photos)

```
$topbroker->estates->getPhotos(12345);
```

### Get Estate Media (Video &amp;&amp; 3D Tours)

[](#get-estate-media-video--3d-tours)

```
$topbroker->estates->getMedia(12345);
```

### Get Estate Nearby Places

[](#get-estate-nearby-places)

```
$topbroker->estates->getNearbyPlaces(12345);
```

### Change Estate Privacy

[](#change-estate-privacy)

```
$topbroker->estates->changePrivacy(12345, ['privacy_level' => 'public']);
```

### Change Estate Owner

[](#change-estate-owner)

```
$topbroker->estates->changeOwner(12345, ['user_id' => 1]);
```

### Delete Estate

[](#delete-estate)

soft-delete, record will be stored in Settings-&gt;Trashbin where users will be able to recovery records

```
$topbroker->estates->deleteItem(12345);
```

Locations
---------

[](#locations)

Various location based records related directly to Estate and Inquiry records. Also can be used in Custom Fields in any record.

Location record hierarchy: Municipality -&gt; City -&gt; Block (District) -&gt; Street

### Municipalities

[](#municipalities)

```
$topbroker->locations->getMunicipalities([]);
```

### Cities

[](#cities)

```
/** List of cities located in specific municipality */
$topbroker->locations->getCities(['municipality_id' => 123]);
```

### Blocks (Districts)

[](#blocks-districts)

```
/** List of districts located in specific city */
$topbroker->locations->getBlocks(['city_id' => 123]);
```

### Streets

[](#streets)

```
/** List of street located in specific city, containing Flat type estates and minimum price 100K */
$topbroker->locations->getStreets([
  'city_id' => 123, 'for_sale ' => true,
  'price_to' => 100000, 'estate_type' => ['flat']
  ]);
```

### Locations

[](#locations-1)

Location is flattened hierarchy records of Municipality, City, Block and Street. Mainly used in Inquiry records. Also is used in Custom Fields 'location' type records values

```
$topbroker->locations->getList([]);
```

### Location Item by ID

[](#location-item-by-id)

```
$topbroker->locations->getItem(1234);
```

Contacts
--------

[](#contacts)

### Get Contact List

[](#get-contact-list)

```
/** Get Contact List */
$topbroker->contacts->getList([]);

/** Get Contact List By User ID */
$topbroker->contacts->getList(['user_id' => 123]);

/** Get Contact List By Custom Field */
$topbroker->contacts->getList(['custom_fields' => [
  'c_f_c_company_name' => 'Company XYZ',
  'c_f_c_company_size' => '5-10']
  ]);
```

### Count Contacts By User ID

[](#count-contacts-by-user-id)

```
$topbroker->contacts->getCount(['user_id' => 123]);
```

### Contact Custom Field list

[](#contact-custom-field-list)

```
$topbroker->contacts->getCustomFields([]);
```

### Get Contact Record Statuses

[](#get-contact-record-statuses)

```
$topbroker->contacts->getRecordStatuses([]);
```

### Create a Contact

[](#create-a-contact)

```
$topbroker->contacts->createItem([
  'name' => 'John Doe',
  'user_id' => 123,
  'custom_fields' => [
    'c_f_c_company_name' => 'Company XYZ',
    'c_f_c_company_size' => '5-10']
    ]);
```

### Get Contact by ID

[](#get-contact-by-id)

```
$topbroker->contacts->getItem(12345);
```

### Update Contact

[](#update-contact)

```
$topbroker->contacts->updateItem(12345, [
  'name' => 'Johnny NewName',
  'custom_fields' => ['c_f_c_company_name' => 'Company ABC']
  ]);
```

### Change Contact Owner

[](#change-contact-owner)

```
$topbroker->contacts->changeOwner(12345, ['user_id' => 1]);
```

### Change Contact Privacy

[](#change-contact-privacy)

```
$topbroker->contacts->changePrivacy(12345, ['privacy_level' => 'shared', 'user_ids' => [12, 34, 42]]);
```

### Delete Contact

[](#delete-contact)

soft-delete, record will be stored in Settings-&gt;Trashbin where users will be able to recovery records

```
$topbroker->contacts->deleteItem(12345);
```

Inquiries
---------

[](#inquiries)

### Get Inquiry List

[](#get-inquiry-list)

```
/** Get Contact List */
$topbroker->inquiries->getList([]);

/** Get Contact List By User ID */
$topbroker->inquiries->getList(['user_id' => 123]);

/** Get Contact List By Custom Field */
$topbroker->inquiries->getList(['custom_fields' => [
  'c_f_i_special_needs' => 'Disco ball']
  ]);
```

### Count Inquiries

[](#count-inquiries)

```
$topbroker->inquiries->getCount([]);
```

### Inquiry Custom Field list

[](#inquiry-custom-field-list)

```
$topbroker->inquiries->getCustomFields([]);
```

### Get Inquiry Record Statuses

[](#get-inquiry-record-statuses)

```
$topbroker->inquiries->getRecordStatuses([]);
```

### Create a Inquiry

[](#create-a-inquiry)

```
$topbroker->inquiries->createItem([
  'estate_type' => 'house',
  'title' => 'Hub','user_id' => 123,
  'custom_fields' => [
    'c_f_i_special_needs' => ['Disco ball', 'Unicorn'],
    'c_f_c_company_size' => '1-5']
    ]);
```

### Get Inquiry by ID

[](#get-inquiry-by-id)

```
$topbroker->inquiries->getItem(12345);
```

### Update Inquiry

[](#update-inquiry)

```
$topbroker->inquiries->updateItem(12345, [
  'title' => 'Dev Hub',
  'custom_fields' => ['c_f_c_company_name' => 'Startup XYZ']
  ]);
```

### Change Inquiry Owner

[](#change-inquiry-owner)

```
$topbroker->inquiries->changeOwner(12345, ['user_id' => 1]);
```

### Change Inquiry Privacy

[](#change-inquiry-privacy)

```
$topbroker->inquiries->changePrivacy(12345, ['privacy_level' => 'shared', 'user_ids' => [12, 34, 42]]);
```

### Delete Inquiry

[](#delete-inquiry)

soft-delete, record will be stored in Settings-&gt;Trashbin where users will be able to recovery records

```
$topbroker->inquiries->deleteItem(12345);
```

Finances
--------

[](#finances)

Using finances, users can track income and expenditure associated with properties and clients.

### Return filtered finances list

[](#return-filtered-finances-list)

```
$topbroker->finances->getList(['user_id' => 12345]);
```

### Return filtered finances records sum

[](#return-filtered-finances-records-sum)

```
$topbroker->finances->getSum(['user_id' => 12345]);
```

### Returns finance income groups

[](#returns-finance-income-groups)

```
$topbroker->finances->getIncomeGroups();
```

### Returns finance expenses groups

[](#returns-finance-expenses-groups)

```
$topbroker->finances->getExpensesGroups();
```

Deals
-----

[](#deals)

Solded/rented property Deals

### Get Deal List

[](#get-deal-list)

```
$topbroker->deals->getList(['user_id' => 12345, 'finance_operation_type' => 'income']);
```

### Get Deal by ID

[](#get-deal-by-id)

```
$topbroker->deals->getItem(12345);
```

### Count Deals

[](#count-deals)

```
$topbroker->deals->getCount(['estate_type' => ['flat']]);
```

### Average calculated Deals

[](#average-calculated-deals)

```
$topbroker->deals->getAverage(['for_sale' => true]);
```

Users
-----

[](#users)

### Get User List

[](#get-user-list)

```
$topbroker->users->getList(['custom_fields' => ['c_f_u_visible_in_homepage' => 'Yes']]);
```

### Get User by ID

[](#get-user-by-id)

```
$topbroker->users->getItem(12345);
```

### Count Users

[](#count-users)

```
$topbroker->users->getCount([]);
```

### User Custom Field list

[](#user-custom-field-list)

```
$topbroker->users->getCustomFields([]);
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~214 days

Recently: every ~206 days

Total

7

Last Release

1416d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65b159191674e3314c5bf1b25f1b9b9adca527b53ddb91f106864753b406abd8?d=identicon)[artis](/maintainers/artis)

---

Top Contributors

[![arturaspiksrys](https://avatars.githubusercontent.com/u/6106121?v=4)](https://github.com/arturaspiksrys "arturaspiksrys (21 commits)")

---

Tags

topbroker-apitopbroker-api-clienttopbroker-php

### Embed Badge

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

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M984](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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