PHPackages                             matto1990/lastfm-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. matto1990/lastfm-api

ActiveLibrary[API Development](/categories/api)

matto1990/lastfm-api
====================

Last.fm webservice client

v1.6.4(6y ago)10815.2k↑20%46MITPHPPHP &gt;=5.3.3

Since Mar 17Pushed 1y ago8 watchersCompare

[ Source](https://github.com/matto1990/PHP-Last.fm-API)[ Packagist](https://packagist.org/packages/matto1990/lastfm-api)[ Docs](https://github.com/matto1990/PHP-Last.fm-API)[ RSS](/packages/matto1990-lastfm-api/feed)WikiDiscussions master Synced 1mo ago

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

PHP Last.FM API
===============

[](#php-lastfm-api)

Thank you for using PHP Last.FM API!

You will need your own API key by registering at:

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

[](#installation)

`composer require matto1990/lastfm-api`

Usage
=====

[](#usage)

```
use LastFmApi\Api\AuthApi;
use LastFmApi\Api\ArtistApi;

class LastFm
{
    private $apiKey;
    private $artistApi;

    public function __construct()
    {
        $this->apiKey = 'apikeyfromlastfm'; //required
        $auth = new AuthApi('setsession', array('apiKey' => $this->apiKey));
        $this->artistApi = new ArtistApi($auth);
    }
    public function getBio($artist)
    {
        $artistInfo = $this->artistApi->getInfo(array("artist" => $artist));

        return $artistInfo['bio'];
    }
}
```

Testing
=======

[](#testing)

To run phpunit successfully, a *.env* file must be included in tests/Api:

```
lastfm_api_key=
lastfm_api_secret=
lastfm_token=
lastfm_session_key=
lastfm_username=
```

If you just want to run the tests that don't need authentication: `vendor/bin/phpunit --group notAuthenticated`. In this case you'll only need to set `lastfm_api_key` property.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 57.6% 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 ~84 days

Recently: every ~59 days

Total

15

Last Release

2530d ago

### Community

Maintainers

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

---

Top Contributors

[![devilcius](https://avatars.githubusercontent.com/u/504695?v=4)](https://github.com/devilcius "devilcius (34 commits)")[![normanfeltz](https://avatars.githubusercontent.com/u/1359159?v=4)](https://github.com/normanfeltz "normanfeltz (7 commits)")[![grray](https://avatars.githubusercontent.com/u/1942236?v=4)](https://github.com/grray "grray (5 commits)")[![dzantiev](https://avatars.githubusercontent.com/u/411049?v=4)](https://github.com/dzantiev "dzantiev (2 commits)")[![peppy](https://avatars.githubusercontent.com/u/191335?v=4)](https://github.com/peppy "peppy (2 commits)")[![julianomcl](https://avatars.githubusercontent.com/u/8377967?v=4)](https://github.com/julianomcl "julianomcl (2 commits)")[![bhoodream](https://avatars.githubusercontent.com/u/1740470?v=4)](https://github.com/bhoodream "bhoodream (1 commits)")[![webroru](https://avatars.githubusercontent.com/u/11889133?v=4)](https://github.com/webroru "webroru (1 commits)")[![Chicchi7393](https://avatars.githubusercontent.com/u/25307474?v=4)](https://github.com/Chicchi7393 "Chicchi7393 (1 commits)")[![floydian77](https://avatars.githubusercontent.com/u/37127210?v=4)](https://github.com/floydian77 "floydian77 (1 commits)")[![jwoldan](https://avatars.githubusercontent.com/u/611085?v=4)](https://github.com/jwoldan "jwoldan (1 commits)")[![rubencougil](https://avatars.githubusercontent.com/u/1073799?v=4)](https://github.com/rubencougil "rubencougil (1 commits)")[![stepri](https://avatars.githubusercontent.com/u/3134589?v=4)](https://github.com/stepri "stepri (1 commits)")

---

Tags

apilast.fmwebservice client

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matto1990-lastfm-api/health.svg)

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

###  Alternatives

[nucleos/lastfm

Last.fm webservice client for php.

1812.9k2](/packages/nucleos-lastfm)[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)[barryvanveen/lastfm

Last.fm API client for PHP 7+

254.5k](/packages/barryvanveen-lastfm)

PHPackages © 2026

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