Discover by vibe
Seed a /recommendations call from a track the listener already loves, then filter by audio analysis to match a mood.
Step 1: Get the seed track
JavaScript
const headers = { 'User-Agent': '[email protected]' };
const seed = await fetch(
'https://api.synkradio.co.uk/track/info?artist=Daft%20Punk&title=Get%20Lucky',
{ headers }
).then((r) => r.json());Step 2: Ask for recommendations
JavaScript
const recs = await fetch(
`https://api.synkradio.co.uk/recommendations?track=${seed.id}&limit=40`,
{ headers }
).then((r) => r.json());Step 3: Filter by audio analysis
JavaScript
const upbeat = recs.tracks.filter((t) =>
t.energy > 0.7 && t.valence > 0.6 && t.bpm > 110
);That gives you tracks that share a sonic neighbourhood with the seed but match the mood you actually want.
Why filter client-side?
The analysis fields come back on every recommendation already, so a follow-up call is wasted. Filter in memory and you pay one round trip total.