Overview Crawler Developer API Platform API Tutorials Client Libraries

Swiftype-specific Meta Tags

The Swiftype web crawler supports the following meta tags, which allow you to deliver structured information to our web crawler when we visit your page. Please place tese tags in the <head> of your page. Each tag should be included only once, with the exception of the st:section tag, which may be included multiple times.

<head>
  <title>your website</title>
  <meta property='st:title' content='' />
  <meta property='st:section' content='' />
  <meta property='st:image' content='' />
  <meta property='st:type' content='' />
  <meta property='st:info' content='' />
  <meta property='st:published_at' content='' />
  <meta property='st:popularity' content='' />
</head>

st:title

The st:title tag specifies the title of the page, the value of which is used for the primary link in the search result listing. This value will overwrite the value in the page's <title> tag, if it is present.

<meta property='st:title' content='Page Title' />

st:section

The st:section tag specifies sections within a given page. Sections roughly correspond to the header tags (<h1>, <h2>, etc.) on a page, and are shown in the typeahead results for a search engine. You may add as many st:section tags to the page as you like — they will all be included in the crawled content.

<meta property='st:section' content='Page Section 1' />
<meta property='st:section' content='Page Section 2' />
<meta property='st:section' content='Page Section 3' />

st:image

The st:image tag specifies an image for the page, which will be used as a thumbnail in your search result listing if present. Please use an absolute URL for the image.

<meta property='st:image' content='http://www.yoursite.com/static/thumbnail.jpg' />

st:type

Many websites have multiple types of pages (e.g. on Flickr: User profile pages vs. Photo pages). The st:type tag specifies the page type, which you may use to filter results if you are querying your engine via our API.

<meta property='st:type' content='user_profile' />

st:info

The st:info tag specifies any additional information you would like to store about this page. This tag will be returned with search results when you query your engine via our API, and you may use the info however you like.

<meta property='st:info' content='user_id:1234' />

st:published_at

The st:published_at tag specifies the date when the page was published. It should be in ISO 8601 format. Time information is optional. This data may be used for range queries or sorting.

<meta property='st:published_at' content='2012-08-05T05:33:00-0700' />

st:popularity

The st:popularity tag specifies how "popular" a page is. It must be an integer. The popularity score is not used by default, but you can use it to adjust search result rankings with functional boosts. If not specified, the default value for popularity is 1.

<meta property='st:popularity' content='5' />

Content Exclusion

You may want to keep certain content from being indexed in your site search engine -- for example, your site header, footer, or menu bar. You can tell the Swiftype crawler to exclude these elements by adding the data-swiftype-index attribute to any element, as illustrated below. At the moment, setting this attribute to any value other than 'false' has no effect.

<body>

  This is your page content, which will be indexed by the Swiftype crawler.

  <p data-swiftype-index='false' />
    Content in this paragraph tag will be excluded from the search index!
  </p>

  This content will be indexed, since it isn't surrounded by an excluded tag.

  <div id='footer' data-swiftype-index='false'>
    This footer content will be excluded as well.
  </div>

</body>