XooCode(){

MusicRecording

MusicRecording represents a single audio track: a song, a film score cue, a remix. Google does not have a dedicated MusicRecording rich result, but the markup feeds the music knowledge panel that appears for song and artist queries, and it is read by Spotify, Apple Music, YouTube Music, and AI assistants that recommend music.

The key relationship is between MusicRecording (the specific recording) and MusicComposition (the abstract work). A composition can have multiple recordings (studio version, live version, cover). The recordingOf property connects the two. Most sites only deal with one recording per composition, but the distinction matters for covers and remixes where the performer is different from the composer.

Full example of schema.org/MusicRecording json-ld markup

The markup is verified as valid with Rich Results Test from Google.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/MusicRecording
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@id": "https://xoofilms.dk/music/lullaby-for-copenhagen#recording",
  "@type": "MusicRecording",
  "name": "Lullaby for Copenhagen",
  "url": "https://xoofilms.dk/music/lullaby-for-copenhagen",
  "byArtist": {
    "@type": "Person",
    "name": "Nora Lindgren",
    "url": "https://noralindgren.dk",
    "sameAs": "https://open.spotify.com/artist/xoo-nora-lindgren"
  },
  "inAlbum": {
    "@type": "MusicAlbum",
    "@id": "https://xoofilms.dk/music/the-childrens-doctor-score#album",
    "name": "The Children's Doctor: Original Score"
  },
  "duration": "PT4M23S",
  "isrcCode": "DKXOO2400103",
  "datePublished": "2024-09-14",
  "genre": "Film Score",
  "inLanguage": "da",
  "recordingOf": {
    "@type": "MusicComposition",
    "name": "Lullaby for Copenhagen",
    "composer": {
      "@type": "Person",
      "name": "Nora Lindgren"
    },
    "iswcCode": "T-345.246.800-1"
  },
  "copyrightYear": "2024",
  "copyrightHolder": {
    "@type": "Organization",
    "name": "Xoo Films ApS",
    "url": "https://xoofilms.dk"
  },
  "potentialAction": {
    "@type": "ListenAction",
    "target": {
      "@type": "EntryPoint",
      "urlTemplate": "https://xoofilms.dk/music/lullaby-for-copenhagen",
      "actionPlatform": [
        "https://schema.org/DesktopWebPlatform",
        "https://schema.org/MobileWebPlatform"
      ]
    },
    "expectsAcceptanceOf": {
      "@type": "Offer",
      "price": "0",
      "priceCurrency": "DKK",
      "availability": "https://schema.org/InStock"
    }
  }
}
</script>

recordingOf and MusicComposition

recordingOf links to a MusicComposition with its own composer, lyricist, and iswcCode (International Standard Musical Work Code). The composition is the songwriting credit; the recording is the performance credit. Google and music services use this to group different recordings of the same song and to attribute royalties correctly in the knowledge graph.

isrcCode

The isrcCode (International Standard Recording Code) is a 12-character identifier unique to each recording. It is the music industry's equivalent of an ISBN. Streaming platforms, rights management organizations, and royalty tracking systems all use ISRC codes. Include it if you have one. Format: two-letter country code, three-character registrant, two-digit year, five-digit designation (e.g., DKXOO2400103).

ListenAction for streaming links

Like WatchAction on Movie, ListenAction tells platforms where a track can be streamed or purchased. The target is an EntryPoint with the listen URL, and expectsAcceptanceOf specifies whether the track is free, paid, or requires a subscription. Multiple ListenActions support multiple platforms.

duration

duration uses the same ISO 8601 format as everywhere else: PT4M23S for 4 minutes 23 seconds. Google displays track length in the music knowledge panel. Omitting it means the panel shows no runtime.

Minimal valid version

The smallest markup that still produces a valid MusicRecording entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/MusicRecording (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "MusicRecording",
  "name": "Lullaby for Copenhagen",
  "byArtist": {
    "@type": "Person",
    "name": "Nora Lindgren"
  },
  "duration": "PT4M23S"
}
</script>

Google rich results this unlocks

Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.

Common MusicRecording mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    byArtist as a plain string

    Wrong
    "byArtist": "Nora Lindgren"
    Right
    "byArtist": { "@type": "Person", "name": "Nora Lindgren", "sameAs": "https://open.spotify.com/artist/..." }

    byArtist expects a Person or MusicGroup object, not a plain string. A structured object lets Google match the artist to an existing knowledge graph entity. Include sameAs with a Spotify, Apple Music, or Wikipedia URL for reliable matching.

  2. 02

    Confusing recordingOf with inAlbum

    Wrong
    "recordingOf": { "@type": "MusicAlbum", "name": "..." } (linking the recording to an album via recordingOf)
    Right
    "recordingOf": { "@type": "MusicComposition" } for the songwriting credit; "inAlbum": { "@type": "MusicAlbum" } for the album

    recordingOf connects a recording to the abstract composition (the song as written). inAlbum connects it to the album that contains the track. These are different relationships. A recording of a Beatles song by a cover band has recordingOf pointing to the Beatles composition but inAlbum pointing to the cover band's album.

  3. 03

    Missing ISRC code when available

    Wrong
    (MusicRecording with no isrcCode when the distributor assigned one)
    Right
    "isrcCode": "DKXOO2400103"

    ISRC codes are the primary identifier for matching recordings across streaming platforms, rights organizations, and royalty systems. If your distributor assigned an ISRC, always include it. Without it, automated matching relies on fuzzy name comparison, which fails for common song titles.

  4. 04

    duration as minutes:seconds

    Wrong
    "duration": "4:23"
    Right
    "duration": "PT4M23S"

    duration uses ISO 8601 format, not the colon-separated format from music players. PT4M23S means 4 minutes 23 seconds. The colon format is not machine-parseable in schema.org context.

  5. 05

    MusicGroup for a solo artist

    Wrong
    "byArtist": { "@type": "MusicGroup", "name": "Nora Lindgren" }
    Right
    "byArtist": { "@type": "Person", "name": "Nora Lindgren" }

    Use Person for solo artists and MusicGroup for bands. Using MusicGroup for a solo artist creates a phantom band entity in the knowledge graph that competes with the person's actual profile.

About the example data

"Lullaby for Copenhagen" is a track from the The Children's Doctor documentary score. The artist is Nora Lindgren, a fictional Danish composer. The inAlbum property references the film's score album, which connects to the MusicAlbum example. The copyrightHolder is Xoo Films ApS, the same production company from the Movie example.

Comments

Loading comments...

Leave a comment