PHPackages                             jolitagrazyte/discogs-api - 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. jolitagrazyte/discogs-api

ActiveLibrary[API Development](/categories/api)

jolitagrazyte/discogs-api
=========================

A simple Discogs Api wrapper using Guzzle7.

v1.2.0(3mo ago)116625[1 issues](https://github.com/JolitaGrazyte/discogs-api/issues)1MITPHPPHP ^7.4|^8.1|^8.2CI failing

Since Oct 21Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/JolitaGrazyte/discogs-api)[ Packagist](https://packagist.org/packages/jolitagrazyte/discogs-api)[ Docs](https://github.com/jolitagrazyte/discogs-api-wrapper)[ RSS](/packages/jolitagrazyte-discogs-api/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (4)Used By (1)

A simple php Discogs Api.
=========================

[](#a-simple-php-discogs-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ac3cf927097a60657a0b73786558425819c1fb9e8ad18d10f657a10ba3ad6099/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6c6974616772617a7974652f646973636f67732d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jolitagrazyte/discogs-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/6272b0ace382101e7b3f0969f0f695eed0183b0426af7f16406db9cf0b9c0439/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4a6f6c6974614772617a7974652f646973636f67732d6170692e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/JolitaGrazyte/discogs-api)[![Total Downloads](https://camo.githubusercontent.com/98d97ccc189c1219a55fc328e2ea4c3bca0b67822202daacf0ef4f2a631e62fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f6c6974616772617a7974652f646973636f67732d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jolitagrazyte/discogs-api)

This package makes it easy to communicate with discogs-api. It uses [Guzzle 7](https://github.com/guzzle/guzzle) and is very simple to install and to use.

You can use it with any PHP framework or just simply in your naked PHP application.

However, if you want to use it in Laravel framework, I'd suggest to also install [jolitagrazyte/laravel-discogs](https://github.com/JolitaGrazyte/laravel-discogs) package, which provides a facade for even an easier way to play with it.

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

[](#installation)

You can install the package via composer:

```
composer require jolitagrazyte/discogs-api
```

Usage
-----

[](#usage)

### Endpoints with no authentication required

[](#endpoints-with-no-authentication-required)

For the endpoints, where token is not required, first argument can be easily left empty.

```
$discogs = new DiscogsApi();

//get artist with id 1
$artist = $discogs->artist('1');

//get releases of the artist with id 1
$artistReleases = $discogs->artistReleases('1');

//get label with id 1
$label = $discogs->label('1');

//get releases of the label with id 1
$labelReleases = $discogs->labelReleases('1');

//get release with id 1
$releases = $discogs->releases('1');

//get master release with id 1
$masterRelease = $discogs->masterRelease('1');
```

### Endpoints where authentication is required

[](#endpoints-where-authentication-is-required)

For the endpoints, where token is required, you must add your discogs-token.

You can obtain it at .

#### Orders

[](#orders)

To get your orders, you can use getMyOrders()-method.

Orders list comes paginated with a default - 50 orders per page, but it can be changed.

If you need, you can add some optional parameters: `page`, `perPage` (with a max of 100), order status as `status`, `sort` and `sortOrder`.

If you need more information about the parameters you can read about it at .

```
$discogs = new DiscogsApi('discogs-token', 'app-name');

//get orders
$orders = $discogs->getMyOrders();

/**
* get orders with parameters:
* in this example page = 3, perPage = 25, status = shipped, sort = created, sortOrder = desc
*/
$ordersWithOptions = $discogs->getMyOrders(3, 25, "shipped", "created", "desc");
```

For getting one specific order by id:

```
$discogs = new DiscogsApi('discogs-token', 'app-name');

//get order with id
$order = $discogs->orderWithId('123');
```

It is also possible to retrieve the messages of an order:

```
$discogs = new DiscogsApi('discogs-token', 'app-name');

//get messages  of an order with id
$ordersMessages = $discogs->orderMessages('123');
```

For changing the status of the order or adding the shipping to the order.

```
$discogs = new DiscogsApi('discogs-token', 'app-name');

//change order status to 'Shipped'
$orders = $discogs->changeOrderStatus('123', 'Shipped');

//add shipping to an order with id
$order = $discogs->addShipping('123', '12.60');
```

#### Search

[](#search)

If you want to add some extra search parameters you can do it by first creating a SearchParameters object and then chaining as many options as you want.

```
$discogs = new DiscogsApi('discogs-token', 'app-name');

// create a SearchParameters object and chain some search paramater
$searchParameters = SearchParameters::make()->format('LP')->year('1996');

//do a search request with a query = 'MoWax' and passing the SearchParameters object
$searchResult = $discogs->search('MoWax', $searchParameters);
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jolita Grazyte](https://github.com/JolitaGrazyte)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance77

Regular maintenance activity

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69% 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 ~433 days

Total

3

Last Release

112d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/241c82a364556493f53fe089865760a5cc25453e28440bddff6ad9c18fc71b2f?d=identicon)[jolita-grazyte](/maintainers/jolita-grazyte)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (29 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (7 commits)")[![JolitaGrazyte](https://avatars.githubusercontent.com/u/8872541?v=4)](https://github.com/JolitaGrazyte "JolitaGrazyte (6 commits)")

---

Tags

discogs-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jolitagrazyte-discogs-api/health.svg)

```
[![Health](https://phpackages.com/badges/jolitagrazyte-discogs-api/health.svg)](https://phpackages.com/packages/jolitagrazyte-discogs-api)
```

###  Alternatives

[craftcms/cms

Craft CMS

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

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

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

Files.com PHP SDK

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

PHPackages © 2026

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