TypeScript
Core Concepts

Google Search Fields

Unhead types the Google-supported properties used by its Search feature helpers. The types also resolve nested identities, URLs, dates, and known Schema.org relations.

Google changes feature requirements independently of Unhead releases. Check the structured data feature gallery before publishing. Extra Schema.org properties still pass through to JSON-LD.

Composed features

Profile page

Use defineWebPage() with ProfilePage. An inline Person or Organization becomes the page's mainEntity.

defineWebPage({
  '@type': 'ProfilePage',
  'dateCreated': new Date('2026-01-01'),
  'mainEntity': definePerson({
    name: 'Ada Lovelace',
    alternateName: 'ada',
    identifier: 'profile-1',
    interactionStatistic: {
      '@type': 'InteractionCounter',
      'interactionType': 'FollowAction',
      'userInteractionCount': 42,
    },
  }),
})

Q&A page

Register a QAPage and one Question. The Question resolver links itself as mainEntity.

useSchemaOrg([
  defineWebPage({
    '@type': 'QAPage',
  }),
  defineQuestion({
    name: 'How should this be configured?',
    answerCount: 1,
    suggestedAnswer: {
      text: 'Use the typed helper.',
      author: {
        '@type': 'Organization',
        'name': 'Unhead',
      },
      datePublished: new Date('2026-01-02'),
      url: '/answers/typed-helper',
    },
  }),
])

Speakable content

Provide either cssSelector or xPath. The type rejects an object containing both.

defineArticle({
  headline: 'Release notes',
  speakable: {
    cssSelector: ['.headline', '.summary'],
  },
})

Paywalled content

Set isAccessibleForFree to false, then describe each paywalled section with a WebPageElement.

defineArticle({
  headline: 'Subscriber report',
  isAccessibleForFree: false,
  hasPart: {
    cssSelector: '.paywall',
    isAccessibleForFree: false,
  },
})

Summary-page carousels use ListItem.position and ListItem.url.

defineItemList({
  itemListElement: [
    defineListItem({
      position: 1,
      url: '/products/one',
    }),
    defineListItem({
      position: 2,
      url: '/products/two',
    }),
  ],
})

Video enhancements

Video supports Clip key moments, BroadcastEvent livestream details, interaction counts, region restrictions, and SeekToAction URL patterns. contentUrl or embedUrl can be used without the generic url property.

defineVideo({
  name: 'Launch stream',
  thumbnailUrl: '/poster.jpg',
  uploadDate: new Date('2026-01-01'),
  contentUrl: '/video.mp4',
  regionsAllowed: ['AU', 'NZ'],
  hasPart: {
    name: 'Introduction',
    startOffset: 0,
    url: '/watch?t=0',
  },
  potentialAction: {
    target: '/watch?t={seek_to_second_number}',
    'startOffset-input': 'required name=seek_to_second_number',
  },
})

Other typed Google properties

The existing helpers also expose these Google-supported property groups:

  • Dataset funding, identifiers, measurement techniques, parts, catalogs, and downloads
  • Event identity unions, repeated previous dates, and offer validity
  • Image creator, credit, copyright, and license metadata
  • Job posting remote locations, credentials, identifiers, and experience substitution
  • Local business departments, coordinates, menus, ratings, and reviews
  • Organization contact points, legal identifiers, loyalty tiers, return policies, and shipping conditions
  • Product variants, categories, certifications, audiences, identifiers, member pricing, sizes, and 3D models
  • Recipe sections, ratings, repeated images and yields, and Person or Organization authors
  • Review subjects, Person or Organization authors, and positive or negative notes

Required property alternatives are represented as unions where the same helper does not serve a broader Schema.org use case. Examples include Offer price sources, AggregateRating counts, remote job locations, SoftwareApplication ratings, and speakable selectors.

Did this page help you?