# Google Search Module

`GoogleSearchModule` provides creators with the ability to access google search and retrieve search result within Pro Config.

`GoogleSearchConfig`

| Field's Name        | JSON Type (Required/Optional)  | Description                                                                                                     | Example                |
| ------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------- | ---------------------- |
| query               | string (Required)              | The search query in Google.                                                                                     | 'What is the weather?' |
| num\_results        | number (Optional. Default:3)   | The number of search results. Keep in mind that more results may increase the module's response time.           | 3                      |
| length\_per\_result | number (Optional. Default:500) | The maximum character length for each retrieved search result. Any text exceeding this limit will be truncated. | 500                    |
| output\_name        | string (Required)              | Specifies the name of the output in GoogleSearchModule.                                                         | 'output'               |

**Example**

```json
{
  "id": "test",
  "initial": "home_state",
  "states": {
    "home_state": {
      "inputs": {
        "text_to_be_search": {
          "type": "text",
          "user_input": true
        }
      },
      "tasks": [
        {
          "name": "google_search_module_test_task",
          "module_type": "GoogleSearchModule",
          "module_config": {
            "query": "{{text_to_be_search}}",
            "num_results": 3,
            "length_per_result":500,
            "output_name": "result"
          }
        }
      ],
      "render": {
        "text": "{{result}}",
        "buttons": [
          {
            "content":"Search Again",
            "description":"",
            "on_click":"search"
          }
        ]
      },
      "transitions": {
        "search": "home_state"
      }
    }
  }
}
```


---

# 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/module/google-search-module.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.
