tangle
developers beta
Tangle API · beta

Connect to any Tangle collection

Your app gets the whole collection of every Tangle user who connects it: each track, playlist and tag across Spotify, Tidal, Bandcamp, Rekordbox and the rest, merged. They approve once. Your app reads the collection, changes it, and hears every change live.

Open standard

Tangle’s API implements the Open Music Collection spec

Open Music Collection (OMC) is an open standard for music collections: the songs and albums people keep, where each copy lives, the lists they make, and room for any app’s own data. The Tangle API at https://api.tangle.music/omc/v1 implements OMC Access, the protocol apps use to read and change a collection, so what you build for Tangle works with any home that speaks OMC.

OMC is a draft, and the people building on it shape it. Read it, try it with your app, and tell us where it doesn’t fit: on the OMC site or in our Discord.

What you get

Everything Tangle knows about each collection

Every platform, one connection

One connection gives your app a person's collection across Spotify, Tidal, SoundCloud, YouTube Music, Apple Music, Bandcamp, Discogs, Rekordbox and folders, merged, with every platform link.

Tag and build lists

Create playlists and tags, and add and remove what's in them. Your app makes the same edits people make in Tangle, with the same rules, and each list says what your app may do with it.

Changes go everywhere

Writes land in Backup and restore at once, reach open Tangle apps in about a second, and go out to the platform with the next sync or live sync.

Live, not polled

A change feed with cursors and a Server-Sent Events stream, each change saying which app made it. Tangle adds signed webhooks across all your connected users.

Consent first

People choose exactly what your app may do and can disconnect it any time. OAuth 2.1 with PKCE, narrow scopes, rotating refresh tokens, tokens hashed at rest.

An open standard

Records and endpoints follow the Open Music Collection specification, so an app built for Tangle works with any OMC home. Your app's own data is kept and given back unchanged.

Three steps

From zero to your first connected user

Register your app

Sign in to the dashboard, turn on Developer mode, and register your app with its redirect URI. Or skip it: an app can be known by an address it owns.

Add a “Connect your Tangle collection” button

Send people to Tangle’s consent page. They see your app and what it asks for, and choose Allow. Standard OAuth 2.1 with PKCE.

Read and write their collection

Download their collection once, then follow the changes from the cursor you got. The event stream tells you when something changed.

Text
https://www.tangle.music/oauth/authorize?response_type=code
  &client_id=tng_ci_…
  &redirect_uri=https://your.app/callback
  &scope=library:read lists:read lists:write
  &state=…&code_challenge=…&code_challenge_method=S256

How a change travels

Someone tags a track in your app. It shows up everywhere.

A write from your app is the same edit the person could make in Tangle, so it follows the same path to all their devices and platforms.

  1. Your appAdds a song to one of the person’s playlists.
  2. Tangle APIChecks the token and the list, writes the rows Tangle would.instant
  3. Backup and restoreThe cloud copy changes; the change feed and webhooks report it.instant
  4. Their Tangle appsTheir open apps on every device pull it and show it as a change to sync.~1 second
  5. Spotify, Tidal, …Sent with the next sync, or within about half a minute with live sync on.next sync

Built on the API

See it working

Check out some one-shotted, vibe-coded examples of what you could build on the API. We didn’t refine them at all: the Pareto principle in action. They’re the ways we’d like to see the music ecosystem grow, from the very practical to the goofy. Connect your Tangle collection to try them, or look at what sort of world we could enable.

No SDK to learn

Hand it to your agent

agents.mdis written for coding agents: how to register your app, the connect flow, the rules to follow, what Tangle supports, webhooks, and recipes. Paste this into your agent in your app’s codebase:

Prompt for your agent

Read https://www.tangle.music/developers/agents.md and follow it. Then help me add "Connect your Tangle collection" to my app, so any Tangle user can connect their collection and my app can read and update it. Start by asking me what my app should do with their music.

Just scripting your own collection? Create a personal access token in the dashboard and use this instead:

For your own collection

Read https://www.tangle.music/developers/agents.md and follow it. My Tangle API token is in the TANGLE_API_TOKEN environment variable. Then help me build something with my own Tangle collection. Start by checking the token and telling me what's in my collection.

Works withClaude CodeCursorCodexany agent that can read a URL