# Youtube Search

## Try it in the Widget Center

Click this [url](https://app.myshell.ai/robot-workshop/widget/1781994395360530432) to try this widget and copy the Pro Config template.

## Usage

The search results contain the Youtube link as well as some metadata like video length, video title, etc.

**Input Parameters**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>query</td><td><code>string</code></td><td>The search query string that specifies what the search should be about.</td><td></td><td>true</td></tr><tr><td>num_results</td><td><code>integer</code></td><td>The number of search results to return.</td><td>10</td><td>false</td></tr></tbody></table>

**Output Parameters**

| Name            | Type    | Description                                                                             | File Type |
| --------------- | ------- | --------------------------------------------------------------------------------------- | --------- |
| search\_results | `array` | The result of google search, containing the links, titles, and other useful information |           |

**Output Example**

{% tabs %}
{% tab title="success" %}
{% code fullWidth="false" %}

```json
{
  "search_results": [
    {
      "description": "The fragrant licorice, the sweet flowers, the picturesque snowstorms, the falling glaze... For the girl descended from qilin, this is all ...",
      "length": "2:04",
      "link": "https://www.youtube.com/watch?v=FHRXP8ceeBU",
      "thumbnail": {
        "rich": "https://i.ytimg.com/an_webp/FHRXP8ceeBU/mqdefault_6s.webp?du=3000\u0026sqp=CL_bnbEG\u0026rs=AOn4CLAx4IscemmtJCCVTwUygJiYINJZYg",
        "static": "https://i.ytimg.com/vi/FHRXP8ceeBU/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==\u0026rs=AOn4CLApF4T3bUyjg8ifKE-fCmyFRDaN6g"
      },
      "title": "Character Demo - \"Ganyu: Radiant Dreams\" | Genshin Impact"
    },
    {
      "description": "Light-footed, she paces the streets and alleys. She has some secrets regarding Liyue Harbor to share with you at night before the ...",
      "length": "1:06",
      "link": "https://www.youtube.com/watch?v=ASO6t2zp_UI",
      "thumbnail": {
        "rich": "https://i.ytimg.com/an_webp/ASO6t2zp_UI/mqdefault_6s.webp?du=3000\u0026sqp=CKKgnbEG\u0026rs=AOn4CLDDE7vsYiyiMrWpiBSCmTF2-uswKw",
        "static": "https://i.ytimg.com/vi/ASO6t2zp_UI/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==\u0026rs=AOn4CLBx4-Q6sS4xDvkAhaU2Yq5gBtqyeg"
      },
      "title": "Character Teaser - \"Ganyu: A Night in Liyue Harbor\" | Genshin Impact"
    },
    {
      "description": "#GenshinImpact #HoYoverse #CharacterTeaser #Xianyun #DiscernmentandIngenuity #Ganyu ↓ Follow us for the latest news ...",
      "length": "2:11",
      "link": "https://www.youtube.com/watch?v=O_7r93u9mWs",
      "thumbnail": {
        "rich": "https://i.ytimg.com/an_webp/O_7r93u9mWs/mqdefault_6s.webp?du=3000\u0026sqp=CKG6nbEG\u0026rs=AOn4CLDJMmFd04KBYDa6y9o0cwaIVWxJKQ",
        "static": "https://i.ytimg.com/vi/O_7r93u9mWs/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==\u0026rs=AOn4CLA5Ef0t1BXLFxiCtwLHyi3aX2TwJw"
      },
      "title": "Character Teaser - \"Xianyun: Discernment and Ingenuity\" | Genshin Impact"
    },
    {
      "description": "\"My job is to honor my contract with Rex Lapis by looking out for the interests of all living things in Liyue.\" Download FREE: ...",
      "length": "5:31",
      "link": "https://www.youtube.com/watch?v=tsPtGG9pFfg",
      "thumbnail": {
        "rich": "https://i.ytimg.com/an_webp/tsPtGG9pFfg/mqdefault_6s.webp?du=3000\u0026sqp=CIjUnbEG\u0026rs=AOn4CLDJ4dHXQcP9XZb39RZ6scLEWqbWJA",
        "static": "https://i.ytimg.com/vi/tsPtGG9pFfg/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==\u0026rs=AOn4CLAyCzjVTrFcCn15GfsRieMR4TfgcA"
      },
      "title": "Collected Miscellany - \"Ganyu: Ambling Amidst Karst Peaks\" | Genshin Impact"
    },
    {
      "description": "I remixed Qilin's Prance a PV theme song of Ganyu one of the characters of Genshin as Uplifting Trance. In addition to the theme ...",
      "length": "8:37",
      "link": "https://www.youtube.com/watch?v=H_NvlHOpI9k",
      "thumbnail": {
        "rich": "https://i.ytimg.com/an_webp/H_NvlHOpI9k/mqdefault_6s.webp?du=3000\u0026sqp=CI2lnbEG\u0026rs=AOn4CLALMrz6olTB4jWyZIA9wcAPgOzjsQ",
        "static": "https://i.ytimg.com/vi/H_NvlHOpI9k/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==\u0026rs=AOn4CLB146cnzOIjHo0xm-zLSP7XJ98xZA"
      },
      "title": "【Genshin Impact】 Ganyu PV Theme 「Qilin's Prance」 Uplifting Trance Remix"
    }
  ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.myshell.ai/create/pro-config-mode/api-reference/widgets/20-youtube-search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
