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

# Serper Maps: Inputs, Cost & CLI Example

> Google Maps / local business search with addresses, phone numbers, ratings, websites, and CIDs. Includes inputs, outputs, costs, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=serper_google_maps_search:{"query":"{{query}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                  | Type                | Required | Default | Description                                                 |
| --------------------- | ------------------- | -------- | ------- | ----------------------------------------------------------- |
| `payload.query`       | `string`            | Yes      |         | Maps search query string.                                   |
| `payload.ll`          | `string`            | No       |         | GPS position and zoom in `@latitude,longitude,zoom` format. |
| `payload.placeId`     | `string`            | No       |         | Optional Google place ID filter/anchor.                     |
| `payload.cid`         | `string \| integer` | No       |         | Optional Google CID filter/anchor.                          |
| `payload.hl`          | `string`            | No       | `"en"`  | Language code. Defaults to `en`.                            |
| `payload.gl`          | `string`            | No       | `"us"`  | Country code. Defaults to `us`.                             |
| `payload.page`        | `integer`           | No       |         | 1-indexed results page.                                     |
| `payload.autocorrect` | `boolean`           | No       |         | Enable query autocorrection.                                |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Run a Serper Google Maps search.",
    "properties": {
      "query": {
        "type": "string",
        "description": "Maps search query string."
      },
      "ll": {
        "type": "string",
        "description": "GPS position and zoom in `@latitude,longitude,zoom` format.",
        "minLength": 1
      },
      "placeId": {
        "type": "string",
        "description": "Optional Google place ID filter/anchor.",
        "minLength": 1
      },
      "cid": {
        "description": "Optional Google CID filter/anchor.",
        "anyOf": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "type": "integer",
            "minimum": 0
          }
        ]
      },
      "hl": {
        "type": "string",
        "description": "Language code. Defaults to `en`.",
        "default": "en",
        "minLength": 2,
        "maxLength": 8
      },
      "gl": {
        "type": "string",
        "description": "Country code. Defaults to `us`.",
        "default": "us",
        "minLength": 2,
        "maxLength": 2
      },
      "page": {
        "type": "integer",
        "description": "1-indexed results page."
      },
      "autocorrect": {
        "type": "boolean",
        "description": "Enable query autocorrection."
      }
    },
    "required": [
      "query"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "searchParameters": {
            "type": "object",
            "additionalProperties": {}
          },
          "places": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "number"
                },
                "title": {
                  "type": "string"
                },
                "address": {
                  "type": "string"
                },
                "latitude": {
                  "type": "number"
                },
                "longitude": {
                  "type": "number"
                },
                "rating": {
                  "type": "number"
                },
                "ratingCount": {
                  "type": "number"
                },
                "category": {
                  "type": "string"
                },
                "phoneNumber": {
                  "type": "string"
                },
                "website": {
                  "type": "string"
                },
                "cid": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute serper_google_maps_search --payload '{
  "query": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.04` per pricing unit.
* Billing mode: `post_deduct`.
