微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🔍

真实 Google 搜索结果一键获取

serper-search · v1.0.0
搜索与信息检索 安全 A 级 榜单 #9 作者 samoppakiks 公开目录收录
2.7k 下载 2 安装 6.3k 收藏 8 浏览

简介

通过 Serper.dev API 获取真实 Google 搜索结果,包括网页、新闻和知识图谱,适合需要原始搜索数据的场景。

原始描述

Fetches real Google search or news results with links, snippets, knowledge graph data, and related questions via the Serper.dev API.

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/serper-search/
其它 Agent解压到它自己的 skills 目录,目录名用 serper-search

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

技能正文


name: serper-search description: Search the public web through Serper instead of the built-in WebSearch tool. Use when an agent needs current information, general web sources, or URLs not available from local files and project APIs. SERPER_API_KEY is available in the environment.

Serper Search

Use Serper whenever external web search is needed. Prefer local files and project APIs when they already contain the required information.

Rules

  • Do not use the built-in WebSearch tool.
  • Do not expose the API key in answers, logs, committed fixtures, or browser/client code.
  • Prefer authoritative and primary sources in the returned results.
  • Refine the query when freshness, date, company, product, or source type matters.

API

  • Endpoint: POST https://google.serper.dev/search
  • Auth header: X-API-KEY: $SERPER_API_KEY
  • Content type: application/json
  • Required body: {"q":"query text"}

Curl

curl -s --location "https://google.serper.dev/search" \
  --header "X-API-KEY: $SERPER_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"q":"apple inc"}'

Response Use

  • Prefer organic results for normal search answers.
  • Use searchParameters to confirm the query actually sent.
  • Treat credits as usage accounting.
  • Verify important claims against the linked source rather than treating snippets as complete evidence.
  • Summarize results with source titles and links; do not copy large passages from snippets or pages.

Failure Handling

  1. If DNS/network fails, report it as an environment/network issue and retry only when external network is available.
  2. If authentication fails, report that SERPER_API_KEY is missing or invalid without printing its value.
  3. If results are irrelevant, refine the query with names, dates, locations, or source domains.

正文来自原始仓库, 版权归作者所有,许可:Apache-2.0。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/agentscope-ai/ReMe

标签

google-searchweb-searchnews-searchapi-integrationserperknowledge-graphclawdbot-plugin

同类 Skill