---
title: "Custom Nodes · Unhead"
canonical_url: "https://unhead.unjs.io/docs/nuxt/schema-org/guides/recipes/custom-nodes"
last_updated: "2026-09-12T15:23:17.076Z"
meta:
  description: "Create custom Schema.org types not in built-in helpers. Pass plain objects to useSchemaOrg() with TypeScript support via schema-dts."
  "og:description": "Create custom Schema.org types not in built-in helpers. Pass plain objects to useSchemaOrg() with TypeScript support via schema-dts."
  "og:title": "Custom Nodes · Unhead"
---

Home

`
Unhead on GitHub

Switch to NuxtSwitch to TypeScriptSwitch to VueSwitch to ReactSwitch to SvelteSwitch to Solid.jsSwitch to Angular

**Recipes**

# **Custom Nodes**

[Copy for LLMs](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/2.guides/4.recipes/0.custom-nodes.md)

Create custom Schema.org nodes by passing a plain object to `**useSchemaOrg()**`. Set `**@type**` to the schema type and add any valid Schema.org properties.

## Why Create Custom Schema.org Nodes?

Use a custom node when Unhead does not provide a dedicated helper for the Schema.org type you need.

Custom nodes are plain objects following the [**~~Schema.org specification~~**](https://schema.org/docs/full.html).

```
import { useSchemaOrg } from '#imports'

useSchemaOrg([
  {
    '@type': 'SingleFamilyResidence',
    'numberOfRooms': 3,
    'occupancy': {
      '@type': 'QuantitativeValue',
      'maxValue': 5,
      'unitCode': 'C62',
    },
    'numberOfBathroomsTotal': 2,
    'floorSize': {
      '@type': 'QuantitativeValue',
      'value': 2000,
      'unitCode': 'FTK',
    },
    'petsAllowed': true,
  }
])
```

Schema.org expects [`**QuantitativeValue**`](https://schema.org/QuantitativeValue) objects for measurements such as [`**occupancy**`](https://schema.org/occupancy) and [`**floorSize**`](https://schema.org/floorSize). Keeping the value and unit together makes the JSON-LD unambiguous.

## How Do I Add TypeScript Support for Custom Nodes?

Use [**~~schema-dts~~**](https://github.com/google/schema-dts) for full TypeScript support with custom nodes.

```
import type { DefinedTerm } from 'schema-dts'
import { useSchemaOrg } from '#imports'

useSchemaOrg([
  <DefinedTerm> {
    '@type': 'DefinedTerm',
    'name': 'Unhead Schema.org',
    'description': 'Unhead Schema.org is a library for adding Schema.org to your application.',
    'inDefinedTermSet': {
      '@type': 'DefinedTermSet',
      'name': 'Schema.org Libraries',
    },
  }
])
```

## Related Recipes

- [**~~Setting Up Your Identity~~**](https://unhead.unjs.io/docs/schema-org/guides/recipes/identity): Define your organization/person
- [**~~Blog Posts~~**](https://unhead.unjs.io/docs/schema-org/guides/recipes/blog): Article structured data
- [**~~E-commerce~~**](https://unhead.unjs.io/docs/schema-org/guides/recipes/e-commerce): Product structured data

[Edit this page](https://github.com/unjs/unhead/edit/main/docs/schema-org/2.guides/4.recipes/0.custom-nodes.md)

[Markdown For LLMs](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/2.guides/4.recipes/0.custom-nodes.md)

**Did this page help you? **

[**Schema.org Params** Configure shared Schema.org metadata with host, path, inLanguage, currency, and trailingSlash. Each resolver inherits the values it supports.](https://unhead.unjs.io/docs/schema-org/guides/core-concepts/params) [**Identity** Set up Organization, Person, or LocalBusiness as your site identity and connect it to articles, products, pages, and your website.](https://unhead.unjs.io/docs/schema-org/guides/recipes/identity)

**On this page **

- [Why Create Custom Schema.org Nodes?](#why-create-custom-schemaorg-nodes)
- [How Do I Add TypeScript Support for Custom Nodes?](#how-do-i-add-typescript-support-for-custom-nodes)
- [Related Recipes](#related-recipes)