PHPackages                             mrpc/beatportapi - 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. mrpc/beatportapi

ActiveLibrary[API Development](/categories/api)

mrpc/beatportapi
================

Beatport Api Class

1.0.0(7y ago)018WTFPLPHP

Since Nov 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mrpc/beatportapi)[ Packagist](https://packagist.org/packages/mrpc/beatportapi)[ Docs](https://github.com/mrpc/beatportapi)[ RSS](/packages/mrpc-beatportapi/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Beatport API PHP Class
======================

[](#beatport-api-php-class)

A simple PHP class to query the Beatport API via Oauth, server side.

The use case is for a server to server context.

The class essentially just returns an array which you can then manipulate as you please.

This is originally based on the following people's work:

- [Beatport API PHP Class](https://github.com/moussaclarke/beatportapi) by [Moussa Clarke](https://github.com/moussaclarke) (I forked this repo as a starting point)
- [Beatport API Json Feed](https://github.com/fedegiust/Beatport-API-JSON-feed) by Federico Giust
- [Beatport OAuth Connect w/ PECL](https://groups.google.com/forum/#!topic/beatport-api/sEpZUJkaSdo) by Tim Brandwijk (Federico Giust's script was based on this one)
- [Beatport OAuth Connect w/ PEAR](https://groups.google.com/forum/#!topic/beatport-api/sEpZUJkaSdo) by Christian Kolloch (Also based on Tim Brandwijk's script)

Aims
----

[](#aims)

- Login and query the Beatport API
- Abstract away the OAuth pain
- Send back a simple array with the query results

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

[](#requirements)

- PHP 5.5+
- Beatport API Key and login details (You'll need to request those from Beatport)
- Guzzle 6 (via composer)

Install
-------

[](#install)

```
composer require mrpc/beatportapi

```

Usage
-----

[](#usage)

```
use mrpc\BeatportApi;

// auth parameters
$parameters = [
  'consumer'=> 'CONSUMERKEY', // Your Beatport API Key
  'secret' => 'SECRETKEY', // Your Beatport Secret Key
  'login' => 'BEATPORTLOGIN', // Your Beatport Login Name
  'password' => 'BEATPORTPASSWORD' // Your Beatport Password
  ];

// query parameters
$query = [
  'facets' => 'labelId:xyz', // The filter type
  'method' => 'releases', // The Beatport API Method
  'perPage' => '150' // Number of results per page
  ];

$api = new BeatportApi ($parameters); // initialise
$response = $api->queryApi ($query); // run the query
print_r ($response); // do something with response

```

You can check the [Beatport API documentation](https://oauth-api.beatport.com/) for which queries you can make and which parameters are required, although they are currently untested much beyond the above example, and not everything is documented, so your mileage may vary.

Disclaimer
----------

[](#disclaimer)

Totally and utterly alpha, and likely to break at any point. Not guaranteed to work as intended in any way, so use at your own risk.

Todo
----

[](#todo)

- Store the tokens somewhere and re-use until expiry
- Get some sanity into the variable / method names
- Add some proper error catching / messaging
- Test and document other query types.

Contribute
----------

[](#contribute)

Would be cool to improve this, so feel free to submit bug reports, suggestions and pull requests. Can't guarantee I've got enough time to do very much though! Alternatively just fork it and make your own thing.

License
-------

[](#license)

[WFTPL](http://www.wtfpl.net/), insofar as those other guys are cool with that.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 89.4% 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

Unknown

Total

1

Last Release

2726d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13d96a1cc93ea8c653f097227fd8e734e078ee6e17c8c6cdb90f07216c9a8896?d=identicon)[mrpc](/maintainers/mrpc)

---

Top Contributors

[![moussaclarke](https://avatars.githubusercontent.com/u/13017858?v=4)](https://github.com/moussaclarke "moussaclarke (42 commits)")[![mrpc](https://avatars.githubusercontent.com/u/1331661?v=4)](https://github.com/mrpc "mrpc (4 commits)")[![Filoz](https://avatars.githubusercontent.com/u/5341996?v=4)](https://github.com/Filoz "Filoz (1 commits)")

---

Tags

beatport

### Embed Badge

![Health badge](/badges/mrpc-beatportapi/health.svg)

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

###  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)
