home / skills / shuliuzhenhua-sys / google-serper-search / google-serper-search
This skill helps you perform web and image searches using the Google Serper API to obtain current information and visuals.
npx playbooks add skill shuliuzhenhua-sys/google-serper-search --skill google-serper-searchReview the files below or copy the command above to add this skill to your agents.
---
name: google-serper-search
description: This skill should be used when the user asks to "search the web", "search for information", "find information online", "search Google", "search for images", "find pictures", or requests any web search or image search functionality.
---
# Google Serper Search
This skill enables you to search the web and find images using the Serper API.
## When to Use This Skill
Use this skill when the user:
- Asks to search for information online
- Needs current/recent information not in your knowledge base
- Requests to find images or pictures
- Wants to verify facts or get latest updates
- Asks questions that require web search
## How to Use
### Web Search
When the user needs web search, first `cd` into the skill directory, then run:
```bash
SERPER_API_KEY=$(moltbot config get google.serper_api_key) python3 scripts/serper_search.py "search query" web
```
Alternatively, if the key is already in your environment, just run:
```bash
python3 scripts/serper_search.py "search query" web
```
The script returns JSON with:
- `knowledgeGraph`: Key facts about the topic
- `organic`: Search results with title, link, and snippet
- `peopleAlsoAsk`: Related questions
- `relatedSearches`: Related search terms
### Image Search
When the user needs images, first `cd` into the skill directory, then run:
```bash
SERPER_API_KEY=$(moltbot config get google.serper_api_key) python3 scripts/serper_search.py "search query" images
```
Returns JSON with image URLs, thumbnails, dimensions, and sources.
## Response Format
After getting search results:
1. Parse the JSON response
2. Present results in a clear, organized format
3. Include relevant links and sources
4. For images, describe what was found and provide image URLs
## Example Usage
User: "Search for the latest news about AI"
You: Use Bash tool to run the search script, then format and present the results.
User: "Find pictures of mountains"
You: Use Bash tool to run image search, then present the image URLs and descriptions.
This skill lets you search the web and find images using the Serper API. It provides structured JSON results for web queries (knowledge graph, organic results, related searches) and image searches (image URLs, thumbnails, dimensions, sources). Use it to fetch current or recent information and to retrieve images with source links.
The skill runs a Python script that calls the Serper API with your query and search type (web or images). It returns a JSON payload containing key facts, ranked organic results, related questions, and image metadata. After receiving results, parse the JSON, extract relevant links and snippets, and present them in a clear, organized format with sources.
Do I need an API key to use this skill?
Yes. The Serper API key must be provided via environment variable before running the search script.
What formats are returned?
The skill returns structured JSON: knowledgeGraph, organic results, peopleAlsoAsk, relatedSearches for web; image URLs, thumbnails, dimensions, and sources for images.