# SEO Metadata


# Introduction

SEO Metadata feature can help you dynamically build user queries into search result pages to provide a detailed and precise description about each search result and thus achieve better search engine optimization outcome and higher ranking performance.

For example, when the user searches cars of BMW make, a summary sentence containing "BMW" will be returned in field Seo.Metadata.Results.Title:

"SeoMetadata": {
    Results: {
        "H1": "6,460 Fantasy books for sale in Australia",
        "Title": "Fantasy books for sale in Australia - bookshop.com.au",
        "Description": "Search for new & used Fantasy books for sale in Australia. Read Fantasy book reviews and compare Fantasy prices and features at bookshop.com.au."
    },
    "Query": "Genre.Fantasy.",
    "SeoUrl": "/fantasy/"
}

Then at the head section of the search result page, you could populate <title> with the value from SeoMetadata.Results.Title to dynamically present more context of each search result to search engine crawler.

Same at the <h1> section of the web page, you can populate it with the value from SeoMetadata.Results.H1 to automatically generate a precise and detailed title for viewers to quickly grasp the context of the search result page.

Last but not least, the URL of this query now has a shorter and human-readable new form as returned in SeoMetadata.SeoUrl field: /Fantasy/. Without the SeoMetadata feature, your query URL would look like this:

baseUrl/q=Genre.Fantasy.&sr

Now users can hit this search page with the human-readable URL:

baseUrl/Fantasy/

Currently, we only support the following data types in metadata.

  • aspect
  • range
  • POI

# Configuration

# Field: SeoMetadata

# Description:

SeoMetadata specifies how to compose metadata

# Type: Object

# Fields:


# Field: CultureBasedFormatterOptions

# Description:

Specify what culture variety for formatting response SeoMetadata.Results

# Type: Enum

# Values options:
  • en-AU
  • en-US
  • es-MX
  • es-ES
  • es-CL
  • es-AR

# Field: WordPluralizer

# Description:

Pluralize texts according to different cultures.

When using WordPluralizer, it will be applied after any formatting rules specified in ExpressionValueFormatterOptions.

For example, if the configuration uses SpanishWordPluralizer and specifies FacetFormattingRules as:

"KeyedFactoryOptions": {
    "WordPluralizer": "SpanishWordPluralizer"
},
...
"FacetFormattingRules": {
  "Tipo": {
    "Format": "(value) lápiz"
  },
...

Input:

Usado

Final output will be:

Usadoes lápizes

Instead of:

Usadoes lápiz

The complete format will be generated first as Usado lápiz, and then this Spanish term will be pluralized to Usadoes lápizes as a whole.


# Field: EnglishWordPluralizerOptions

# Description:

Options for configuring EnglishWordPluralizer

# Type: Object


# Field: SpanishWordPluralizerOptions

# Description:

Options for configuring SpanishWordPluralizer

# Type: Object


# Type: Enum

# Value options
  • EnglishWordPluralizer
  • NullWordPluralizer
    • Description: No pluralizer applied

# Field: MetadataGeneratorPatterns

# Description:

MetadataGeneratorPatterns specifies what and how metadata is generated.

# Type: Object


# Field: MetadataGeneratorOptions (Deprecated)

# Description:

Deprecated. Please use MetadataGeneratorPatterns instead.

# Type: Object


# Field: ExpressionValueFormatterOptions

# Description:

Refer to SEO

# Type: Object

# Response

A successful response looks like:

"SeoMetadata": {
    Results: {
        "H1": "6,460 Fantasy books for sale in Australia",
        "Title": "Fantasy books for sale in Australia - bookshop.com.au",
        "Description": "Search for new & used Fantasy books for sale in Australia. Read Fantasy book reviews and compare Fantasy book prices and features at bookshop.com.au."
    },
    "Query": "Genre.Fantasy.",
    "SeoUrl": "/fantasy/"
}

# Fields:

# Field: Results

# Description:

Results object contains dynamically yielded SEO metadata sentences configured by [MetadataGeneratorOptions]. Each key-value pair specified in [MetadataGeneratorOptions] will become a key-value pair of object SeoMetadata.Results.

Having it set up this way lets you specify multiple different patterns for each section that occur differently depending on what inputs are given within the []. For example, with the example below, the H1Pattern will take items [Volume], [PublishData], [Genre], and [Series] if they are provided in the search request and will place them into that header in that order, not all of them have to be present for it to generate.

For example when SeoMetadata.MetadataGeneratorOptions is this:

"MetadataGeneratorOptions": {
    "H1Patterns": [
        "[[]] items [Volume] [PublishData] [Genre] [Series]"
    ],
    "TitlePatterns": [
        "Some title pattern [Volume] [PublishDate]"
    ]
}
...

The response SeoMetadata.Results will be:

"SeoMetadata": {
    "Results": {
        "H1": "6,460 items",
        "Title": "Some title pattern"
    },
...

# Type: Object


# Field: Query

# Description:

# Type: string


# Field: SeoUrl

# Description:

SeoUrl is the translated human-readable URL of the original query URL.

# Type: string

# Configuration Full Example

{
  "Books": {
    "WordPluralizer": "EnglishWordPluralizer",
    "MetadataGeneratorOptions": {
      "H1Patterns": [
        "[[]] items [Genre] [Series]"
      ],
      "TitlePatterns": [
        "Some title pattern [Genre] [Series]"
      ]
    },
    "ExpressionValueFormatterOptions": {
      "DefaultFacetFormattingRule": {
        "Format": "(value)"
      },
      "DefaultRangeFormattingRule": {
        "Format": "(value)",
        "OnlyLowerFormat": "over (lower)",
        "OnlyUpperFormat": "under (upper)",
        "SameValueFormat": "between (lower) & (upper)",
        "BothValueFormat": "between (lower) & (upper)"
      },
      "DefaultPoiFormattingRule": {
        "Format": "within (distance)km of (poi)"
      },
      "FacetFormattingRules": {
        "Genre": {
          "Format": "(value) genre"
        }
      }
    }
  }
}