Custom fields

You can define fields with custom names and values using meta tags on your web pages. Our API returns the names and values of the custom fields in search results, and you can filter the search results using them.

To define custom fields on a web page, use addsearch-custom-field meta tag like this:

<html>
  <head>
    <meta name="description" content="This is a test page"/>
    <meta name="addsearch-custom-field" content="city=London"/>
    <meta name="addsearch-custom-field" content="genre=rock;genre=pop"/>
    <meta name="addsearch-custom-field" content="genre=hiphop"/>
  </head>
  <body>
    Lorem ipsum
  </body>
</html>

You can assign multiple values to a single custom field name. Add multiple values to separate meta tags or combine multiple values by separating them with a semicolon.

Search results can be filtered against custom fields in the Search API and Separate results page.