serpapi-search

TotalClaw 作者 totalclaw

使用 SerpAPI 和可定制引擎(Google、Google AI Mode、Bing 等)搜索网络。当用户需要通过 SerpAPI 进行网络搜索结果时使用。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~lsl001006-web-search-with-serpapi
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~lsl001006-web-search-with-serpapi/file -o lsl001006-web-search-with-serpapi.md
# SerpAPI Search Skill

## Description
Use SerpAPI to fetch search results with support for multiple engines (Google, Google AI Mode, Bing, Yahoo, etc.). Requires a SerpAPI key.

## Parameters
- `query` (required): Search query string.
- `engine` (optional): Search engine (default: `google`). Options: `google`, `google_ai_mode`, `google_images`, `google_maps`, `youtube`

## Example Usage
```python
# Search with Google
serpapi_search(query="2026年2月24日A股市场表现", engine="google")

# Use Google AI Mode
serpapi_search(query="AI最新进展", engine="google_ai_mode")

# Use Google Image for image search
serpapi_search(query="Sunflowers", engine="google_images")
```

## Setup
1. Replace the API key in `serpapi_search.py` with your SerpAPI key.
2. Install dependencies: `pip install serpapi`

## Notes
- Results are returned as text blocks from SerpAPI response.
- API key can be set via environment variable `SERPAPI_API_KEY` for security.