SuperAPI AI 工具集

serpapi

编程与开发

查看项目

更新于 10-15 23:43

技能介绍

用途:通过 SerpAPI 访问实时 Google 搜索结果,数据新鲜度高(默认不缓存),适合追踪最新 LLM 版本、技术趋势与竞品调研。

主要能力:以 curl 调用 https://serpapi.com/search。参数包括 q(必填)、type(search/news/images/videos)、engine(google/bing/yahoo/duckduckgo)、google_domain、gl 国家、hl 语言、num 结果数(默认 10)、start 分页、safe、filter、tbm(isch 图片、vid 视频、nws 新闻)、tbs 高级操作符。新闻可按时间过滤:tbs=qdr:h/d/w/m/y 或 cdr:1,cd_min:日期,cd_max:日期;也可用 ift:pdf、site:、精确短语、排除词、OR。响应含 search_metadata、search_parameters、search_information、organic_results、answer_box、people_also_ask、knowledge_graph 等。

使用方式:API 凭据存于 ~/.clawdbot/serpapi-config.json,格式为 {"apiKey": "your_serpapi_key_here"}。基础命令:curl -s "https://serpapi.com/search?q={query}&api_key={apiKey}&type=search"。资料提供四个辅助脚本(search.sh、search_news_24h.sh、search_ja.sh、search_llm.sh),位于 ~/.openclaw/workspace/skills/serpapi/scripts/,均以 jq 读取 apiKey 并解析 organic_results。

适用场景:LLM/库版本核实、API 价格与变更日志查询、技术报错排查、AI 行业与融资新闻、日语搜索(gl=jp&hl=ja&google_domain=google.co.jp)、竞品调研。

限制:资料提及免费计划每月 100 次搜索,付费计划限额更高,需以自身 SerpAPI 计划为准;仅给出 curl/jq 用法,未提供官方 SDK 说明。与 Brave Search API 相比,SerpAPI 基于 Google 索引、隐私为标准 Google 级别,两者可互补。