This project utilizes the Spotify and Ticketmaster APIs to recommend music events based on a user's favorite artist. It generates a list of top 5 artists with similar musical styles and provides information about their upcoming events.
Watch the demo here (includes audio).
-
Spotify API Key:
- Follow the instructions in this video to obtain a Spotify API key.
- Use the obtained key for authorization to access the Spotify API.
-
Ticketmaster API Key:
- Obtain a Ticketmaster API key from Ticketmaster Developer Portal.
- Replace the placeholder
TM_KEY
inmain.py
andapp.py
with your Ticketmaster API key.
The interaction with the program is done through a web page. Follow these steps:
- Enter your favorite artist's name on the index page.
- Click the "Get Recommendation" button.
- The program generates the top 5 similar artists.
- Optionally, click on the "Get Events" button to see a list of events by these artists.
- Each event is a hyperlink leading to the event details page.
python-dotenv
requests
flask
In the command line, run the following command:
$ flask --app app run
- Spotify API Documentation
- Response Format: JSON
- Authorization: OAuth 2.0
- Endpoints Used:
/search
: Search for an artist using the artist's name./artists/{id}/related-artists
: Get related artists for a given artist ID.
- Ticketmaster API Documentation
- Response Format: JSON
- Authorization: OAuth 2.0
- Endpoints Used:
/discovery/v2/attractions
:Attraction Search: Find attractions (artists, sports, packages, plays, etc.)./discovery/v2/events
:Event Search: Find events by location, date, availability, etc.
The program uses a graph data structure to calculate the most related top 5 artists based on their genres. Nodes represent artists, and edges connect artists with the same genre. Similarity scores are calculated based on the overlap of genres.
- The user interacts with the application through a web page.
- Enter a favorite artist, click "Get Recommendation" to see the top 5 similar artists.
- Optionally, click "Get Events" to see a list of events by each artist.
- Events are presented as hyperlinks leading to the event details page.
Feel free to explore the project, provide feedback, and contribute to its development!