{"id":22398710,"url":"https://github.com/tappnetwork/php-sdk-bands-in-town-api","last_synced_at":"2025-03-26T23:42:44.958Z","repository":{"id":166604453,"uuid":"629247075","full_name":"TappNetwork/php-sdk-bands-in-town-api","owner":"TappNetwork","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-05T18:40:57.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T03:12:33.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TappNetwork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-17T23:49:44.000Z","updated_at":"2023-05-17T20:53:12.000Z","dependencies_parsed_at":"2023-10-03T06:21:37.951Z","dependency_job_id":null,"html_url":"https://github.com/TappNetwork/php-sdk-bands-in-town-api","commit_stats":null,"previous_names":["tappnetwork/php-sdk-bands-in-town-api"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TappNetwork%2Fphp-sdk-bands-in-town-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TappNetwork%2Fphp-sdk-bands-in-town-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TappNetwork%2Fphp-sdk-bands-in-town-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TappNetwork%2Fphp-sdk-bands-in-town-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TappNetwork","download_url":"https://codeload.github.com/TappNetwork/php-sdk-bands-in-town-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245755596,"owners_count":20667027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T07:11:53.498Z","updated_at":"2025-03-26T23:42:44.938Z","avatar_url":"https://github.com/TappNetwork.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP SDK for Bands In Town API\n\nProvides 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.\n\n## Installation\n\nInstalling via Composer:\n\n```bash\ncomposer require tapp/php-sdk-bands-in-town-api\n```\n\n## Usage\n\n### Instantiate the API class\n\n```php\nuse BandsInTownApi\\BandsInTownApi;\n\n$bandsInTownApi = new BandsInTownApi;\n```\n\n### Public API\n\nPublic API documentation:  \nhttps://artists.bandsintown.com/support/public-api\n\n```php\n$bandsInTownApi-\u003eapi('public')\n```\n\n### Authentication\n\n```php\n$bandsInTownApi-\u003ewithQueryAuth('app_id', 'your-app-id');\n```\n\n#### Artist Info By Name\n\n```php\n$bandsInTownApi-\u003eapi('public')-\u003eartistInfoByName('artist name');\n```\n\nE.g.:\n```php\n$artistInfoByName = $bandsInTownApi-\u003eapi('public')-\u003eartistInfoByName('Justin Bieber');\n$artistInfoByName-\u003ebody();\n// \"{\"id\": \"307871\", \"name\": \"Justin Bieber\", \"url\": \"https://www.bandsintown.com/a/307871?came_from=267\u0026app_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}\"\n```\n\n#### Artist Info By Id\n\n```php\n$bandsInTownApi-\u003eapi('public')-\u003eartistInfoById('artist id');\n```\n\nE.g.:\n```php\n$artistInfoById = $bandsInTownApi-\u003eapi('public')-\u003eartistInfoById('307871');\n```\n\n#### Artist Info By Facebook Page Id\n\n```php\n$bandsInTownApi-\u003eapi('public')-\u003eartistInfoByFacebookPageId('facebook page id');\n```\n\nE.g.:\n```php\n$artistInfoById = $bandsInTownApi-\u003eapi('public')-\u003eartistInfoByFacebookPageId('67253243887');\n```\n\n#### Artist Upcoming Events\n\n```php\n$bandsInTownApi-\u003eapi('public')-\u003eartistUpcomingEvents('artist name');\n```\n\nE.g.:\n```php\n$artistUpcomingEvents = $bandsInTownApi-\u003eapi('public')-\u003eartistUpcomingEvents('Christina Aguilera');;\n\n$artistUpcomingEvents-\u003ebody();\n// [{\"id\":\"104054519\",\"url\":\"https:\\/\\/www.bandsintown.com\\/e\\/104054519?app_id=58c406aaf44bbb601a1bc5a75d0a4ca6\u0026came_from=267\u0026utm_medium=api\u0026utm_source=public_api\u0026utm_campaign=event\",\"datetime\":\"2023-05-06T15:00:00\",\"title\":\"Lovers \u0026 Friends 2023\",\"description\":\"\",\"artist\":{\"id\":\"39\",\"name\":\"Christina Aguilera\",\"url\":\"https:\\/\\/www.bandsintown.com\\/a\\/39?came_from=267\u0026app_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 \u0026 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\u0026came_from=267\u0026utm_medium=api\u0026utm_source=public_api\u0026utm_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}]\n$artistUpcomingEvents-\u003estatus(); \n// 200\n```\n\n#### Artist Events By Date Range\n\n```php\n$bandsInTownApi-\u003eapi('public')-\u003eartistEventsByDateRange('artist name');\n```\n\nE.g.:\n```php\n$artistEventsByDateRange = $bandsInTownApi-\u003eapi('public')-\u003eartistEventsByDateRange('Christina Aguilera', '2023-05-01,2023-06-01');\n```\n\n#### Artist Past Events\n\n```php\n$bandsInTownApi-\u003eapi('public')-\u003eartistPastEvents('artist name');\n```\n\nE.g.:\n```php\n$artistPastEvents = $bandsInTownApi-\u003eapi('public')-\u003eartistPastEvents('Christina Aguilera');\n```\n\n#### All Artist Events\n\n```php\n$bandsInTownApi-\u003eapi('public')-\u003eartistAllEvents('artist name');\n```\n\nE.g.:\n```php\n$allArtistEvents = $bandsInTownApi-\u003eapi('public')-\u003eartistAllEvents('Christina Aguilera');\n```\n\n### Search API\n\nSearch API documentation: \nhttps://artists.bandsintown.com/support/partner-search-api/\n\n```php\n$bandsInTownApi-\u003eapi('search')\n```\n\n### Authentication\n```php\n$bandsInTownApi-\u003ewithHeaderAuth('your-api-key');\n```\n\n### Available methods\n\nArray of entities to search\n```php\n-\u003eentities([\n    [\n        'type' =\u003e 'artist',\n        'order' =\u003e 'trackers',\n        'limit' =\u003e 2,\n        'offset' =\u003e 0,\n    ],\n])\n```\n\nTerm to search\n```php\n-\u003eterm('Bell')\n```\n\nType to search. Possible values: 'streaming', 'physical', 'both' (default)\n```php\n-\u003etype('streaming')\n```\n\nGenre to search. Possible values: see https://artists.bandsintown.com/support/partner-search-api/#query_string_parameters\n```php\n-\u003egenre('pop')\n```\n\nGenres to search. Possible values: see https://artists.bandsintown.com/support/partner-search-api/#query_string_parameters\n```php\n-\u003egenres([\n    'pop', \n    'jazz'\n])\n```\n\nRestrict search to the provided scopes of entity for a given term. Possible values: 'artist', 'event', 'venue', 'event_id'\n```php\n-\u003escopes([\n    'artist',\n])\n```\n\nLimit search to a provided region. Not applicable for artist\n```php\n-\u003eregion([\n    'latitude' =\u003e 45.496112,\n    'longitude' =\u003e -73.569315,\n])\n```\n\nLimit search to a range of dates. Only for event search\n```php\n-\u003eperiod([\n    'starts_at' =\u003e '2021-08-20T00:00:00Z',\n    'ends_at' =\u003e '2021-08-23T00:00:00Z',\n])\n```\n\nFilter search. Possible values: 'on tour' (for artist search), \"recommended\", \"tracked artist\" (when user object is provided)\n```php\n-\u003efilter('on tour')\n```\n\nSend the request\n```php\n-\u003esend()\n```\n\nExamples:\n\n#### Single entity with pagination (search by artist with pagination)\n\n```php\n$artist = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'artist',\n            'order' =\u003e 'trackers',\n            'limit' =\u003e 2,\n            'offset' =\u003e 0,\n        ],\n    ])\n    -\u003eterm('Lady')\n    -\u003escopes([\n        'artist'\n    ])\n    -\u003esend();\n```\n\n#### Retrieve multiple entities (search by artist and events with pagination)\n\n```php\n$artistAndEvent = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'artist',\n            'order' =\u003e 'trackers',\n            'limit' =\u003e 2,\n            'offset' =\u003e 0,\n        ],\n        [\n            'type' =\u003e 'event',\n            'order' =\u003e 'rsvps',\n            'limit' =\u003e 4,\n        ]\n    ])\n    -\u003eterm('Lady')\n    -\u003escopes([\n        'artist',\n        'event',\n    ])\n    -\u003esend();\n```\n\n####  Retrieve a specific event\n\n```php\n$event = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n        ]\n    ])\n    -\u003eterm('102617588')\n    -\u003escopes([\n        'event_id',\n    ])\n    -\u003esend();\n```\n\n####  Search events by artist id\n\n```php\n$event = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n            'order' =\u003e 'rsvps',\n            'limit' =\u003e 4,\n        ],\n    ])\n    -\u003eterm('22741')\n    -\u003escopes([\n        'artist_id',\n    ])\n    -\u003esend();\n```\n\n\n####  Search venues by name or by id\n\n```php\n// search by venue name\n$venue = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'venue',\n        ],\n    ])\n    -\u003eterm('Bell Centre')\n    -\u003escopes([\n        'venue',\n    ])\n    -\u003esend();\n```\n\n```php\n// search by venue id\n$venue = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'venue',\n        ],\n    ])\n    -\u003eterm('10003087')\n    -\u003escopes([\n        'venue_id',\n    ])\n    -\u003esend();\n```\n\n#### Search events by venue id\n\n```php\n$events = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n        ],\n    ])\n    -\u003eterm('10003087')\n    -\u003escopes([\n        'venue_id'\n    ])\n    -\u003esend();\n```\n\n#### Search events and artists who played in a specific venue by venue id and genre\n\n```php\n$events = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n        ],\n    ])\n    -\u003eterm('10003087')\n    -\u003egenre('pop')\n    -\u003esend();\n```\n\n#### Search events by GPS coordinates and genre\n\n```php\n$events = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n        ],\n    ])\n    -\u003eregion([\n        'latitude' =\u003e 45.496112,\n        'longitude' =\u003e -73.569315,\n    ])\n    -\u003egenre('pop')\n    -\u003esend();\n```\n\n#### Search live streaming events\n\n```php\n$events = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n        ],\n    ])\n    -\u003eterm('jason wild')\n    -\u003etype('streaming')\n    -\u003esend();\n```\n\n#### Search live streaming events by genre\n\n```php\n$events = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n        ],\n    ])\n    -\u003egenre('latin')\n    -\u003etype('streaming')\n    -\u003esend();\n```\n\n#### Search physical events, last modified in a period of time, ordered by start date\n\n```php\n$events = $bandsInTownApi-\u003eapi('search')\n    -\u003eentities([\n        [\n            'type' =\u003e 'event',\n            'order' =\u003e 'start_date',\n            'limit' =\u003e 199,\n            'offset' =\u003e 0,\n        ],\n    ])\n    -\u003eterm('2021-08-20T00:00:00ZTO2021-08-23T00:00:00Z')\n    -\u003escopes(['last_modified_date'])\n    -\u003etype('physical')\n    -\u003esend();\n```\n\n## Testing\n\n```bash\n./vendor/bin/pest\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nContributions are welcome! :)\n\n## License\n\nThe MIT License (MIT). Read [License](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftappnetwork%2Fphp-sdk-bands-in-town-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftappnetwork%2Fphp-sdk-bands-in-town-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftappnetwork%2Fphp-sdk-bands-in-town-api/lists"}