News for hackers. Stuff that matters.
Re:Ask HN: Is there any software you only made for your own ... by SushiHippie on Friday July 05, 2024 @12:32PM (#40884094)
> Using the Spotify API you can find random music, [...]

Which API endpoint do you use for this?

Re:Ask HN: Is there any software you only made for your own ... by 65 on Friday July 05, 2024 @12:49PM (#40884228)
There is no endpoint for random tracks. The method I found that works the best is to search for two random letters, e.g. "fq", pick a random result, and then use the API to find recommendations based on that track that have a minimum instrumentalness of, say 0.9, then pick a random recommendation from the results. I store all the songs that have been added to the playlist in a DynamoDB database and make sure no song gets added twice.