# Google Search

The "Google Search" Step allows you to automate a Google Search and pass the results as input into your Workflows.

## Configuring a "Google Search" Step

Configuring the step is straightforward with simple dropdown menus. No JSON payload required.

<figure><img src="/files/EkhYoJWHfAujHsQKsmV7" alt=""><figcaption></figcaption></figure>

### Search Query

The "Search Query" input field is the exact phrase that will be Googled when the step runs, i.e. what do you want to search in Google?

{% hint style="info" %}
To search from a specific site, you can type **site:[www.example.com](http://www.example.com)** followed by your search phrase
{% endhint %}

### Search Parameters

Configure your search parameters using the dropdown menus:

* **Region**: Select the geographic region for your search results
* **Number of Results**: Choose how many results to return
* **Similar/Omitted Results**: Enable or disable filtering

{% hint style="info" %}
**Advanced Configuration:** For more complex use cases, you can still configure parameters based on the [SERP API documentation](https://serpapi.com/search-api) using JSON format.
{% endhint %}

To dynamically set variables as query or search parameters referencing an input (defined in the "Start" step) or output variable (generated by any step), you will need to use Liquid syntax:

{% @arcade/embed url="<https://app.arcade.software/share/ziYB9Ed9nh8CDuLHOHcX>" flowId="ziYB9Ed9nh8CDuLHOHcX" %}

### Output Types

The following Output Types are currently supported by the "Google Search" Step:

<figure><img src="/files/cjfxYAJYmfUl4c25vcbl" alt=""><figcaption></figcaption></figure>

**Links Only**: A list with links to the organic URL results.

```json
[
  "https://www.zdnet.com/article/six-skills-you-need-to-become-an-ai-prompt-engineer/",
  "https://en.wikipedia.org/wiki/Prompt_engineering",
  "https://www.mckinsey.com/featured-insights/mckinsey-explainers/what-is-prompt-engineering",
  "https://www.techtarget.com/searchenterpriseai/definition/AI-prompt-engineer",
  "https://www.datacamp.com/blog/what-is-prompt-engineering-the-future-of-ai-communication",
  "https://www.promptingguide.ai/",
  "https://aws.amazon.com/what-is/prompt-engineering/",
  "https://hbr.org/2023/06/ai-prompt-engineering-isnt-the-future",
  "https://www.iit.edu/blog/unlock-career-opportunities-ai-how-become-ai-prompt-engineer",
  "https://www.coursera.org/articles/how-to-become-a-prompt-engineer"
]
```

**Title, Snippet, Links (Markdown)**: Title, Snippet and Links for each organic result in Markdown format.

```markdown
**Six skills you need to become an AI prompt engineer**
Six skills you need to become an AI prompt engineer · 1. Understand AI, ML, and NLP · 2. Define problem statements clearly and specify detailed ...
https://www.zdnet.com/article/six-skills-you-need-to-become-an-ai-prompt-engineer/


**Prompt engineering**
Prompt engineering is the process of structuring text that can be interpreted and understood by a generative AI model. ... A prompt is natural language text ...
https://en.wikipedia.org/wiki/Prompt_engineering


**What is prompt engineering?**
Prompt engineering is the practice of designing inputs for generative AI tools that will produce optimal outputs.
https://www.mckinsey.com/featured-insights/mckinsey-explainers/what-is-prompt-engineering

...

```

**Organic Results (JSON)**: Organic results in JSON format.

```
[
  {
    "position": 1,
    "title": "Six skills you need to become an AI prompt engineer",
    "link": "https://www.zdnet.com/article/six-skills-you-need-to-become-an-ai-prompt-engineer/",
    "displayed_link": "https://www.zdnet.com › ... › Artificial Intelligence",
    "favicon": "https://serpapi.com/searches/65579a96e815af000b7dab68/images/a5422e713e6bc3f59a76b766eb80117740cc3058315f42d3df7f4337510ce3b6.png",
    "date": "Oct 3, 2023",
    "snippet": "Six skills you need to become an AI prompt engineer · 1. Understand AI, ML, and NLP · 2. Define problem statements clearly and specify detailed ...",
    "snippet_highlighted_words": [
      "prompt engineer"
    ],
    "about_page_link": "https://www.google.com/search?q=About+https://www.zdnet.com/article/six-skills-you-need-to-become-an-ai-prompt-engineer/&tbm=ilp",
    "about_page_serpapi_link": "https://serpapi.com/search.json?engine=google_about_this_result&google_domain=google.com&q=About+https%3A%2F%2Fwww.zdnet.com%2Farticle%2Fsix-skills-you-need-to-become-an-ai-prompt-engineer%2F",
    "cached_page_link": "https://webcache.googleusercontent.com/search?q=cache:QnozTEs7HoMJ:https://www.zdnet.com/article/six-skills-you-need-to-become-an-ai-prompt-engineer/&hl=en&gl=us",
    "source": "ZDNet"
  },
  ...
]
```

**Raw**: Complete results from Serp API in JSON format.

```
{
  "search_metadata": {
    "id": "65ad949daf5af14fb1f744b3",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/c058cc17ce2a376c/65ad949daf5af14fb1f744b3.json",
    "created_at": "2024-01-21 22:03:09 UTC",
    "processed_at": "2024-01-21 22:03:09 UTC",
    "google_url": "https://www.google.com/search?q=How+does+an+LLM+work%3F%0A%0A&oq=How+does+an+LLM+work%3F%0A%0A&num=1&sourceid=chrome&ie=UTF-8",
    "raw_html_file": "https://serpapi.com/searches/c058cc17ce2a376c/65ad949daf5af14fb1f744b3.html",
    "total_time_taken": 2.5
  },
  "search_parameters": {
    "engine": "google",
    "q": "How does an LLM work?\n\n",
    "google_domain": "google.com",
    "num": "1",
    "device": "desktop"
  },
  ...
```


---

# 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.airops.com/actions/workflow-concepts/workflow-steps/web-research/google-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.
