Skip to content

Recommendations ​

Postgres + pgvector. Tracks get a 128-dimension embedding (track_embeddings, HNSW, cosine); listeners get a taste vector (user_taste_vectors). Candidates come from ANN search (<=>), co-listening (co_listen_pairs), new releases from followed creators, editorial picks and trending; a pure ranking engine scores, filters and spreads artists out. Personal products are built nightly on the reco queue and stored in candidate_sets; reads re-filter them (takedowns, hides, explicit setting) and hydrate track cards in one catalogue call.

All responses use { data, meta }. Errors are RFC 9457 problem details.

Shared shapes ​

RecommendedTrack: recordingId, title, releaseId|null, profileIds[] (primary first), artworkAssetId|null, durationMs, isExplicit, reason, reasonRecordingId|null, reasonProfileId|null.

reason: similar_sound, listened_together, followed_release, editorial, trending, taste_match, artist_you_like, familiar.

Shelf: key, kind, titleKey (i18n key, such as reco.daily_mix), slot, candidateSetId|null, seedRecordingId|null, seedProfileId|null, seedGenreId|null, generatedAt, expiresAt|null, items: RecommendedTrack[].

kind: daily_mix, discover_weekly, release_radar, because_you_played, artist_radio, track_radio, home_trending, home_editorial.

Endpoints ​

MethodPathAuthBody / queryResponseErrors
GET/v1/reco/homeoptional—{ personalized, shelves: Shelf[] }. Guests: trending + editorial only. Signed in: daily mixes, because-you-played, Discover Weekly, Release Radar, then trending/editorial for the listener's country (20 items each). Missing or expired products are queued for building.429
GET/v1/reco/radio/tracks/:recordingIdoptionallimit 1–100 (50)Shelf (track_radio), seed first. Personalised when signed in.400, 404 RECO_SEED_NOT_FOUND, 429
GET/v1/reco/radio/artists/:profileIdoptionallimit 1–100 (50)Shelf (artist_radio)400, 404 RECO_SEED_NOT_FOUND, 429
GET/v1/me/reco/daily-mixesuser—Shelf[], up to 6, slots 1–6401
GET/v1/me/reco/daily-mixes/:slotuserslot 1–6Shelf (up to 100 items)400, 401, 404 RECO_SET_NOT_FOUND
GET/v1/me/reco/because-you-playeduser—Shelf[], up to 3, each seeded by a recent favourite401
GET/v1/me/reco/discover-weeklyuser—Shelf (30 unheard tracks; rebuilt Mondays 04:00 UTC)401, 404 RECO_SET_NOT_FOUND (not built yet; a build is queued)
GET/v1/me/reco/release-radaruser—Shelf (new tracks from followed and loved creators, last 14 days; rebuilt Fridays)401, 404 RECO_SET_NOT_FOUND
GET/v1/me/reco/explanations/:recordingIduser—`{ recordingId, reasons: [{ reason, strength 0–1, recordingIdnull, profileId
POST/v1/me/reco/feedbackuser{ recordingId, kind, surface, candidateSetId?, profileId? }202 { status: "accepted" }400, 401, 429
POST/v1/me/reco/impressionsuser{ items: [{ recordingId, surface, candidateSetId?, position }] } (1–100)202 { status: "accepted" }400, 401, 429

Feedback kind: skip (affinity −0.5, ranking penalty), like (+3), unlike (−3), hide (track never recommended again), hide_artist (needs profileId), unhide (removes the track, and the artist when profileId is given, from hidden).

surface: home, daily_mix, discover_weekly, release_radar, because_you_played, artist_radio, track_radio, assistant.

Rate limits: reads 240/min per user and per IP; feedback and impressions 600/min per user.

Errors ​

CodeStatusMeaning
RECO_SEED_NOT_FOUND404The radio seed is unknown, unavailable, or has nothing similar yet
RECO_SET_NOT_FOUND404That product hasn't been built for this listener yet
RECO_EXPLANATION_UNAVAILABLE404No evidence links this track to the listener

Events ​

TypePayloadWhen
recommendation.product.ready{ userId, kind, candidateSetId, slot, generatedAt }Discover Weekly or Release Radar rebuilt with items (for "your mix is ready" notifications)

Pipelines (reco queue) ​

JobTriggerWork
reco.streamapi.recordQualifiedStreamDedupe on eventId (partitioned reco_listen_events), add decayed track and creator affinity
reco.feedbackroute / api.recordFeedbackStore feedback, adjust affinity or hidden items
reco.impressionsroute / api.recordImpressionsInsert into partitioned reco_impressions
reco.featuresapi.upsertTrackFeaturesStore analysis scalars, genres, moods, optional audio embedding; then reco.embed
reco.nightlycron RECO_NIGHTLY_CRONCreate partitions 3 months ahead, drop old ones (listen 6 months, impressions 3), add yesterday's co-listen pairs, purge expired sets, start the embedding scan
reco.embed-scan → reco.taste-scan → reco.user-productschainedEmbeddings for changed tracks, taste vectors for users active in RECO_ACTIVE_USER_DAYS, then each user's due products

Account privacy ​

Data export section recommendation: track and artist affinity, feedback, hidden items. Deletion erases all signals.

Quick picks and deep cuts ​

GET /me/reco/quick-picks?limit (recent favourites, then tracks played alongside them) and GET /me/reco/deep-cuts?limit (least-streamed tracks from followed or most-played creators the person hasn't played). Both return a Shelf with kind quick_picks or deep_cuts; tracks carry artworkUrl.

Quick picks and deep cuts ​

GET /me/reco/quick-picks?limit (recent favourites, then tracks played alongside them) and GET /me/reco/deep-cuts?limit (less-streamed tracks from creators the person follows or plays). Both answer a shelf (kind: quick_picks | deep_cuts) with artworkUrl on items.

Plemuz API v2