serpapi by vm0-ai/vm0-skills
npx skills add https://github.com/vm0-ai/vm0-skills --skill serpapi通过直接调用 curl 来使用 SerpApi,以抓取搜索引擎结果,支持 Google、Bing、YouTube 等。
官方文档:
https://serpapi.com/search-api
在以下场景中使用此技能:
SERPAPI_TOKEN 中export SERPAPI_TOKEN="your-api-key"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
api_key 传递以下所有示例均假设您已设置 SERPAPI_TOKEN。
基础 URL:https://serpapi.com/search
搜索 Google 并获取结构化的 JSON 结果:
curl -s "https://serpapi.com/search?engine=google&q=artificial+intelligence&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results[:3] | .[] | {title, link, snippet}'
从特定地理位置进行搜索:
curl -s "https://serpapi.com/search?engine=google&q=best+coffee+shops&location=San+Francisco,+California&gl=us&hl=en&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results[:3]'
参数:
location:城市、州或地址gl:国家代码(us、uk、de 等)hl:语言代码(en、de、fr 等)搜索图片:
curl -s "https://serpapi.com/search?engine=google_images&q=sunset+beach&api_key=$(printenv SERPAPI_TOKEN)" | jq '.images_results[:3] | .[] | {title, original, thumbnail}'
搜索新闻文章:
curl -s "https://serpapi.com/search?engine=google_news&q=technology&api_key=$(printenv SERPAPI_TOKEN)" | jq '.news_results[:3] | .[] | {title, link, source, date}'
搜索产品:
curl -s "https://serpapi.com/search?engine=google_shopping&q=wireless+headphones&api_key=$(printenv SERPAPI_TOKEN)" | jq '.shopping_results[:3] | .[] | {title, price, source}'
搜索 YouTube 视频:
curl -s "https://serpapi.com/search?engine=youtube&search_query=python+tutorial&api_key=$(printenv SERPAPI_TOKEN)" | jq '.video_results[:3] | .[] | {title, link, channel, views}'
搜索本地商家:
curl -s "https://serpapi.com/search?engine=google_maps&q=restaurants&ll=@40.7128,-74.0060,15z&api_key=$(printenv SERPAPI_TOKEN)" | jq '.local_results[:3] | .[] | {title, rating, address}'
如果在 Google 地图中使用 location,请包含 z 或 m:
curl -s "https://serpapi.com/search?engine=google_maps&q=3PL&location=Dallas-Fort+Worth,+Texas&z=14&api_key=$(printenv SERPAPI_TOKEN)"
防御性的本地结果提取:
curl -s "https://serpapi.com/search?engine=google_maps&q=3PL&ll=@32.7767,-96.7970,14z&api_key=$(printenv SERPAPI_TOKEN)" \
| jq 'if has("error") then .error else (.local_results[:5] | map({title,address,phone,website,link,type})) end'
参数:
ll:纬度、经度和缩放级别(例如 @40.7128,-74.0060,15z)使用 start 参数获取更多结果:
# 第一页(结果 1-10)
curl -s "https://serpapi.com/search?engine=google&q=machine+learning&start=0&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results | length'
# 第二页(结果 11-20)
curl -s "https://serpapi.com/search?engine=google&q=machine+learning&start=10&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results | length'
检查您的 API 使用情况和额度:
curl -s "https://serpapi.com/account?api_key=$(printenv SERPAPI_TOKEN)" | jq '{plan_name, searches_per_month, this_month_usage}'
| 搜索引擎 | 参数 | 描述 |
|---|---|---|
| Google 搜索 | engine=google | 网页搜索结果 |
| Google 图片 | engine=google_images | 图片搜索 |
| Google 新闻 | engine=google_news | 新闻文章 |
| Google 购物 | engine=google_shopping | 产品搜索 |
| Google 地图 | engine=google_maps | 本地商家 |
| YouTube | engine=youtube | 视频搜索 |
| Bing | engine=bing | Bing 网页搜索 |
| DuckDuckGo | engine=duckduckgo | 注重隐私的搜索 |
| 参数 | 描述 |
|---|---|
q | 搜索查询(必需) |
engine | 使用的搜索引擎 |
location | 搜索的地理位置 |
gl | 国家代码(例如 us、uk) |
hl | 语言代码(例如 en、de) |
start | 分页偏移量(0、10、20...) |
num | 结果数量(最多 100) |
safe | 安全搜索(active 或 off) |
device | 设备类型(desktop、mobile、tablet) |
google_images、google_news 等,而不是 tbm 参数,以获得更清晰的结果location 和 gl 获取地理定位结果no_cache=true 获取最新数据/account 端点以跟踪 API 额度每周安装量
194
代码仓库
GitHub 星标数
48
首次出现
2026年1月24日
安全审计
安装于
codex167
gemini-cli159
opencode158
github-copilot153
cursor153
amp150
Use SerpApi via direct curl calls to scrape search engine results from Google, Bing, YouTube, and more.
Official docs:
https://serpapi.com/search-api
Use this skill when you need to:
SERPAPI_TOKENexport SERPAPI_TOKEN="your-api-key"
api_keyAll examples below assume you have SERPAPI_TOKEN set.
Base URL: https://serpapi.com/search
Search Google and get structured JSON results:
curl -s "https://serpapi.com/search?engine=google&q=artificial+intelligence&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results[:3] | .[] | {title, link, snippet}'
Search from a specific location:
curl -s "https://serpapi.com/search?engine=google&q=best+coffee+shops&location=San+Francisco,+California&gl=us&hl=en&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results[:3]'
Parameters:
location: City, state, or addressgl: Country code (us, uk, de, etc.)hl: Language code (en, de, fr, etc.)Search for images:
curl -s "https://serpapi.com/search?engine=google_images&q=sunset+beach&api_key=$(printenv SERPAPI_TOKEN)" | jq '.images_results[:3] | .[] | {title, original, thumbnail}'
Search news articles:
curl -s "https://serpapi.com/search?engine=google_news&q=technology&api_key=$(printenv SERPAPI_TOKEN)" | jq '.news_results[:3] | .[] | {title, link, source, date}'
Search products:
curl -s "https://serpapi.com/search?engine=google_shopping&q=wireless+headphones&api_key=$(printenv SERPAPI_TOKEN)" | jq '.shopping_results[:3] | .[] | {title, price, source}'
Search YouTube videos:
curl -s "https://serpapi.com/search?engine=youtube&search_query=python+tutorial&api_key=$(printenv SERPAPI_TOKEN)" | jq '.video_results[:3] | .[] | {title, link, channel, views}'
Search local businesses:
curl -s "https://serpapi.com/search?engine=google_maps&q=restaurants&ll=@40.7128,-74.0060,15z&api_key=$(printenv SERPAPI_TOKEN)" | jq '.local_results[:3] | .[] | {title, rating, address}'
If using location with Google Maps, include z or m:
curl -s "https://serpapi.com/search?engine=google_maps&q=3PL&location=Dallas-Fort+Worth,+Texas&z=14&api_key=$(printenv SERPAPI_TOKEN)"
Defensive local-results extraction:
curl -s "https://serpapi.com/search?engine=google_maps&q=3PL&ll=@32.7767,-96.7970,14z&api_key=$(printenv SERPAPI_TOKEN)" \
| jq 'if has("error") then .error else (.local_results[:5] | map({title,address,phone,website,link,type})) end'
Parameters:
ll: Latitude, longitude, and zoom level (e.g., @40.7128,-74.0060,15z)Get more results using the start parameter:
# First page (results 1-10)
curl -s "https://serpapi.com/search?engine=google&q=machine+learning&start=0&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results | length'
# Second page (results 11-20)
curl -s "https://serpapi.com/search?engine=google&q=machine+learning&start=10&api_key=$(printenv SERPAPI_TOKEN)" | jq '.organic_results | length'
Check your API usage and credits:
curl -s "https://serpapi.com/account?api_key=$(printenv SERPAPI_TOKEN)" | jq '{plan_name, searches_per_month, this_month_usage}'
| Engine | Parameter | Description |
|---|---|---|
| Google Search | engine=google | Web search results |
| Google Images | engine=google_images | Image search |
| Google News | engine=google_news | News articles |
| Google Shopping | engine=google_shopping | Product search |
| Google Maps | engine=google_maps |
| Parameter | Description |
|---|---|
q | Search query (required) |
engine | Search engine to use |
location | Geographic location for search |
gl | Country code (e.g., us, uk) |
hl | Language code (e.g., en, de) |
start | Pagination offset (0, 10, 20...) |
google_images, google_news etc. instead of tbm parameter for cleaner resultslocation and gl for geo-targeted resultsno_cache=true for fresh data/account endpoint to track API creditsWeekly Installs
194
Repository
GitHub Stars
48
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex167
gemini-cli159
opencode158
github-copilot153
cursor153
amp150
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
49,900 周安装
SpecStory 历史文件整理工具 - 按时间戳自动归档会话文件,保持项目目录整洁
101 周安装
OMC Doctor:Claude代码助手安装诊断与修复工具 - 解决OMC插件问题
101 周安装
微信文章转Markdown工具 - 高效抓取公众号文章并转换为Markdown格式,支持存档与AI处理
101 周安装
Go语言技术文档编写指南 - 专业API设计与文档生成技能
101 周安装
Mermaid图表专家技能 - 专业流程图、序列图、甘特图代码生成与可视化指南
101 周安装
销售自动化工具 - 冷邮件序列、跟进计划、话术模板与A/B测试完整指南
101 周安装
| Local businesses |
| YouTube | engine=youtube | Video search |
| Bing | engine=bing | Bing web search |
| DuckDuckGo | engine=duckduckgo | Privacy-focused search |
num| Number of results (max 100) |
safe | Safe search (active or off) |
device | Device type (desktop, mobile, tablet) |