Spotify API
Build your own monthly Wrapped with mood and genre trends
Pull your top tracks, artists, and audio features from Spotify. Track listening patterns, energy levels, and genre trends over time.
Free for all Spotify accounts. Dynamic rate limits (~180 req/min).
How it works with Loony
Describe it.
Deploy it.
Query it.
Managed database.
Your Spotify data lives in its own Postgres instance. Zero config. Data accumulates over time.
Scheduled syncs.
Cron jobs run on Loony infra. Every minute on free. Your data stays fresh without you thinking about it.
REST + MCP endpoints.
Query from your agent, your dashboard, or connect BI tools directly. Full OpenAPI spec included.
$ "Pull my Spotify top tracks and recently played with audio features. Store daily snapshots. Build monthly summaries with top genres, average energy, and listening hours." ✓ Schema validated ✓ Database provisioned ✓ Scripts deployed ✓ Schedules registered Done. # Your data is now at: REST /data/v1/spotify/query MCP /mcp/v1/spotify/mcp SQL psql $DATABASE_URL
What you get
Spotify only gives you the last 50 recently played tracks. Loony syncs daily and accumulates your listening history in Postgres, building a permanent record. After 3 months, you have data Spotify Wrapped can't touch.
mv_monthly_listening month date -- first of month top_artist text -- most played top_genre text -- dominant genre hours numeric -- total listening avg_energy numeric -- 0.0-1.0 avg_valence numeric -- 0.0-1.0 (happiness) unique_tracks integer -- distinct tracks played
Even better together
Pair Spotify mood data with Open-Meteo weather to see if you listen to sadder music when it rains. Join with Strava to build workout-music playlists based on what you play during runs.