> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Serper Integration for AI Agents & Workflows

> Search the web with the Serper Google Search API. Supports web, news, places, and image search, returning organic results plus knowledge graph, answer box, people-also-ask, and related searches.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/placeholder.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=a4046f9cd6d738c81259050e9833913c" alt="Serper logo" width="72" height="72" data-path="logos/placeholder.svg" />

## Overview

Add **Serper** to any ModuleX agent or workflow. Search the web with the Serper Google Search API. A single `search` tool returns structured Google SERP data — web, news, places, and image results — over the `google.serper.dev` REST endpoint.

<Info>
  **Categories**: Web Search & Scraping · Search · Seo · **Auth**: API Key · **Actions**: 1
</Info>

## Authentication

### API Key Authentication

Authenticate using your Serper API key

<Steps>
  <Step title="Step 1">
    Go to [https://serper.dev](https://serper.dev) and sign up or log in
  </Step>

  <Step title="Step 2">
    Open your dashboard and navigate to the 'API Key' section
  </Step>

  <Step title="Step 3">
    Create a new API key or copy your existing one
  </Step>

  <Step title="Step 4">
    Paste the API key below
  </Step>
</Steps>

#### Required Credentials

| Field          | Description                         | Required | Format |
| -------------- | ----------------------------------- | -------- | ------ |
| Serper API Key | Your Serper API key from serper.dev | Yes      | `-`    |

## Available Actions

<AccordionGroup>
  <Accordion title="search — A powerful web search tool that provides access to Google search results through the Serper API. Supports different types of searches including regular web search, news, places, and images. Returns comprehensive results including organic results, knowledge graph, answer box, people also ask, related searches, and top stories.">
    ### Parameters

    <ResponseField name="query" type="string" required>
      The search query (e.g., "latest AI news", "best restaurants in NYC")
    </ResponseField>

    <ResponseField name="num" type="integer">
      Number of results to return (e.g., 10, 20, 50)
    </ResponseField>

    <ResponseField name="gl" type="string">
      Country code for search results (e.g., "us", "uk", "de", "fr")
    </ResponseField>

    <ResponseField name="hl" type="string">
      Language code for search results (e.g., "en", "es", "de", "fr")
    </ResponseField>

    <ResponseField name="type" type="string">
      Type of search to perform: "search" (default), "news", "places", "images", "videos", or "shopping" (Default: `search`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "SearchResultItem": {
          "additionalProperties": false,
          "description": "A single unified result row.\n\nThe populated fields depend on the search ``type``:\nweb/organic results carry title/link/snippet/position; news adds\n``date`` and ``image_url``; places add ``rating``/``reviews``/\n``address``; images add ``image_url``.",
          "properties": {
            "title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Title"
            },
            "link": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Link"
            },
            "snippet": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Snippet"
            },
            "position": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Position"
            },
            "date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Date"
            },
            "image_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Image Url"
            },
            "source": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Source"
            },
            "rating": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Rating"
            },
            "reviews": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Reviews"
            },
            "address": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Address"
            },
            "price": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Price"
            },
            "duration": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Duration"
            }
          },
          "title": "SearchResultItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "search_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Search Type"
        },
        "search_results": {
          "items": {
            "$ref": "#/$defs/SearchResultItem"
          },
          "title": "Search Results",
          "type": "array"
        },
        "knowledge_graph": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Knowledge Graph"
        },
        "answer_box": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Answer Box"
        },
        "people_also_ask": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "People Also Ask",
          "type": "array"
        },
        "related_searches": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Related Searches",
          "type": "array"
        },
        "top_stories": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Top Stories",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "SearchOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* **Rate limit**: \~100 requests/minute (per the standard tier).
* **Result count**: control with `num` (e.g. 10, 20, 50, 100); larger
  result counts consume more credits.
* **Error model**: non-2xx responses and timeouts are caught and
  returned as `success=False` + `error` rather than raising. Plan for
  retries on the agent side based on the error string.

## Related integrations

<CardGroup cols={3}>
  <Card title="Exa Search" href="/integrations/tools/exa-search" />

  <Card title="Firecrawl" href="/integrations/tools/firecrawl" />

  <Card title="Linkup" href="/integrations/tools/linkup" />
</CardGroup>

## Links

* [Serper](https://serper.dev)
