Technical

How MTShare Works: A Technical Deep Dive

January 19, 20268 min read

Creating a universal music link sounds simple: take a song from one platform and find it on others. In practice, it's a fascinating technical challenge involving metadata parsing, fuzzy matching, and API orchestration.

The Challenge

Each music streaming platform has its own database, its own way of organizing music, and its own quirks. The same song might be titled differently, have different artist credits, or be part of different albums across platforms.

Example: The Same Song, Different Metadata

Spotify:"Don't Start Now" by Dua Lipa
Apple Music:"Don't Start Now" by Dua Lipa
YouTube:"Dua Lipa - Don't Start Now (Official Music Video)"

Note the different apostrophe characters and title formats.

Step 1: URL Parsing

When you share a link to MTShare (via the mobile app or web), we first need to understand what platform it's from and extract the track identifier.

# Example URLs we handle:

https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT

https://music.apple.com/us/album/song-name/123456789?i=987654321

https://www.youtube.com/watch?v=dQw4w9WgXcQ

https://music.amazon.com/albums/B08XYZ123?trackAsin=B08ABC456

Each platform has its own URL structure. We use pattern matching to identify the platform and extract the relevant IDs. Some platforms (like Apple Music) encode multiple pieces of information in the URL.

Step 2: Metadata Retrieval

Once we know the platform and track ID, we fetch the song's metadata using that platform's API. The key fields we extract are:

  • Title - The song name
  • Artist(s) - Primary and featured artists
  • Album - The album or single name
  • Album Art - Cover image URL

Metadata Enrichment with Last.fm

Sometimes the source platform doesn't provide complete metadata. We use the Last.fm API to fill in missing information like album art, album name, and genre data. This helps ensure your universal links always look great, even when the original source has incomplete data.

Step 3: Cross-Platform Search

With the metadata in hand, we search for the song on other platforms. We query all platforms simultaneously using parallel requests for speed.

1

Title + Artist Search

We search for the title and artist combination on each platform. This works well for most songs, especially popular ones with unique names.

2

Fuzzy Matching

We use fuzzy string matching to handle variations in spelling, punctuation, and formatting. Titles are normalized by removing special characters and converting to lowercase.

3

Scoring System

Each potential match is scored based on how well the title and artist match. We require a minimum confidence score before accepting a match.

Step 4: Link Generation

Once we have matches across platforms, we generate a short, unique code for the universal link. This code maps to a database record containing:

{
  "short_code": "tUBizh8",
  "title": "Don't Start Now",
  "artist": "Dua Lipa",
  "album": "Future Nostalgia",
  "album_art_url": "https://...",
  "platforms": {
    "spotify": "https://open.spotify.com/track/...",
    "apple_music": "https://music.apple.com/...",
    "youtube": "https://www.youtube.com/watch?v=...",
    "amazon_music": "https://music.amazon.com/..."
  },
  "created_at": "2026-01-19T12:00:00Z"
}

The Landing Page Experience

When someone clicks a universal link, they see a landing page with:

  • Album artwork and song information
  • Buttons for each available platform
  • Links to lyrics (via Genius integration)
  • Social sharing options

Handling Edge Cases

Real-world music data is messy. Here are some challenges we handle:

Multiple Versions

Songs often have multiple versions: original, radio edit, explicit, clean, remastered. We try to match the same version across platforms.

Featuring Artists

"Song (feat. Artist B)" vs "Song" by "Artist A & Artist B" - different platforms format collaborations differently.

Character Encoding

Apostrophes, quotes, accented characters, and non-Latin scripts all need careful handling for accurate matching.

Song Not Found

If we can't find a confident match on a platform, we provide a search link so users can still try to find it manually.

Performance

Creating a universal link involves multiple API calls to different platforms. To keep things fast:

  • Parallel requests - We query all platforms simultaneously rather than sequentially using async/await.
  • 💾Caching - Previously created links are cached to avoid repeated API calls.

Currently Supported Platforms

MTShare currently supports these platforms for both input (parsing links) and output (finding matches):

  • Spotify
  • Apple Music
  • YouTube (music videos)
  • Amazon Music

Coming soon: Deezer, Tidal, SoundCloud, YouTube Music

Conclusion

What seems like a simple feature - "find this song on other platforms" - involves a surprising amount of complexity. From URL parsing to fuzzy matching to handling edge cases, there's a lot happening behind that simple universal link.

We're constantly improving our matching algorithms and adding support for more platforms. If you ever notice a mismatch or missing platform, let us know - your feedback helps us get better.

Try it yourself

Create a universal link and see the magic in action.

Get Started Free