Overview
The Google Serper Search tool is a tool that allows you to search the web using the Google Serper API.How It Works
Getting Started
Simple Usage
- Install dependencies (see Overview above)
- Set required API keys in your environment
- Run the agent example in Overview
Best Practices
Keep SERPER_API_KEY in the environment
Keep SERPER_API_KEY in the environment
Set
SERPER_API_KEY in your shell or .env. GoogleSerperAPIWrapper reads it automatically — never hard-code the key.Reuse one wrapper instance
Reuse one wrapper instance
Create a single
GoogleSerperAPIWrapper() and pass it to the agent. It is cheaper than re-instantiating per call.Handle rate limits
Handle rate limits
Serper returns HTTP 429 when the plan quota is exceeded. Wrap the call in
try/except so the agent can degrade to another search tool.Related Tools
Serper
Google search API
Google Search
LangChain Google search
Serp Search
SerpAPI wrapper

