查看网页标题、链接、摘要和排名。
curl "https://api.serqo.io/v1/search" \
-H "Authorization: Bearer $SERP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "espresso machines",
"engine": "google",
"type": "web",
"gl": "us",
"hl": "en"
}' {
"success": true,
"requestId": "req_example",
"data": {
"engine": "google",
"results": [
{
"position": 1,
"type": "organic",
"title": "Example espresso machine guide",
"url": "https://example.com/espresso",
"snippet": "A guide to choosing an espresso machine."
}
]
}
} 200 OK
查看新闻标题、链接、来源和日期。
curl "https://api.serqo.io/v1/search" \
-H "Authorization: Bearer $SERP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "renewable energy",
"engine": "google",
"type": "news",
"gl": "us",
"hl": "en"
}' {
"success": true,
"requestId": "req_example",
"data": {
"engine": "google",
"results": [
{
"position": 1,
"type": "news",
"title": "Example energy news report",
"url": "https://example.com/energy-news",
"source": "Example News",
"date": "2 hours ago"
}
]
}
} 200 OK
查看图片标题及来源网页链接。
curl "https://api.serqo.io/v1/search" \
-H "Authorization: Bearer $SERP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "espresso machine",
"engine": "google",
"type": "images",
"gl": "us",
"hl": "en"
}' {
"success": true,
"requestId": "req_example",
"data": {
"engine": "google",
"features": {
"images": [
{
"position": 1,
"title": "Example espresso machine",
"link": "https://example.com/espresso-photo",
"source": "example.com"
}
]
}
}
} 200 OK
查看地点、商家及评分等信息。
curl "https://api.serqo.io/v1/search" \
-H "Authorization: Bearer $SERP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "coffee near shibuya",
"engine": "google",
"type": "maps",
"gl": "jp",
"hl": "en"
}' {
"success": true,
"requestId": "req_example",
"data": {
"engine": "google",
"results": [
{
"title": "Example cafe",
"type": "local",
"rating": 4.6
}
]
}
} 200 OK
简化示例,数值仅作说明
发送首次搜索请求
创建免费账户
注册即获 100 点额度,无需信用卡。
试一次查询
在 Playground 选择引擎和搜索类型,运行查询并查看结果。
创建 API key
将 API key 保存到 SERP_API_KEY 环境变量,运行上方请求示例。
套餐与额度
Free免费试用
$0
使用免费账户试用 API。
- · 注册赠送 100 积分
- · 可调用 Google 和 Bing 支持的搜索类型
- · 每秒 1 次请求
- · 可使用 Playground
Starter
$15 / 月
适合个人项目和初次接入,提供稳定的月度额度和更宽松的请求上限。
- · 每月 7,500 点额度
- · 可调用 Google 和 Bing 支持的搜索类型
- · 每秒 50 次请求
- · 当期未用完的额度累积保留
Pro
$49 / 月
适合已有稳定搜索流量的应用,提供更多月度额度和更高的请求上限。
- · 每月 25,000 点额度
- · 可调用 Google 和 Bing 支持的搜索类型
- · 每秒 100 次请求
- · 当期未用完的额度累积保留
Scale
$299 / 月
适合高调用量服务,提供更大的月度额度和最高的请求上限。
- · 每月 250,000 点额度
- · 可调用 Google 和 Bing 支持的搜索类型
- · 每秒 200 次请求
- · 当期未用完的额度累积保留
常见问题
搜索结果包含哪些内容?
网页结果包含标题、链接、摘要和排名。其他搜索类型返回对应内容,例如图片链接或地点评分。
什么时候消耗额度?
成功搜索消耗额度,具体消耗取决于搜索类型、引擎、国家和缓存状态。搜索失败或超时不扣额度。
额度用完后会怎样?
可用额度不足以支付本次请求时,查询不会执行。
需要安装 SDK 吗?
不需要,可使用任意 HTTP 客户端。文档也提供 JavaScript 和 Python 示例。