360 Secure SkillHub
360 安全技能中心

Google Serper Search

该 Skill 通过 python3 脚本调用 Serper API 完成网页、图片、新闻等多种类型搜索,支持按国家、语言和时间范围过滤,返回含知识图谱、自然结果、相关问题与图片链接的 JSON,再由模型格式化呈现给用户。

twodogegg
twodogegg
热度 79.33
最近更新 2026-05-11 17:30:28
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add google-serper-search
Metadata
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

Advanced Search

You can now use advanced parameters to filter results.

python3 scripts/serper_search.py "query" --type news --gl us --hl en --tbs "past week"

Parameters:

  • Type (--type): search, images, videos, places, maps, reviews, news, shopping, lens, scholar, patents, autocomplete.
  • Country (--gl): 2-letter country code (e.g., us, cn, jp, gb).
  • Language (--hl): Google language code (e.g., en, zh-cn, zh-tw, ja).
  • Date range (--tbs): past hour, past 24 hours, past week, past month, past year.

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, run:

python3 scripts/serper_search.py "search query" --type 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.