PageMaps is a structured data format that Google created to enable website creators to embed data and notes in their webpages. Although the structured data isn't visible to your users, and doesn't impact your site's listing in Google Web Search results, Custom Search recognizes it and can use it to add elements such as actions or custom attributes to search results pages.

Here's an example of a rich snippet that features two actions ("Download" and "Full Page View"):

A Google Custom Search rich snippet featuring two actions

You submit PageMaps in three ways. You can:

  • Add PageMap data directly to your HTML page. Google will discover the PageMap information when we crawl your site.
  • Add PageMap data to a Sitemap, and submit that Sitemap for indexing via the Search Console. This is a good option if you don’t want PageMap exposed in the HTML source code of your page.
  • Use rich snippets markup or meta tags to add structured data directly to your HTML. Custom Search will convert this data to PageMaps when we crawl and index your site.
To see the PageMap data Google can extract from your page, use the rich snippets testing tool.

PageMap elements

Each element (for example, an action) that you want to add to a snippet is a DataObject. Each DataObject has a number of attributes, such as a label or URL, which you can customize as you choose.

Recognized DataObjects

You can create any type of DataObject you like, but Google Custom Search recognizes the DataObjects listed in the following table, and will render them in search results:

DataObject Required attributes
thumbnail src, height, width
action label, url, class
publication author, date, category
Add PageMap data directly to your HTML page

To create a PageMap, add a block of code to your HTML page, like this:


    <DataObject type="action">
      <Attribute name="label" value="Download"/>
      <Attribute name="url" value=""/>
      <Attribute name="class" value="download"/>

    <DataObject type="action">
      <Attribute name="label" value="Fullscreen View"/>
      <Attribute name="url" value=""/>
      <Attribute name="class" value="fullscreen"/>

Be sure to enclose your PageMap inside <!-- and --> tags.

Add PageMap data to a Sitemap

If you don't want to include PageMap data in the HTML of your pages, you can add PageMap data to a Sitemap and submit that Sitemap for indexing via the Search Console.

Here's an example of a Sitemap that includes PageMap information for two URLs: and

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns=""
   <PageMap xmlns="">
     <DataObject type="document" id="hibachi">
       <Attribute name="name">Dragon</Attribute>
       <Attribute name="review">3.5</Attribute>
   <PageMap xmlns="">
     <DataObject type="document" id="biggreenegg">
       <Attribute name="name">Ribs</Attribute>
       <Attribute name="review">4.0</Attribute>

PageMap tag definitions

The following table outlines the requirements for adding PageMap data to a sitemap. For more information about creating Sitemaps, including basic tag definitions, see Creating Sitemaps.

Tag Required? Description
PageMap Yes Encloses all PageMap information for the relevant URL.
DataObject Yes Encloses all information about a single element (for example, an action) that should appear in the Custom Search result.
Attribute Yes Each DataObject contains one or more attributes.

(If you’re a developer, you can take advantage of the flexibility of PageMaps to add extra functionality to your search results. More information. )