Who Played on What: Building MusicLink's Catalog
MusicLink is only as good as its data. Why credits are stored per album and not per artist, how the catalog is resolved against Apple's API, and the musicians who hold the whole graph together.
MusicLink is a game about connections between albums. The game code is the small part. The catalog is the product.

People belong to albums, not artists
The first decision was the important one. Credits are stored per album: the lineup and notable guests on that specific record. They are not stored per artist.
That sounds like a detail and it isn't. Band lineups change. If "Dave Grohl" were attached to Queens of the Stone Age as an artist, every QOTSA record would link to every Foo Fighters record, and most of those links would be wrong. Attached to the album, the link is one you can defend: Dave Grohl drummed on Songs for the Deaf. It also means a person can bridge albums by entirely different acts, which is where the best links come from.
A seed entry is as plain as it gets:
["Nirvana", "In Utero", 1993,
["Kurt Cobain", "Krist Novoselic", "Dave Grohl", "Pat Smear", "Steve Albini"],
["grunge"]]
Artist, title, year, the people on that record, and one or two sub-genre keys. Producers count. Steve Albini and Butch Vig link records just as well as drummers do.
Resolving it against Apple
A script takes the seed and resolves every album against Apple's iTunes Search and Lookup API to get IDs and cover art. Three things came out of doing that for more than a thousand albums:
- Search isn't enough. The Search API omits a lot of big-label albums. The pipeline looks up an artist's ID and walks the discography by
artistIdinstead. - Go slowly and cache everything. Requests are paced at roughly 15 a minute and every result is cached on disk. For big batches the work can be split into shards and run from two IP addresses, then the caches merged.
- Keep an override file. Lookups sometimes pick the wrong act with the same name.
artist_ids.jsonis a hand-editable cache that settles the argument.
Apple's collectionId and artistId are kept so the iPhone version can fetch larger artwork through MusicKit and deep-link each album to Apple Music.
Genres fail loudly
A second script maps artists to sub-genres and writes the keys into the seed. If any album comes out untagged, it stops with an error instead of quietly filing it under "other". The picker is only useful if every album is somewhere.
Who holds it together
Once credits are per album, you can ask who the connectors are. In the current seed, Josh Homme is credited on 23 albums, more than anyone. Rick Rubin is on 18.
The more interesting list is people who bridge the most different acts. Benmont Tench, the Heartbreakers' keyboard player, turns up on records by 14 of them, from Bob Dylan to Johnny Cash to Alanis Morissette. Session drummer Jim Keltner links 12. Eric Clapton links 14, which is why one good Clapton record on the board can start a long run.

Those are the deep cuts the game pays 300 for, and they're what the catalog is curated toward. An album with a famous guest is worth more to the game than a better album with nobody on it.
Where it stands
The build that's live has 1,140 albums, 666 artists and 7,565 links. The seed behind it runs from 1955 to 2024 and has already grown past that, and there are experiments in the repo with MusicBrainz as a second source of credits.