PHPackages                             xenos/musicbrainz - 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. xenos/musicbrainz

ActiveLibrary[API Development](/categories/api)

xenos/musicbrainz
=================

A PHP library for accessing the MusicBrainz API

v1.0.0(2y ago)1565↑130.8%4[1 PRs](https://github.com/XenosEleatikos/MusicBrainz/pulls)MITPHPPHP &gt;=8.1.0

Since Jun 30Pushed 2y ago2 watchersCompare

[ Source](https://github.com/XenosEleatikos/MusicBrainz)[ Packagist](https://packagist.org/packages/xenos/musicbrainz)[ Docs](https://github.com/XenosEleatikos/MusicBrainz)[ RSS](/packages/xenos-musicbrainz/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

MusicBrainz API Client
======================

[](#musicbrainz-api-client)

This project contains an easy to use PHP API client for the [MusicBrainz JSON web service](https://musicbrainz.org/doc/Development/JSON_Web_Service).

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Install with Git](#install-with-git)
    - [Install with Composer](#install-with-composer)
- [Set up](#set-up)
    - [HTTP Adapter](#http-adapter)
    - [Logger](#logger)
    - [MusicBrainz Credentials](#musicbrainz-credentials)
- [Usage](#usage)
    - [Search Requests](#search-requests)
    - [Lookup Requests](#lookup-requests)
    - [Browse Requests](#browse-requests)

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

[](#installation)

### Install with Git

[](#install-with-git)

```
git clone https://github.com/XenosEleatikos/MusicBrainz.git
```

### Install with Composer

[](#install-with-composer)

This project is available at [Packagist](https://packagist.org): .

You can use it in your project with the following command:

```
composer require xenos/musicbrainz
```

Set up
------

[](#set-up)

### HTTP Adapter

[](#http-adapter)

As an HTTP client is necessary to the the MusicBrainz API client, you have to provide it as constructor argument. You may use any HTTP client by using an adapter instantiating `MusicBrainz\AbstractHttpAdapter`. This projects delivers an adapter for [Guzzle 6](http://docs.guzzlephp.org/en/stable/), but you may write your own adapter for your preferred HTTP client.

Usage with Guzzle:

```
