Pages

Friday, 10 July 2015

Music Play Actions

Music actions make Google Search an entry point for discovering and listening to music artists and their songs. Music actions can appear in Google properties such as Knowledge Panel, enabling users to listen to songs from streaming services.
When a user searches for the name of an artist on Google or on their mobile device, a Knowledge Panel "card" may appear prominently in the Search results. Music actions in the card will use deep links to partner apps or web landing pages, bringing users directly from the Knowledge Panel to the specific artist.
Integrating music actions is straightforward:
Landing pages must contain appropriate schema.org markup. For a streamlined user experience, we recommend deep links support autoplay. When users click a Music Action link, partner content should immediately start playing -- instead of directing the user to a landing page where they must click again to start playback.

Integration requirements

  1. Landing pages with the following schema.org markup
    1. MusicGroup
    2. MusicAlbum
    3. ListenAction
  2. First click free and autoplay functionality
  3. Google auth integration

Integration details

By integrating with Music Actions, a partner will qualify to surface "deep links" in Knowledge Graph results on Google Search that will begin auto-playing media content. A deep link is a URL that points to a specific music artist or album from the partner's inventory.

Schema.org markup

Music Actions enable a partner to surface "Listen" actions by making the Knowledge Graph aware of its available albums and artist radio stations. The minimum requirements for this integration are annotations of the partner's artist and album landing pages using the following industry standard schema.org markup
  1. MusicGroup - a musical group or solo musician
  2. MusicAlbum - a collection of music tracks
  3. ListenAction - a link that begins playing media content
For example, iHeart could mark up auto-play links like this:
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "MusicGroup",
  "url": [
    "http://www.iheart.com/artist/Katy-Perry-35141/",
    "android-app://com.clearchannel.iheartradio.controller/ihr/listen/custom_radio/artist/35141"
  ],
  "name": "Katy Perry",
  "sameAs": "http://www.katyperry.com",
  "description": "Katy Perry is a pop music artist.",
  "potentialAction": {
    "@type": "ListenAction",
    "target": [
      "http://www.iheart.com/artist/Katy-Perry-35141/?autoplay=true&ext=1&playedFrom=197",
      "android-app://com.clearchannel.iheartradio.controller/ihr/listen/custom_radio/artist/35141?ext=1&played_from=197"
    ]
  }
}
</script>
While we encourage partners to provide as much markup as they would like for MusicGroup and MusicAlbum, there is a minimum set of fields that should be provided. The following table lists the required and recommended fields.
PropertyTypeDescription
name (Required)TextArtist or album name.
description (Required)TextA biography of the artist or a description of the album.
url (Required)URLURL of the landing page of the artist or album on the partner site.
imageURLURL of an image of the artist or album.
sameAs (Recommended)URLURL of a page that unambiguously identifies the artist or album. Example: Wikipedia.
potentialAction(Required)ListenActionDeeplink annotation(s).
potentialAction.target(Required)ListenActionDeeplink URI(s) to listen to the artist's/album's songs. Example:
  • Desktop: http://www.foo.com/lady_gaga?autoplay=true
  • Android: android-app://{apk_name}/{scheme}/{host_path}. See here for details.
  • iOS: ios-app://{app_store_id}/{scheme}/{host_path}. Seehere for details.
Besides providing this information in markup, it is important that the information is visible to users on the page as well. The partner should also note that we will be using Googlebot to crawl their pages; it is okay for the schema.org markup to appear only to Googlebot.

Providing regional/time/paywall restrictions

The partner may have restrictions on which regions can listen to songs or when certain songs are available. Or access to the partner's inventory may be restricted to paying customers only. In such cases, the partner should provide details about the restrictions in the schema.org markup.
The following table lists the restrictions that partners can provide in their markup in each potentialAction.
PropertyTypeDescription
expectsAcceptanceOf (Required)OfferAnnotation for the condition(s) that must be met for the Music Action to be available.
expectsAcceptanceOf.availabilityStartsDateDate after which the Music Action is available, in ISO 8601 format. If unspecified, we expect the action is available anytime prior topotentialAction.expectsAcceptanceOf.availabilityEnds.
expectsAcceptanceOf.availabilityEndsDateDate after which the Music Action is no longer available, in ISO 8601 format. If unspecified, we expect the action is available indefinitely after potentialAction.expectsAcceptanceOf.availabilityStarts.
expectsAcceptanceOf.eligibleRegion(Required)CountryIf unspecified, we expect the Music Action is available everywhere except where denoted in potentialAction.expectsAcceptanceOf.ineligibleRegion.
expectsAcceptanceOf.eligibleRegion.name(Required)TextThe 2-letter ISO 3166-1 alpha-2 country code.
expectsAcceptanceOf.ineligibleRegionCountryIf unspecified, we expect the Music Action is available everywhere unless potentialAction.expectsAcceptanceOf.eligibleRegion is specified.
expectsAcceptanceOf.ineligibleRegion.nameTextThe 2-letter ISO 3166-1 alpha-2 country code.
expectsAcceptanceOf.categoryEnumOne of the following:
  • "purchase": The Music Action is available to the user after purchase for an indefinite amount of time.
  • "subscription": The Music Action is included with a subscription to the partner itself.
  • "free": The Music Action is available with no purchase or subscription required of the user. The Music Action may require a user login or contain ads.
This value defaults to "free".
expectsAcceptanceOf.nameTextName of the offer type.
expectsAcceptanceOf.priceNumericCost of the offer type.
expectsAcceptanceOf.priceCurrencyTextThe 3-letter ISO 4217 currency code of the price value.
The following are sample markup for various restriction cases.
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "MusicAlbum",
  "name": "Example Album",
  "description": "A group of great songs.",
  "url": "https://www.example.com/listen",
  "image": "http://www.example.com/image",
  "potentialAction": {
    "@type": "ListenAction",
    "target": "https://www.example.com/listen",
    "expectsAcceptanceOf": {
      "@type": "Offer",
      "eligibleRegion": {
        "@type": "Country",
        "name": "US"
      }
    }
  }
}
</script>

Testing markup

Partners should test their markup by using the Structured Data Testing Tool. You can either provide a single URL or paste HTML to see how Google interprets your markup.
There are a few things to look for while using this tool:
  • Make sure that the top-level and first schema.org entity corresponds with the page's main content. For example, if the page is for Bruno Mars, the first and top-most entity should be MusicGroup. If it's for a Katy Perry album, the first and top-most entity should be MusicAlbum.
  • There will be a warning message about potentialAction. It is okay to ignore that message for now. However, make sure that potentialAction hangs off of the right entity and the "target" URLs are correctly specified.
The intent-filter that you use to handle requests from Google should use the VIEW action. After launching the deeplink, the app should automatically start playing music. A common way to use the same deeplink for both Music Play Actions and app indexing is to use a URL parameter to signal autoplay, e.g. &autoplay=true.
The "content" in the markup above that begins with "android-app://" provides Google with deep links into your app for specific artists or albums. The format of the "android-app://" URI is as follows:
android-app://<package name of your app>/<android:scheme>/<rest of the deep link>
Google will translate this annotation to the following deep link to use to open your app:
<android:scheme>://<rest of the deep link>
So for the Katy Perry example above, the following:
android-app://com.clearchannel.iheartradio.controller/ihr/listen/custom_radio/artist/35141?ext=1&played_from=197
would indicate to Google that the app can be opened to play Katy Perry with the following deep link:
ihr://listen/custom_radio/artist/35141?ext=1&played_from=197
You need to also specify the <data> element in your intent-filter. For the example above, the intent-filter would be specified as follows in your app's manifest file:
<intent-filter>
  <action android:name="android.intent.action.VIEW"/>
  <category android:name="android.intent.category.DEFAULT"/>
  <category android:name="android.intent.category.BROWSABLE"/>
  <data android:scheme="ihr"/> </intent-filter>
You can test that your app properly handles the deep links by using the following ADB command:
adb shell am start "[deep link]"
Further, you can test it by creating an HTML page that has the following links:
intent://listen/custom_radio/artist/35141?ext=1&played_from=197#Intent;scheme=ihr;package=com.clearchannel.iheartradio.controller;action=android.intent.action.VIEW;end
This will open the iHeart app with the VIEW action on this deep link:
ihr://listen/custom_radio/artist/35141?ext=1&played_from=197
You can learn more about these "intent" links here.

Enabling Rich Snippets for Events

Event markup describes the details of organized events, such as musical concerts or art festivals, that people may attend at a particular time and place. Events that meet Google’s policy guidelines may be eligible for Rich Snippets in search results, as described in this document, as well as for display in Knowledge-Graph-powered features, documented separately.
Event Rich Snippets add one or more lines with structured details of upcoming events below your search result, like this:
image of a Google rich snippet for events

Basic markup properties

The full list of properties for an event are described on schema.org/Event. Use the most specific applicablesubtype of Event, such as ComedyEvent, Festival, FoodEvent, MusicEvent, TheaterEvent, or SportsEvent. Please mark up as many properties as you can, as they will help Google algorithms correctly index your pages. The following subset of properties is required to be eligible for Event rich snippets:
PropertyTypeDescription
name (required)TextThe name of the event. This is shown in the rich snippet. See specific policies about event names below.
url (required*)URLA link to the event's details page.
* Required if the event's details are on a different page. If the event is described on the page you are marking up, there is no need to mark up the url property.
location (required)Place or
PostalAddress
The location or venue of the event. A text string is permitted, but we recommend that you represent the location by using a nested Place or Organization to separately specify a venue name and its address.
startDate (required)DateThe starting date and time of the event. See important information about the requirement for ISO 8601 date format.
offers (optional)OfferAn offer to buy tickets for this event. If present, some subfields are required.
offers.price (required)NumberThe lowest available price, including service charges and fees, of this type of ticket.
offers.priceCurrency(required)TextThe 3-letter currency code.

Example Event markup for rich snippets

The following example describes some basic information about a music concert, including the name, date and time, location, and URL for more information.
You can use the Structured Data Testing Tool to check that your markup is correct.
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Event",
  "name": "Example Band goes to San Francisco",
  "startDate" : "2013-09-14T21:30",
  "url" : "http://example.com/tourdates.html",
  "location" : {
    "@type" : "Place",
    "sameAs" : "http://www.hi-dive.com",
    "name" : "The Hi-Dive",
    "address" : "7 S. Broadway, Denver, CO 80209"
  }
}
</script>

Event-specific usage guidelines and policies

In addition to the general policies that apply to all rich snippets, the following extra policies apply for Event rich snippets:
  • Events in the past will not be shown as a rich snippet. Leaving them marked up is still recommended.
  • Since Event rich snippets are not meant for advertising purposes, your event name should not contain any promotional elements such as the price of the event, a call to purchase, or an indication of a sale or temporary discount. For sales events, use the equivalent markup but using schema.org/SaleEvent. Invalid event names:
    • Trip package: San Diego/LA, 7 nights (Don't use rich snippets markup to promote non-event products or services.)
    • Music festival - only $10! (Instead, mark up ticket prices using the tickets property.)
    • Sale on dresses! (Non-event information)
    • Concert - buy your tickets now! (Promotion)
    • Concert - 50% off until Saturday! (Promotion)

Event Markup: Primary Ticketers

If you are a primary ticketer who sells the official inventory of an event's tickets on behalf of the event's organizer, then Google can incorporate structured data markup from your website into the Knowledge Graph. This data may then be displayed across Google Search and other products, in two ways:
  • When performers or venues have events that link to your site for tickets, the markup on your site may be used to provide information such as pricing, on-sale dates, availability, and ticket links on Google.
  • When performers and venues have not themselves provided markup on their official websites, your markup may be used as a source of basic event data such as event name, date, location, and details link.
This document describes in detail how primary ticketer sites should mark up their events to maximize eligibility for Google's event features.
For a 10-minute video tutorial on how Google uses event markup, please see: https://www.youtube.com/watch?v=XXw8g-FbemI 

Markup specification

Each event should be specified with the most specific applicable subtype of schema.org/Event. Popular subtypes include ComedyEvent, Festival, FoodEvent, MusicEvent, TheaterEvent, and SportsEvent. This helps search engines categorize your event, and in some cases lets you specify extra fields relevant to that type of event, such as the "homeTeam" and "awayTeam" for a SportsEvent, or the "workPerformed" for a TheaterEvent.
The following table indicates the full set of event fields used by Google events projects.
PropertyTypeDescription
name (required)TextThe title of the event.
imageURLURL of an image or logo for the event or tour
urlURLURL of a page providing details about the event.
startDate (required)DateThe start date and time of the event, in ISO-8601 format.
doorTimeDateTimeThe time admission commences, in ISO-8601 format.
endDateDateThe end date and time of the event, in ISO-8601 format.
eventStatusEventStatusTypeThe event's cancellation status, if applicable. Must be one of the example values at right.
previousStartDateDateThe previously scheduled date (only if eventStatus is set).
typicalAgeRangeTextThe expected age range.
location (required)PlaceA nested schema.org/Place (or more specific subtype, such as schema.org/EventVenue or schema.org/PerformingArtsTheater).
location.name (required)TextThe venue name.
location.sameAsURLThe URL of the venue's official website.
location.address (required)PostalAddressThe venue's address. You may either provide the whole address as a single string, or provide the separate fields of the address in a nested schema.org/PostalAddress.
location.address.streetAddressThe street address.
location.address.addressLocalityThe locality or city.
location.address.addressRegionThe region or state.
location.address.postalCodeThe postal code.
location.address.addressCountryThe country code.
offersOfferA nested schema.org/Offer, one for each ticket type.
offers.url (recommended)The URL of a page providing the ability to buy tickets. This URL must:
  • direct to a landing page which clearly and predominantly provides, to any user from the general public, the opportunity to buy a ticket offering admittance to that specific event
  • be a link that is also present as a clickable link on the web page containing the data (i.e., not only in the markup)
  • be followable by the Googlebot, i.e., not blocked by robots.txt
offers.nameA user-visible name for the ticket type.
offers.category (required)Google recognizes the following values in this field:
  • primary: tickets available to the general public directly from the official representative of the event organizer or venue
  • secondary: tickets made available for resale after direct purchase
  • presale: tickets available early only to a subset of the public
  • premium: tickets with special benefits in addition to admission
Note: offers marked 'primary' will be given precedence in search contexts.
offers.price (required)The lowest available price, including service charges and fees, of this type of ticket.
offers.priceCurrency (required)The 3-letter currency code (unless included in price value).
offers.availability (required)The availability status of tickets.
offers.validFromThe ISO-8601 date and time when tickets go on sale (only required on date-restricted offers).
offers.validThroughThe ISO-8601 date and time when tickets go off sale (only required on date-restricted offers).
performerPersonA nested schema.org/PerformingGroup or schema.org/Person, one for each performer.
performer.nameThe performer's name.
performer.sameAsThe URL of the performer's official website or Wikipedia page.
workPerformedCreativeWorkA nested schema.org/CreativeWork, used to represent each play, dance, or classical music piece being performed at the event (if applicable).
workPerformed.nameThe name of the creative work being performed.
workPerformed.sameAsThe URL of the work's Wikipedia page or other reference page.
awayTeam
homeTeam
SportsTeam(Pending schema.org proposal for SportsEvent only, where applicable.)
homeTeam.name
awayTeam.name
The name of the team.
homeTeam.sameAs
awayTeam.sameAs
The URL of the team's official website or Wikipedia page.

Markup example: concert tickets

The following example shows how to mark up concert event information. The example is shown in JSON-LD syntax. Alternatively, you can mark up your content in Microdata or RDFa syntax if you prefer.
<script type="application/ld+json">
[{
    "@context" : "http://schema.org",
    "@type" : "MusicEvent",
    "name" : "B.B. King with Jonathon \"Boogie\" Long",
    "image" : "http://www.bbking.com/gallery/b-b-king-live.jpg",
    "url" : "http://www.bbking.com/events/apr12-providence.html",
    "startDate" : "2014-04-12T19:30",
    "doorTime" : "18:30",
    "endDate" : "2014-04-12T22:00",
    "eventStatus" : "EventRescheduled",
    "previousStartDate" : "2013-09-30T19:30",
    "typicalAgeRange" : "18+",
    "location" :
    {
        "@type" : "Place",
        "name" : "Lupo's Heartbreak Hotel",
        "sameAs" : "http://lupos.com/",
        "address" :
        {
            "@type" : "PostalAddress",
            "streetAddress" : "79 Washington St.",
            "addressLocality" : "Providence",
            "addressRegion" : "RI",
            "postalCode" : "02903",
            "addressCountry" : "US"
        }
    },
    "offers" :
    [{
        "@type" : "Offer",
        "name" : "General Admission",
        "category" : "primary",
        "price" : "$63.25",
        "availability" : "SoldOut",
        "url" : "http://www.bbking.com/ticket/17004C29"
    },{
        "@type" : "Offer",
        "name" : "VIP Experience",
        "category" : "premium",
        "url" : "http://www.bbking.com/ticket/vip/Abcde12345",
        "price" : "$299.00",
        "validFrom" : "2014-02-05T10:00",
        "validThrough" : "2014-03-19T23:59"
    }],
    "performer" :
    [{
        "@type" : "MusicGroup",
        "name" : "B.B. King",
        "sameAs" : "http://en.wikipedia.org/wiki/B.B._King"
    },{
        "@type" : "MusicGroup",
        "name" : "Jonathon \"Boogie\" Long",
        "sameAs" : "http://jonathonboogielong.com/"
    }]
}]
</script>

Markup example: theater tickets

The following example shows how to mark up event information for theater performances. The markup represents a single performance; for multiple performances, simply repeat the markup for each performance. All examples are shown in JSON-LD syntax. Alternatively, you can mark up your content in Microdata or RDFa syntax if you prefer.
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "TheaterEvent",
  "name": "Julius Caesar at Shakespeare's Globe",
  "location":
  {
    "@type": "PerformingArtsTheater",
    "name": "Shakespeare's Globe",
    "sameAs": "http://www.shakespearesglobe.com/",
    "address": "London, UK"
  },
  "offers":
  [{
    "@type": "Offer",
    "name": "Standing (Yard)",
    "url": "https://tickets.shakespearesglobe.com/performances.asp?PerIndex=287339",
    "category": "primary",
    "price": "£7.50",
    "availability": "http://schema.org/InStock"
  },{
    "@type": "AggregateOffer",
    "name": "Lower Gallery",
    "url": "https://tickets.shakespearesglobe.com/performances.asp?PerIndex=287339",
    "category": "primary",
    "lowPrice": "£17.50",
    "highPrice": "£44.50",
    "availability": "http://schema.org/LimitedAvailability"
  }],
  "startDate": "2014-10-01T19:30",
  "workPerformed":
  {
    "@type": "CreativeWork",
    "name": "Julius Caesar",
    "sameAs": "http://en.wikipedia.org/wiki/Julius_Caesar_(play)",
    "creator":
    {
      "@type": "Person",
      "name": "William Shakespeare",
      "sameAs": "http://en.wikipedia.org/wiki/William_Shakespeare"
    }
  }
}
</script>

Markup example: music festival tickets

This examples shows typical markup for a music festival, with ticketing details and performer information.
<script type="application/ld+json">
{
  "@context" : "http://schema.org",
  "@type" : "Festival",
  "name" : "Thank You Festival",
  "image" : "http://cdn.ticketfly.com/i/00/01/10/12/37-atxl1.jpg",
  "startDate" : "2014-06-26T16:00",
  "typicalAgeRange" : "All Ages",
  "location" : {
     "@type" : "EventVenue",
     "name" : "Merriweather Post Pavilion",
     "address" : "10475 Little Patuxent Parkway, Columbia, MD"
  },
  "offers" : {
     "@type" : "AggregateOffer",
     "category" : "primary",
     "lowPrice" : "$45.00",
     "highPrice" : "$549.50",
     "url" : "http://www.ticketfly.com/purchase/event/545417/tfly"
  },
  "performer" : [
    { "@type" : "MusicGroup", "name" : "Tiesto", "sameAs" : "http://www.tiesto.com" },
    { "@type" : "MusicGroup", "name" : "Above and Beyond", "sameAs" : "http://www.aboveandbeyond.nu" },
    { "@type" : "MusicGroup", "name" : "Krewella", "sameAs" : "http://www.krewella.net" },
    { "@type" : "MusicGroup", "name" : "Cedric Gervais", "sameAs" : "http://www.cedricgervais.com" },
    { "@type" : "MusicGroup", "name" : "Alvin Risk", "sameAs" : "http://en.wikipedia.org/wiki/Alvin_Risk" }
  ]
}
</script>

FAQ for Ticketer Events Markup

My site's event listings are spread over multiple web pages. How should I mark them up?

It is fine to include markup on multiple pages of events; Google will collect event details from all the pages it indexes on your site.

Will Google recognize event markup in dynamically generated (e.g. AJAX) web pages?

JSON-LD markup inserted by Javascript that runs upon initial page load can be recognized. Other forms of markup in dynamic content are not supported.