# SerpAPIWrapper

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/utilities/serpapi/SerpAPIWrapper)

Wrapper around SerpAPI.

To use, you should have the ``google-search-results`` python package installed,
and the environment variable ``SERPAPI_API_KEY`` set with your API key, or pass
`serpapi_api_key` as a named parameter to the constructor.

## Signature

```python
SerpAPIWrapper()
```

## Description

**Example:**

```python
from langchain_community.utilities import SerpAPIWrapper
serpapi = SerpAPIWrapper()
```

## Extends

- `BaseModel`

## Properties

- `search_engine`
- `params`
- `serpapi_api_key`
- `aiosession`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/utilities/serpapi/SerpAPIWrapper/validate_environment)
- [`arun()`](https://reference.langchain.com/python/langchain-community/utilities/serpapi/SerpAPIWrapper/arun)
- [`run()`](https://reference.langchain.com/python/langchain-community/utilities/serpapi/SerpAPIWrapper/run)
- [`results()`](https://reference.langchain.com/python/langchain-community/utilities/serpapi/SerpAPIWrapper/results)
- [`aresults()`](https://reference.langchain.com/python/langchain-community/utilities/serpapi/SerpAPIWrapper/aresults)
- [`get_params()`](https://reference.langchain.com/python/langchain-community/utilities/serpapi/SerpAPIWrapper/get_params)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/utilities/serpapi.py#L29)