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

ActiveLibrary[API Development](/categories/api)

duck7000/musicbrainz-php
========================

Library for retrieving music, cd lp etc from musicBrainz API

V1.3.6(7mo ago)22GPL-2.0-or-laterPHPPHP &gt;=7.2

Since Oct 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/duck7000/MusicBrainzPHP)[ Packagist](https://packagist.org/packages/duck7000/musicbrainz-php)[ Docs](https://github.com/duck7000/MusicBrainzPHP)[ RSS](/packages/duck7000-musicbrainz-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (10)Used By (0)

musicBrainzPHP
==============

[](#musicbrainzphp)

PHP library for retrieving CD information from musicBrainz API.
Retrieve most of the information you can see on musicBrainz page of specific title.
Search for title, artist, barcode, musicBrainz discid, catalog number or override format
Get front and back cover art image urls. from coverartarchive.org
Search is default for CD (change in config) or override in TitleSearch class search().
All info is in the wikipages, every class and method is described there!

Quick Start
===========

[](#quick-start)

- If you're not using composer or an autoloader include `bootstrap.php`.
- Search for cd title, artist, barcode, musicBrainz discid, catalog number or override format

```
$music = new \Music\TitleSearch();
$results = $music->search("", "", "724383065820", "", "", ""); // example with barcode (title and artist are ignored)
$results = $music->search("", "", "", "ys9FSMFAFYjQIkkVXrd3iIs6s.o-", "", ""); // example with discid only
$results = $music->search("who made who", "AC/DC", "", "", "", ""); // example with CD title and artist
$results = $music->search("who made who", "", "", "", "", ""); // example with CD title only
$results = $music->search("", "AC/DC", "", "", "", ""); // example with artist only
$results = $music->search("", "", "", "", "12345-2", ""); // example with CD catalog number only
$results = $music->search("who made who", "", "", "", "", "Vinyl"); // example with format override
```

Installation
============

[](#installation)

This library uses musicBrainz API.

Get the files with one of:

- Git clone. Checkout the latest release tag.
- \[Zip/Tar download\]

### Requirements

[](#requirements)

- PHP &gt;= 7.4 - 8.4 (all versions &lt; 8.0 are end of life)
- PHP cURL extension

Options
=======

[](#options)

musicBrainz has a few options in config:

Default user agent (this must be something that identifies the user and program!) possible ban!
Default search: CD (this can be others too like vinyl) (this can be overriden in TitleSearch class search()
Default search limit: 25 (range = 1-100 including 1 and 100)

Fetching data from a title
==========================

[](#fetching-data-from-a-title)

```
include "bootstrap.php"; // Load the class if you're not using an autoloader
$music = new \Music\Title("095e2e2e-60c4-4f9f-a14a-2cc1b468bf66"); // parameter is the found musicBrainz id from search)
$results = $music->fetchData(); // This returns a array with all available info of this title
```

Credits to imdbphp, musicBrainzPHP is loosly based on it.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance75

Regular maintenance activity

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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 ~42 days

Recently: every ~57 days

Total

9

Last Release

232d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cccf7ed904767a1e0a056d6a41c9e14d571f3102d10c59b55c8fe851ab5b12b2?d=identicon)[hunter666](/maintainers/hunter666)

---

Top Contributors

[![duck7000](https://avatars.githubusercontent.com/u/15360048?v=4)](https://github.com/duck7000 "duck7000 (200 commits)")

---

Tags

phpapimetadataaudiomusicbrainzcdLpencyclopedia

### Embed Badge

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

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

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[mikealmond/musicbrainz

A PHP library for accessing the MusicBrainz API

6385.1k1](/packages/mikealmond-musicbrainz)[comgate/sdk

Comgate PHP SDK

13327.8k](/packages/comgate-sdk)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)[webit/w-firma-api

wFirma.pl API

1820.2k](/packages/webit-w-firma-api)

PHPackages © 2026

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