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

# SerpAPI

> Configure the mAItion SerpAPI connector to ingest Google search results on a schedule.

Use [SerpAPI](https://serpapi.com/) Connector to ingest Google Search results.

## What It Does

* runs configured search queries via SerpAPI
* converts results to Markdown for indexing
* runs ingestion on configurable schedules

## Required Environment Variables

Set these in `.env.rag`:

* `SERPAPI1_KEY`: SerpAPI API key
* `SERPAPI1_QUERIES`: one query or comma-separated queries
* `SERPAPI1_SCHEDULES`: ingestion interval(s) in seconds (default is `3600`)

## `config.yaml` Example

```yaml theme={null}
sources:
  - type: "serpapi"
    name: "serp_ingestion1"
    enabled: true  # optional, default: true
    config:
      api_key: "${SERPAPI1_KEY}"
      queries: "${SERPAPI1_QUERIES}"
      schedules: "${SERPAPI1_SCHEDULES}"
```

## Configuration Reference

| Field           | Required | Default | Description                                                                        |
| --------------- | -------- | ------- | ---------------------------------------------------------------------------------- |
| `enabled`       | no       | `true`  | Set to `false` to skip this source entirely                                        |
| `api_key`       | yes      | —       | SerpAPI API key                                                                    |
| `queries`       | yes      | —       | One query or comma-separated list of queries                                       |
| `schedules`     | no       | `3600`  | Ingestion interval in seconds                                                      |
| `request_delay` | no       | `0`     | Seconds to wait between API requests. Increase to avoid rate-limiting (e.g. `0.1`) |

## Multiple SerpAPI Sources

Add more `sources` entries (`serp_ingestion2`, `serp_ingestion3`, etc) with separate env vars per source.
