---
title: "Youtube URL"
date: "2023-10-05T01:48:32+00:00"
summary: "Easily embed YouTube videos on your website with our YouTube URL form field. Streamline content creation and enhance user engagement by seamlessly integrating video content into your pages."
image:
type: "page"
url: "/drupal-starter-kits/add-ons/site-studio/youtube-url"
id: "6b705e8d-c039-4eea-a466-7f2786d3c6e1"
---

Schema:

    {
      "type": "object",
      "properties": {
        "type": {"type": "string", "pattern": "^form-field$"},
        "id": {"type": "string", "pattern": "^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$"},
        "machine_name": {"type": "string"},
        "data": {
          "type": "object",
          "properties": {
            "uid": {"type": "string","pattern": "^form-youtube-embed$"},
            "title": {"type": "string"},
            "value": {"type": "string"}
          }
        }
      },
      "required": ["id", "type", "data"]
    }
    

Example output:

Given "Youtube URL" form element on a component set up like so

![a96b8999-Screenshot%202023-12-06%20at%2001.17.28.png](https://acquia.widen.net/content/83e25520-ed43-4c94-a873-4a5e16ca6662/web/a96b8999-Screenshot%202023-12-06%20at%2001.17.28.png)

And used on Node layout canvas like so

![9f0cd723-Screenshot%202023-12-06%20at%2001.18.16.png](https://acquia.widen.net/content/8d67527c-4620-431c-888f-5179e93ad702/web/9f0cd723-Screenshot%202023-12-06%20at%2001.18.16.png)

JSON:API output for this form field will be this:

    {
      "type": "form-field",
      "id": "1322982e-9bbe-471a-b840-23d2b5fe3631",
      "machine_name": "youtube-url",
      "data": {
        "uid": "form-youtube-embed",
        "title": "Youtube URL",
        "value": "https://youtu.be/dQw4w9WgXcQ?si=MQ6Hl49U0PSEPKtz"
      }
    }