Skip to content
Last updated

AsyncAPI extension: x-seo

Products:RedocRedocRealmRealm
Plans:ProEnterpriseEnterprise+

Use x-seo to control the SEO meta tags rendered in the HTML <head> of an individual operation or channel page. The tags include the page title, description, keywords, and the image used when the page link is shared.

Location

The x-seo extension can be added to an Operation Object or a Channel Object.

Options

OptionTypeDescription
titlestringSets the page <title>, and the og:title and twitter:title meta tags for the page.
descriptionstringSets the <meta name="description">, and the og:description and twitter:description meta tags.
keywordsstringSets the <meta name="keywords"> tag. Provide a comma-separated list of keywords.
imagestringSets the og:image and twitter:image meta tags — the rich preview image shown when the page link is shared.

When a field is omitted, title falls back to the operation or channel title, then summary. description falls back to the operation or channel description, then summary. keywords and image have no fallback and are added only when set.

Examples

x-seo on an operation

operations:
  receiveLightMeasurement:
    action: receive
    summary: Receive light measurement events
    channel:
      $ref: '#/channels/lightMeasured'
    x-seo:
      title: "Custom page title"
      description: "Detailed page description"
      keywords: documentation, operation, example
      image: 'https://example.com/image.png'

Each field is resolved independently, so you can override only the fields you need. In the following example, title and description both fall back to the operation summary, since it has no title or description of its own. The keywords and image values come from the extension:

operations:
  receiveLightMeasurement:
    action: receive
    summary: Receive light measurement events
    channel:
      $ref: '#/channels/lightMeasured'
    x-seo:
      keywords: documentation, operation, example
      image: 'https://example.com/image.png'

x-seo on a channel

channels:
  lightMeasured:
    address: light/measured
    summary: Light measurement channel
    x-seo:
      title: "Light measured channel"
      description: "Events emitted whenever the light intensity changes"
      keywords: events, light, telemetry
      image: 'https://example.com/light.png'

Resources

  • Search engine optimization - Configure site-wide SEO, meta tags, and social sharing for your Redocly project
  • x-metadata - Add a custom metadata table to the top of the API overview (info-level metadata)
  • Supported AsyncAPI extensions - Complete list of all AsyncAPI extensions supported by Redocly for enhanced API documentation