Webmaster
How Yandex indexes sites
A site on search results page

Buttons description

Attention! New schema cannot be added for now. In the following months, we’ll be doing more experiments and developments about interactive answers. Our team is working on more efficient ideas. Stay tuned for updates.

You can supplement your site's interactive answer with buttons for completing actions. For example, it's a good idea to provide an Order tickets button to an answer about a movie theater's website so users can go to the necessary action directly from the search results page.

If you want to provide a button to the interactive answer for your site's page, describe the following in your page's code:

  • what kind of action the button is used for;

  • a link to the page where the button should lead.

There are two kinds of button layouts: Schema.org and Open Graph Protocol.

Open Graph Protocol button layouts

Using the OGP layout, it's necessary to indicate the Yandex dictionaries that contain the definitions of the necessary fields. Simply add the prefix attribute for the html element as shown in the example. You can test the markup in the Webmaster validator.

Note. 

This markup is not yet processed by the search robot.

The example shows how to layout the "Buy" button using OGP.

<html prefix="ya: http://webmaster.yandex.ru/vocabularies/">

<!--The value of the "ya:interaction" field for the button should be the line "BUTTON".-->
<meta property="ya:interaction" content="BUTTON" />

<!--The "ya:interaction:type" button indicates the type of action that the button makes.
    The "BuyAction" value is designated to move to buying a product.
    All supported actions are enumerated in the list.-->
<meta property="ya:interaction:type" content="BuyAction" />

<!--The "ya:interaction:url" field should contain the address of the page where the user goes by pressing the button.-->
<meta property="ya:interaction:url" content="http://example.com/goods/124123#buy" />

Schema.org button layouts

It's possible to describe several buttons for every page. Each button's description should end with a separate script element. The JSON-LD syntax is used for description. You will soon be able to test the Schema.org markup in JSON-LD format using the Webmaster validator.

Note. 

This markup is not yet processed by the search robot.

The example shows how to layout the "Buy" button.

<script type="application/ld+json">{

     <!--Mandatory field indicates the use of types of Schema.org data in the layout.-->
     "@context":"http://schema.org",

     <!--The "@type" field indicates the type of action that the button does.
     The "BuyAction" value is designated to move to buying a product.
     All supported actions are enumerated in the list.-->
     "@type" : "BuyAction",

     <!--Button description block.-->
     "handler" : {

          <!--Mandatory field. Indicates the type of Schema.org data that describes the buttons.-->
          "@type" : "WebHandler",

          <!--The "url" field should contain the address of the page where the user goes by pressing the button.-->
          "url" : "http://www.example.com/goods/144323#buy"
     }
}
</script>

Supported types of actions

Yandex supports the following types of actions for interactive answer buttons:

  • ApplyAction — fills out application (for example, to participate in a partner program).

  • AskAction (object = Accreditation) — receive accreditation.

    Schema.org:

    <script type="application/ld+json">{
      "@context":"http://schema.org",
      "@type" : "AskAction",
      "object" : {
        "@type" : "Accreditation"
      },
    
      "handler" : {
        "@type" : "WebHandler",
      "url" : "http://www.example.com/ask_accreditation"
      }
    }
    </script>

    Open Graph Protocol:

    <meta property="ya:interaction" content="BUTTON" />
    <meta property="ya:interaction:type" content="AskAction" />
    <meta property="ya:interaction:object" content="Accreditation" />
    <meta property="ya:interaction:url" content="http://example.com/ask_accreditation" />
  • BuyAction — buy a product.

  • CalculateAction — calculates something (cost, trip time, etc.)

  • CheckAction — checks something (for example, availability of a specific product or an event).

  • CheckInAction (object = Flight) — online flight registration.

    Schema.org:

    <script type="application/ld+json">{
      "@context": "http://schema.org",
      "@type": "CheckInAction",
      "object": {
        "@type": "Flight"
      },
    
      "handler" : {
        "@type" : "WebHandler",
        "url" : "http://www.example.com/check_in"
      }
    }
    </script>

    Open Graph Protocol:

    <meta property="ya:interaction" content="BUTTON" />
    <meta property="ya:interaction:type" content="CheckInAction" />
    <meta property="ya:interaction:object" content="Flight" />
    <meta property="ya:interaction:url" content="http://example.com/check_in" />
  • CommunicateAction (instrument = EmailMessage) — send a message (for example, e-mail).

    Schema.org:

    <script type="application/ld+json">{
      "@context":"http://schema.org",
      "@type" : "CommunicateAction",
      "instrument" : {
        "@type" : "EmailMessage"
      },
    
      "handler" : {
        "@type" : "WebHandler",
        "url" : "http://www.example.com/send_email"
      }
    }
    </script>

    Open Graph Protocol:

    <meta property="ya:interaction" content="BUTTON" />
    <meta property="ya:interaction:type" content="CommunicateAction" />
    <meta property="ya:interaction:instrument" content="EmailMessage" />
    <meta property="ya:interaction:url" content="http://example.com/send_email" />
  • DownloadAction — file download.

  • FollowAction — subscription to updates (for blogs, news websites, etc.)

  • InstallAction — installs program.

  • ListenAction — listen to something(for example, music or an audio book).

  • OrderAction — order products or services.

  • PayAction — payment (for example, pay for mobile phone or charity).

  • PlayAction — browser game.

  • ReadAction — reading (for example, books or articles).

  • RegisterAction — register on a website.

  • RentAction — query about renting something (apartment, car, etc.)

  • ReserveAction— reservations (tickets, tables, etc.)

  • ReviewAction — review something (restaurant, book, etc.)

  • ScheduleAction — make an appointment (for example, to the doctor, lawyer, etc.)

  • SearchAction — site search.

  • SubscribeAction — subscribe to a mailing list or periodical publication.

  • TrackAction — track postal shipment.

  • ViewAction — view (for example, photo galleries or panoramas).

  • WatchAction — go to site with video.

Rate this article
Thank you for your feedback!