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

# Serper

> Google Search API that returns structured search results including web pages, news, images, and places.

Google Search API that returns structured search results including web pages, news, images, and places. Best for real-time web research, fact-checking, and gathering current information from Google's index. Unlike Brave or Exa, returns Google-specific result formats including knowledge panels and related searches. Lava slims /news responses by default — strips the imageUrl field on each article (often an inline base64 JPEG \~3.4KB each on historical date-range queries, \~88% of the response payload); pass filter.mode="full" or filter.\_lava\_keep\_images="true" to retain it.

6 endpoints available through Lava's AI Gateway. See the [Serper API docs](https://serper.dev) for full documentation.

<Info>Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.</Info>

## Endpoints

### Search the web via Google

**POST** `https://google.serper.dev/search` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://google.serper.dev/search', { body: {"q":"your search query"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fgoogle.serper.dev%2Fsearch" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"q":"your search query"}'
    ```
  </Tab>
</Tabs>

### Search for images

**POST** `https://google.serper.dev/images` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://google.serper.dev/images', { body: {"q":"your search query"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fgoogle.serper.dev%2Fimages" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"q":"your search query"}'
    ```
  </Tab>
</Tabs>

### Search for news articles. Lava strips the imageUrl field from each article by default (often inline base64 JPEGs on historical date-range queries) — pass filter.mode="full" or filter.\_lava\_keep\_images="true" to retain it.

**POST** `https://google.serper.dev/news` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://google.serper.dev/news', { body: {"q":"your search query"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fgoogle.serper.dev%2Fnews" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"q":"your search query"}'
    ```
  </Tab>
</Tabs>

### Search for places and businesses

**POST** `https://google.serper.dev/places` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://google.serper.dev/places', { body: {"q":"restaurants near me"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fgoogle.serper.dev%2Fplaces" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"q":"restaurants near me"}'
    ```
  </Tab>
</Tabs>

### Search Google Scholar

**POST** `https://google.serper.dev/scholar` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://google.serper.dev/scholar', { body: {"q":"machine learning"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fgoogle.serper.dev%2Fscholar" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"q":"machine learning"}'
    ```
  </Tab>
</Tabs>

### Get search autocomplete suggestions

**POST** `https://google.serper.dev/autocomplete` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://google.serper.dev/autocomplete', { body: {"q":"how to"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fgoogle.serper.dev%2Fautocomplete" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"q":"how to"}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
