> ## 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 Search Batch: Inputs, Cost & CLI Example

> Running up to 100 Google web searches in one request. Row-wise serper_google_search calls compile into this automatically.

## 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_search_batch:{"queries":"{{queries}}"}' --json
```

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

## Input Schema

| Name              | Type    | Required | Default | Description                                                                                    |
| ----------------- | ------- | -------- | ------- | ---------------------------------------------------------------------------------------------- |
| `payload.queries` | `array` | Yes      |         | Up to 100 Serper web searches executed in one request. Results are returned in the same order. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Run up to 100 Serper web searches in a single batched request.",
    "properties": {
      "queries": {
        "type": "array",
        "description": "Up to 100 Serper web searches executed in one request. Results are returned in the same order.",
        "minItems": 1,
        "maxItems": 100,
        "items": {
          "type": "object",
          "description": "Run a Serper web search against Google results.",
          "properties": {
            "query": {
              "type": "string",
              "description": "Search query string.",
              "minLength": 1
            },
            "gl": {
              "type": "string",
              "description": "Country code. Defaults to `us`.",
              "default": "us",
              "minLength": 2,
              "maxLength": 2
            },
            "hl": {
              "type": "string",
              "description": "Language code. Defaults to `en`.",
              "default": "en",
              "minLength": 2,
              "maxLength": 8
            },
            "page": {
              "type": "integer",
              "description": "1-indexed results page."
            },
            "num": {
              "type": "integer",
              "description": "Requested result count."
            },
            "autocorrect": {
              "type": "boolean",
              "description": "Enable query autocorrection."
            },
            "tbs": {
              "type": "string",
              "description": "Google tools/search modifier, for example `qdr:d`.",
              "minLength": 1
            },
            "location": {
              "type": "string",
              "description": "Human-readable location bias.",
              "minLength": 1
            }
          },
          "required": [
            "query"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "queries"
    ],
    "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": {
          "results": {
            "type": "array",
            "description": "Per-query responses, positionally aligned with the submitted queries.",
            "items": {
              "type": "object",
              "description": "Provider response payload.",
              "properties": {
                "searchParameters": {
                  "type": "object",
                  "properties": {
                    "q": {
                      "type": "string"
                    },
                    "gl": {
                      "type": "string"
                    },
                    "hl": {
                      "type": "string"
                    },
                    "num": {
                      "type": "number"
                    },
                    "autocorrect": {
                      "type": "boolean"
                    },
                    "page": {
                      "type": "number"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "knowledgeGraph": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "website": {
                      "type": "string"
                    },
                    "imageUrl": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "descriptionSource": {
                      "type": "string"
                    },
                    "descriptionLink": {
                      "type": "string"
                    },
                    "attributes": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "additionalProperties": false
                },
                "organic": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "link": {
                        "type": "string"
                      },
                      "snippet": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string"
                      },
                      "position": {
                        "type": "number"
                      },
                      "sitelinks": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "link": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "first_result": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "link": {
                      "type": "string"
                    },
                    "snippet": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string"
                    },
                    "position": {
                      "type": "number"
                    },
                    "sitelinks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "link": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "peopleAlsoAsk": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "question": {
                        "type": "string"
                      },
                      "snippet": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "link": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "relatedSearches": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "required": [
          "results"
        ],
        "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_search_batch --payload '{
  "queries": "array"
}' --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.02` per pricing unit.
* Billing mode: `post_deduct`.
