---
name: serpapi-search-tools
description: >
  Add live SerpApi search to Python agents and agent SDKs. Use when writing Python code that uses the serpapi_search_tools package.
license: MIT
compatibility: Requires Python >=3.10.
---

# serpapi-search-tools

Add live SerpApi search to Python agents and agent SDKs.

## Installation

```bash
pip install serpapi-search-tools
```

## API overview

### Enumerations and errors

Supported engines, response modes, semantic travel values, and search failures

- `WebSearchEngine`: General web indexes supported by :func:`web_search`
- `ShoppingSearchEngine`: Product indexes supported by :func:`shopping_search`
- `SearchResultMode`: Control how much of a SerpApi response is returned to the agent
- `TravelClass`: Cabin class shared by flight and travel-explore tools
- `SerpApiSearchError`: A sanitized failure raised while executing a search

### Functions

Create capability-specific search tools for Python and agent SDKs

- `web_search`: Create a general-web search tool
- `news_search`: Create a Google News query-mode tool for current articles and stories
- `maps_search`: Create a Google Maps search-mode tool for places and businesses
- `images_search`: Create a Google Images tool for image URLs and metadata
- `shopping_search`: Create a multi-marketplace product search tool
- `videos_search`: Create a YouTube tool for videos, channels, and playlists
- `hotels_search`: Create a Google Hotels tool with explicit stay dates
- `flights_search`: Create a Google Flights tool for one-way and round-trip routes
- `travel_explore_search`: Create a Google Travel Explore destination-discovery tool

## Resources

- [Full documentation](https://serpapi.github.io/serpapi-search-tools-python/)
- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
- [Source code](https://github.com/serpapi/serpapi-search-tools-python)
