---
title: "Question Schema"
description: "Use defineQuestion() to add FAQ structured data. Enable FAQ rich snippets with expandable Q&A directly in Google search results."
canonical_url: "https://unhead.unjs.io/docs/schema-org/api/schema/question"
last_updated: "2026-05-23T16:28:07.809Z"
---

## Schema.org Question

- **Type**: `defineQuestion(input?: Question)`<br />

Describes an individual question. Most commonly used for creating an FAQ type page.

## Useful Links

- [Schema.org Question](https://schema.org/Question)
- [Recipe: FAQ](/docs/schema-org/guides/recipes/faq)

## Required properties

- **name** `string`<br />

The text content of the question.
- **acceptedAnswer** `string|Answer`<br />

The text content of the answer.

## Examples

### Minimal

```ts
defineQuestion({
  name: 'What is the meaning of life?',
  acceptedAnswer: '42',
})
```

## Defaults

- **@type**: `Question`
- **@id**: `${canonicalUrl}#/schema/question/${questionId}`
- **inLanguage**: `options.defaultLanguage` *(see: user Config)*

## Resolves

See [Global Resolves](/docs/schema-org/guides/get-started/overview#site-page-level-config) for full context.

- will convert a string answer to an [Answer](https://schema.org/Answer) object.
- `@id` is resolved using a hash of the question name if not provided

## Relation Transforms

[WebPage](/docs/schema-org/api/schema/webpage)

- Each question will append an entry on to `mainEntity`

## Types

```ts
/**
 * A specific question - e.g. from a user seeking answers online, or collected in a Frequently Asked Questions (FAQ) document.
 */
export interface QuestionSimple extends Thing {
  /**
   * The text content of the question.
   */
  name: string
  /**
   * An answer object, with a text property which contains the answer to the question.
   */
  acceptedAnswer: NodeRelation<Answer | string>
  /**
   * The language code for the question; e.g., en-GB.
   */
  inLanguage?: string
  /**
   * The number of answers provided for this question.
   */
  answerCount?: number
  /**
   * The date and time the question was created.
   */
  dateCreated?: string
  /**
   * Alias for `name`
   */
  question?: string
  /**
   * Alias for `acceptedAnswer`
   */
  answer?: string
}

/**
 * An answer offered to a question; perhaps correct, perhaps opinionated or wrong.
 */
export interface Answer extends Optional<Thing, '@id'> {
  text: string
}
```

## Related Schemas

- [Person](/docs/schema-org/api/schema/person) - Question author
- [Article](/docs/schema-org/api/schema/article) - Related article
