PHPackages                             tapp/php-sdk-bands-in-town-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. tapp/php-sdk-bands-in-town-api

ActiveLibrary[API Development](/categories/api)

tapp/php-sdk-bands-in-town-api
==============================

PHP SDK for Bands In Town API

v2.0.0(2y ago)03.7k↓78.8%MITPHPPHP ^8.1CI failing

Since May 17Pushed 2y ago4 watchersCompare

[ Source](https://github.com/TappNetwork/php-sdk-bands-in-town-api)[ Packagist](https://packagist.org/packages/tapp/php-sdk-bands-in-town-api)[ Docs](https://github.com/TappNetwork/php-sdk-bands-in-town-api)[ RSS](/packages/tapp-php-sdk-bands-in-town-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (10)Versions (5)Used By (0)

PHP SDK for Bands In Town API
=============================

[](#php-sdk-for-bands-in-town-api)

Provides a PHP wrapper for Bands In Town [public](https://artists.bandsintown.com/support/public-api) and [search](https://artists.bandsintown.com/support/partner-search-api/) APIs.

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

[](#installation)

Installing via Composer:

```
composer require tapp/php-sdk-bands-in-town-api
```

Usage
-----

[](#usage)

### Instantiate the API class

[](#instantiate-the-api-class)

```
use BandsInTownApi\BandsInTownApi;

$bandsInTownApi = new BandsInTownApi;
```

### Public API

[](#public-api)

Public API documentation:

```
$bandsInTownApi->api('public')
```

### Authentication

[](#authentication)

```
$bandsInTownApi->withQueryAuth('app_id', 'your-app-id');
```

#### Artist Info By Name

[](#artist-info-by-name)

```
$bandsInTownApi->api('public')->artistInfoByName('artist name');
```

E.g.:

```
$artistInfoByName = $bandsInTownApi->api('public')->artistInfoByName('Justin Bieber');
$artistInfoByName->body();
// "{"id": "307871", "name": "Justin Bieber", "url": "https://www.bandsintown.com/a/307871?came_from=267&app_id=58c406aaf44bbb601a1bc5a75d0a4ca6", "mbid": "e0140a67-e4d1-4f13-8a01-364355bee46e", "options": {"display_listen_unit": false}, "tracking": [], "image_url": "https://photos.bandsintown.com/large/11112851.jpeg", "thumb_url": "https://photos.bandsintown.com/thumb/11112851.jpeg", "facebook_page_url": "http://www.facebook.com/67253243887", "tracker_count": 5295141, "upcoming_event_count": 0, "support_url": "", "links": [{"type": "itunes", "url": "https://itunes.apple.com/us/artist/justin-bieber/320569549"}, {"type": "youtube", "url": "https://www.youtube.com/user/kidrauhl"}, {"type": "amazon", "url": "https://music.amazon.com/artists/B002F0BWIM"}, {"type": "spotify", "url": "https://open.spotify.com/artist/1uNFoZAHBGtllmzznpCI3s"}, {"type": "snapchat", "url": "https://www.snapchat.com/add/rickthesizzler"}, {"type": "store/merch", "url": "https://shop.justinbiebermusic.com"}, {"type": "tumblr", "url": "https://justinbieber.tumblr.com"}, {"type": "newsletter", "url": "https://www.justinbiebermusic.com"}, {"type": "soundcloud", "url": "https://soundcloud.com/justinbieber"}, {"type": "facebook", "url": "https://www.facebook.com/JustinBieber/"}, {"type": "iheart", "url": "https://www.iheart.com/artist/justin-bieber-44368/"}, {"type": "instagram", "url": "https://www.instagram.com/justinbieber/"}, {"type": "website", "url": "https://www.justinbiebermusic.com/"}, {"type": "vevo", "url": "https://www.youtube.com/user/JustinBieberVEVO"}, {"type": "twitter", "url": "https://twitter.com/justinbieber"}], "artist_optin_show_phone_number": false, "show_multi_ticket": true}"
```

#### Artist Info By Id

[](#artist-info-by-id)

```
$bandsInTownApi->api('public')->artistInfoById('artist id');
```

E.g.:

```
$artistInfoById = $bandsInTownApi->api('public')->artistInfoById('307871');
```

#### Artist Info By Facebook Page Id

[](#artist-info-by-facebook-page-id)

```
$bandsInTownApi->api('public')->artistInfoByFacebookPageId('facebook page id');
```

E.g.:

```
$artistInfoById = $bandsInTownApi->api('public')->artistInfoByFacebookPageId('67253243887');
```

#### Artist Upcoming Events

[](#artist-upcoming-events)

```
$bandsInTownApi->api('public')->artistUpcomingEvents('artist name');
```

E.g.:

```
$artistUpcomingEvents = $bandsInTownApi->api('public')->artistUpcomingEvents('Christina Aguilera');;

$artistUpcomingEvents->body();
// [{"id":"104054519","url":"https:\/\/www.bandsintown.com\/e\/104054519?app_id=58c406aaf44bbb601a1bc5a75d0a4ca6&came_from=267&utm_medium=api&utm_source=public_api&utm_campaign=event","datetime":"2023-05-06T15:00:00","title":"Lovers & Friends 2023","description":"","artist":{"id":"39","name":"Christina Aguilera","url":"https:\/\/www.bandsintown.com\/a\/39?came_from=267&app_id=58c406aaf44bbb601a1bc5a75d0a4ca6","mbid":"b202beb7-99bd-47e7-8b72-195c8d72ebdd","options":{"display_listen_unit":false},"tracking":[],"image_url":"https:\/\/photos.bandsintown.com\/large\/12754027.jpeg","thumb_url":"https:\/\/photos.bandsintown.com\/thumb\/12754027.jpeg","facebook_page_url":"http:\/\/www.facebook.com\/5565627823","tracker_count":2024835,"upcoming_event_count":1,"support_url":"","links":[{"type":"facebook","url":"https:\/\/www.facebook.com\/christinaaguilera\/"},{"type":"tiktok","url":"https:\/\/www.tiktok.com\/@xtina"},{"type":"linktree","url":"https:\/\/linktr.ee\/xtinauniverse"},{"type":"website","url":"https:\/\/www.christinaaguilera.com\/"},{"type":"youtube","url":"https:\/\/www.youtube.com\/christinaaguilera"},{"type":"twitter","url":"https:\/\/twitter.com\/XTINA"},{"type":"instagram","url":"https:\/\/www.instagram.com\/xtina\/"},{"type":"spotify","url":"https:\/\/open.spotify.com\/artist\/1l7ZsJRRS8wlW3WfJfPfNS"},{"type":"itunes","url":"https:\/\/music.apple.com\/artist\/christina-aguilera\/259398"},{"type":"soundcloud","url":"https:\/\/soundcloud.com\/christinaaguilera"}],"artist_optin_show_phone_number":false,"show_multi_ticket":true},"venue":{"location":"Las Vegas, NV","name":"Lovers & Friends 2023","latitude":"36.1431237","longitude":"-115.1621698","street_address":"311 W Sahara Ave","postal_code":"89101","city":"Las Vegas","country":"United States","region":"NV"},"lineup":["Christina Aguilera"],"offers":[{"type":"Tickets","url":"https:\/\/www.bandsintown.com\/t\/104054519?app_id=58c406aaf44bbb601a1bc5a75d0a4ca6&came_from=267&utm_medium=api&utm_source=public_api&utm_campaign=ticket","status":"available"}],"artist_id":"39","on_sale_datetime":"","festival_start_date":"2023-05-06","festival_end_date":"2023-05-06","festival_datetime_display_rule":"date","starts_at":"2023-05-06T15:00:00","ends_at":"2023-05-06T23:30:00","datetime_display_rule":"datetime","bandsintown_plus":false}]
$artistUpcomingEvents->status();
// 200
```

#### Artist Events By Date Range

[](#artist-events-by-date-range)

```
$bandsInTownApi->api('public')->artistEventsByDateRange('artist name');
```

E.g.:

```
$artistEventsByDateRange = $bandsInTownApi->api('public')->artistEventsByDateRange('Christina Aguilera', '2023-05-01,2023-06-01');
```

#### Artist Past Events

[](#artist-past-events)

```
$bandsInTownApi->api('public')->artistPastEvents('artist name');
```

E.g.:

```
$artistPastEvents = $bandsInTownApi->api('public')->artistPastEvents('Christina Aguilera');
```

#### All Artist Events

[](#all-artist-events)

```
$bandsInTownApi->api('public')->artistAllEvents('artist name');
```

E.g.:

```
$allArtistEvents = $bandsInTownApi->api('public')->artistAllEvents('Christina Aguilera');
```

### Search API

[](#search-api)

Search API documentation:

```
$bandsInTownApi->api('search')
```

### Authentication

[](#authentication-1)

```
$bandsInTownApi->withHeaderAuth('your-api-key');
```

### Available methods

[](#available-methods)

Array of entities to search

```
->entities([
    [
        'type' => 'artist',
        'order' => 'trackers',
        'limit' => 2,
        'offset' => 0,
    ],
])
```

Term to search

```
->term('Bell')
```

Type to search. Possible values: 'streaming', 'physical', 'both' (default)

```
->type('streaming')
```

Genre to search. Possible values: see [https://artists.bandsintown.com/support/partner-search-api/#query\_string\_parameters](https://artists.bandsintown.com/support/partner-search-api/#query_string_parameters)

```
->genre('pop')
```

Genres to search. Possible values: see [https://artists.bandsintown.com/support/partner-search-api/#query\_string\_parameters](https://artists.bandsintown.com/support/partner-search-api/#query_string_parameters)

```
->genres([
    'pop',
    'jazz'
])
```

Restrict search to the provided scopes of entity for a given term. Possible values: 'artist', 'event', 'venue', 'event\_id'

```
->scopes([
    'artist',
])
```

Limit search to a provided region. Not applicable for artist

```
->region([
    'latitude' => 45.496112,
    'longitude' => -73.569315,
])
```

Limit search to a range of dates. Only for event search

```
->period([
    'starts_at' => '2021-08-20T00:00:00Z',
    'ends_at' => '2021-08-23T00:00:00Z',
])
```

Filter search. Possible values: 'on tour' (for artist search), "recommended", "tracked artist" (when user object is provided)

```
->filter('on tour')
```

Send the request

```
->send()
```

Examples:

#### Single entity with pagination (search by artist with pagination)

[](#single-entity-with-pagination-search-by-artist-with-pagination)

```
$artist = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'artist',
            'order' => 'trackers',
            'limit' => 2,
            'offset' => 0,
        ],
    ])
    ->term('Lady')
    ->scopes([
        'artist'
    ])
    ->send();
```

#### Retrieve multiple entities (search by artist and events with pagination)

[](#retrieve-multiple-entities-search-by-artist-and-events-with-pagination)

```
$artistAndEvent = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'artist',
            'order' => 'trackers',
            'limit' => 2,
            'offset' => 0,
        ],
        [
            'type' => 'event',
            'order' => 'rsvps',
            'limit' => 4,
        ]
    ])
    ->term('Lady')
    ->scopes([
        'artist',
        'event',
    ])
    ->send();
```

#### Retrieve a specific event

[](#retrieve-a-specific-event)

```
$event = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
        ]
    ])
    ->term('102617588')
    ->scopes([
        'event_id',
    ])
    ->send();
```

#### Search events by artist id

[](#search-events-by-artist-id)

```
$event = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
            'order' => 'rsvps',
            'limit' => 4,
        ],
    ])
    ->term('22741')
    ->scopes([
        'artist_id',
    ])
    ->send();
```

#### Search venues by name or by id

[](#search-venues-by-name-or-by-id)

```
// search by venue name
$venue = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'venue',
        ],
    ])
    ->term('Bell Centre')
    ->scopes([
        'venue',
    ])
    ->send();
```

```
// search by venue id
$venue = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'venue',
        ],
    ])
    ->term('10003087')
    ->scopes([
        'venue_id',
    ])
    ->send();
```

#### Search events by venue id

[](#search-events-by-venue-id)

```
$events = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
        ],
    ])
    ->term('10003087')
    ->scopes([
        'venue_id'
    ])
    ->send();
```

#### Search events and artists who played in a specific venue by venue id and genre

[](#search-events-and-artists-who-played-in-a-specific-venue-by-venue-id-and-genre)

```
$events = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
        ],
    ])
    ->term('10003087')
    ->genre('pop')
    ->send();
```

#### Search events by GPS coordinates and genre

[](#search-events-by-gps-coordinates-and-genre)

```
$events = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
        ],
    ])
    ->region([
        'latitude' => 45.496112,
        'longitude' => -73.569315,
    ])
    ->genre('pop')
    ->send();
```

#### Search live streaming events

[](#search-live-streaming-events)

```
$events = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
        ],
    ])
    ->term('jason wild')
    ->type('streaming')
    ->send();
```

#### Search live streaming events by genre

[](#search-live-streaming-events-by-genre)

```
$events = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
        ],
    ])
    ->genre('latin')
    ->type('streaming')
    ->send();
```

#### Search physical events, last modified in a period of time, ordered by start date

[](#search-physical-events-last-modified-in-a-period-of-time-ordered-by-start-date)

```
$events = $bandsInTownApi->api('search')
    ->entities([
        [
            'type' => 'event',
            'order' => 'start_date',
            'limit' => 199,
            'offset' => 0,
        ],
    ])
    ->term('2021-08-20T00:00:00ZTO2021-08-23T00:00:00Z')
    ->scopes(['last_modified_date'])
    ->type('physical')
    ->send();
```

Testing
-------

[](#testing)

```
./vendor/bin/pest
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Contributions are welcome! :)

License
-------

[](#license)

The MIT License (MIT). Read [License](LICENSE) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~107 days

Total

4

Last Release

773d ago

Major Versions

v1.0.2 → v2.0.02024-04-05

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/4c469e4e441a135287b2154a0a39f543893cbe1e2c3ab066e3e7c66a974a39e2?d=identicon)[scottgrayson](/maintainers/scottgrayson)

![](https://www.gravatar.com/avatar/5d0402fb770bca016dd6ee6a925501e0224783f1e5907788aee0ba7bc31c01ee?d=identicon)[andreiabohner](/maintainers/andreiabohner)

![](https://www.gravatar.com/avatar/5ac72d31fcf96191b82f452d6df6990219c5ffdfd7673859d3fa46cf1dd6193b?d=identicon)[johnwesely](/maintainers/johnwesely)

---

Top Contributors

[![andreia](https://avatars.githubusercontent.com/u/38911?v=4)](https://github.com/andreia "andreia (12 commits)")[![swilla](https://avatars.githubusercontent.com/u/304159?v=4)](https://github.com/swilla "swilla (9 commits)")

---

Tags

apisdktapp networkbands in town

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tapp-php-sdk-bands-in-town-api/health.svg)

```
[![Health](https://phpackages.com/badges/tapp-php-sdk-bands-in-town-api/health.svg)](https://phpackages.com/packages/tapp-php-sdk-bands-in-town-api)
```

###  Alternatives

[saloonphp/laravel-plugin

The official Laravel plugin for Saloon

805.7M125](/packages/saloonphp-laravel-plugin)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[orzcc/taobao-top-client

Taobao top client(SDK) for laravel

11125.9k](/packages/orzcc-taobao-top-client)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

5010.8k](/packages/claude-php-claude-php-sdk-laravel)

PHPackages © 2026

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