Apify actors for pulling recommended artists and their events from the Songkick API.
Currently, one "act" fetches a user's tracked artists and all similar artists. The second act fetches upcoming concerts for the user's tracked metro areas and returns any that are for the artists found in act 1.
Songkick lets you set up notifications for tracked artists, but not for your tracked artists' similar artists. The output of these actors can be used to create an RSS feed of relevant events coming to your tracked metro areas.
Create a file called INPUT.json in apify_storage/key_value_stores/default/ with the contents:
{
"username": "<songkick_username>"
}Then run the following commands to test the actor logic locally:
yarn install
yarn build
export SONGKICK_API_KEY="..."
yarn test-local:fetch-similar-songkick-artistsThe output data will be stored in apify_storage/key_value_stores/songkick-data/
First you'll need a Songkick API key. They responded with mine within a few days.
In your Apify account, create a new Actor with the following settings:
- In Settings tab > Default run configuration:
-
Raise the Timeout to 1800 seconds. This particular script can take a while so you can tune this depending on how many artists you track.
-
Lower the Memory to 128 MB. This is all you need, so you'll save on compute units.
-
Set Body to
{ "username": "<your_songkick_username>" }
-
- In the Source tab:
- In Environment:
- Add
SONGKICK_API_KEY, mark it as secret, and insert your key. - Add
ACT_NAMEand set tofetch-similar-songkick-artists
- Add
- Set the Source type to
Git repository - Set the Git URL to this repo (
https://github.com/mshafer/songkick-apify)
- In Environment:
On the Source tab, click Build to run the Dockerfile and prepare the container.
On the Console tab, click Run and with a bit of you'll start seeing logs of the API requests being made.
You can check the JSON results in Storage > Key-value Stores > songkick-data > artists
Create a new Actor with the following settings:
- In Settings tab > Default run configuration:
-
Lower the Memory to 128 MB. This is all you need, so you'll save on compute units.
-
Set Body to
{ "username": "<your_songkick_username>" }
-
- In the Source tab:
- In Environment:
- Add
SONGKICK_API_KEY, mark it as secret, and insert your key. - Add
ACT_NAMEand set tofetch-local-events
- Add
- Set the Source type to
Git repository - Set the Git URL to this repo (
https://github.com/mshafer/songkick-apify)
- In Environment:
Build and run the actor, and check the results in Storage > Key-value Stores > songkick-data > events
Create a new Crawler in your Apify account with the following settings:
- Start URLs: set to the URL of your
eventsKey-value Store. You can get this URL by clicking the magnifying glass icon on theeventskey in the Storage > Key-value Stores >songkick-datasection of your account. - Clickable elements: set to be empty.
- Page function: copy-paste the code from
src/crawlers/upcoming_concerts.js
Run your crawler, then find the RSS URL on the Runs tab > Latest Run magnifying glass > "RSS Feed"