返回顶部
s

serpshot Serpshot搜索

Use Serpshot Google Search API to perform web searches and image searches.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.0
安全检测
已通过
259
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

serpshot

技能:Serpshot Google 搜索 API

使用 Serpshot API 执行 Google 网页搜索和图片搜索。

使用时机

  • - 用户说:search / find / google / lookup / research / look up / browse
  • 用户说:查 / 搜 / 找 / 调研 / 查一下 / 搜索 / 查询 / 找一下 / 查资料
  • 需要训练数据中不包含的实时网络信息
  • 需要当前新闻、价格、文档或任何实时数据
  • 需要图片搜索结果

设置(仅需运行一次)

  1. 1. 获取 API 密钥:https://serpshot.com/dashboard
  2. 设置环境变量:
- Mac/Linux:export SERPSHOTAPIKEY=your_key - Windows CMD:set SERPSHOTAPIKEY=your_key - Windows PowerShell:$env:SERPSHOTAPIKEY=your_key

工具

  • - exec — 运行 Python 调用 Serpshot API

使用方法

网页搜索

python
import requests
import os

apikey = os.environ.get(SERPSHOTAPI_KEY)
if not api_key:
raise ValueError(SERPSHOTAPIKEY 未设置。请在 https://serpshot.com/dashboard 获取密钥)

response = requests.post(
https://api.serpshot.com/api/search/google,
headers={X-API-Key: api_key, Content-Type: application/json},
json={
queries: [在此输入搜索查询],
type: search,
num: 10, # 每页结果数(1-100)
gl: us, # 国家代码:us/cn/gb/jp/de/ca/fr/...
hl: en, # 语言:en/zh-Hans/ja/...
}
)

data = response.json()
if data.get(code) != 200:
raise RuntimeError(fAPI 错误 {data.get(code)}: {data.get(msg)})

for r in data[data][results]:
print(f{r[position]}. {r[title]})
print(f {r[link]})
print(f {r[snippet]})
print()

图片搜索

python
import requests
import os

apikey = os.environ.get(SERPSHOTAPI_KEY)

response = requests.post(
https://api.serpshot.com/api/search/google,
headers={X-API-Key: api_key, Content-Type: application/json},
json={
queries: [在此输入图片查询],
type: image,
num: 10,
gl: us,
}
)

data = response.json()
if data.get(code) != 200:
raise RuntimeError(fAPI 错误 {data.get(code)}: {data.get(msg)})

for r in data[data][results]:
print(f{r[position]}. {r[title]})
print(f 来源:{r.get(source, )})
print(f 链接:{r[link]})
print(f 缩略图:{r.get(thumbnail, )})
print()

参数

参数默认值描述
queries必填搜索查询数组(最多 100 个)
type
search | search 或 image | | num | 10 | 每页结果数(1-100) | | page | 1 | 分页页码 | | gl | us | 国家代码:us/cn/gb/jp/de/ca/fr/id/mx/sg | | hl | en | 语言:en/zh-Hans/ja/ko/de/fr/... |

响应格式

json
{
code: 200,
msg: 成功,
data: {
results: [
{
title: 结果标题,
link: https://example.com,
snippet: 结果描述...,
position: 1
}
],
total_results: 约 12,300,000 条结果,
search_time: 0.45,
credits_used: 1
}
}

示例任务

搜索最新 AI 新闻(英文)

queries: [AI news 2026]
gl: us
num: 5

搜索中文结果

queries: [人工智能 最新消息]
gl: cn
hl: zh-Hans
num: 10

图片搜索

queries: [minimalist UI design]
type: image
num: 10

错误代码

代码含义操作
400错误请求检查参数格式
401
API 密钥无效 | 验证 SERPSHOTAPIKEY 是否正确设置 | | 402 | 积分不足 | 前往 https://serpshot.com/dashboard 充值 | | 429 | 请求频率超限 | 降低请求速度 |

注意事项

  • - 每次搜索查询消耗 1 积分
  • 查看剩余积分:GET https://api.serpshot.com/api/credit/available-credits
  • 完整 API 文档:https://serpshot.com/docs

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 serpshot-1776155221 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 serpshot-1776155221 技能

通过命令行安装

skillhub install serpshot-1776155221

下载

⬇ 下载 serpshot v1.1.0(免费)

文件大小: 2.32 KB | 发布时间: 2026-4-15 13:06

v1.1.0 最新 2026-4-15 13:06
- Added structured front matter with name, description, version, license, and metadata.
- No functional code changes; documentation update only.
- Documentation now specifies required environment variable and API homepage/documentation links in metadata.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部