主题
Sandbox 测试环境
概述
Sandbox 是面向开发的技术测试环境,可用于在不产生调用费用的联调本平台 API。它适合在开发、集成、字段映射、响应解析和回调验证阶段使用。
Sandbox 返回的是模拟数据,但响应结构、字段名称、层级与正式环境保持一致。这意味着你可以在不消耗正式额的前提下,完成大部分接口联调工作。
计费说明
Sandbox 端点使用,注册用户调用不会产生费用。
- 参考价约 ¥0.0000 / 次
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准
基本调用方式
text
POST https://api.seermartech.cn/v3/$path动态字段说明
| 字段 | 说明 |
|---|---|
path | 要测试的 API 路径 |
| 示例 | /v3/serp/google/maps/task_post 中路径部分可对应端点 |
说明:Sandbox 的核心用法是切换到沙箱域名,余请求参数与正式环境保持一致,无需调整请求体结构。
Sandbox 的用途与限制
主要用途
Sandbox 的主要价值是帮助你完成以下工作:
-置软件与本平台 API 的对接逻辑
- 在不消耗正式费用的验证请求参数
- 检查返回字段结构与解析代码是否正确
- 测试
pingback_url与postback_url回调流程
响应特点
Sandbox 中的所有结果均为示例数据 / dummy data。请注意:
- 数据不代表真实采集结果
- 字段结构与正式接口一致
- 适合测试解析逻辑,不适合业务分析或正式生产使用
频率限制
Sandbox 与正式环境使用相同的限流规则:
- 每分钟最多可发送 2000 次 API 调用
- 每次
POST请求最多 100 个任务
对于 live 方法:
- 每分钟同样最多 2000 次调用
- 但每次
POST请求可 1 个任务
认证方式
Sandbox 调用时,认证方式与正式环境一致。
请求头示例
http
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json请求体格式
所有 POST 请求体均使用 JSON 数组格式:
json
[
{
"language_name": "English",
"location_name": "United States",
"keyword": "iphone"
}
]SERP API 如何使用 Sandbox
要测试 SERP API,只需将请求 URL 的主机名切换为 Sandbox 域名余代码与请求参数无需变更。
创建任务
text
https://api.seermartech.cn/v3/serp/google/organic/task_post获取结果
text
https://api.seermartech.cn/v3/serp/google/organic/task_get/advanced/$id查看 SERP素的示例结构
如果你想查看 Google Organic SERP Advanced 端点下所有可用 SERP feature 和扩展的结构,可请求以下地址:
text
https://api.seermartech.cn/v3/serp/google/organic/task_get/advanced/00000000-0000-0000-0000-000000000000该响应会返回完整的字段结构,但字段值均为模拟数据。
Keywords Data API 如何使用 Sandbox
对任意 Keywords Data API 端点,使用方式相同:需切换请求主机名。
创建任务
text
https://api.seermartech.cn/v3/keywords_data/google/search_volume/task_post获取示例结果
text
https://api.seermartech.cn/v3/keywords_data/google/search_volume/task_get/$idDomain Analytics API 如何使用 Sandbox
对任意 Domain Analytics API 端点,调用方式同样只需更换主机名。
示例端点
text
https://api.seermartech.cn/v3/domain_analytics/technologies/aggregation_technologies/live由于 Domain Analytics API 端点均采用 live 方式返回数据,因此无需额外发起 GET 请求获取结果。
本平台 Labs API 如何使用 Sandbox
对 /v3/dataforseo_labs/ 下任意端点,使用方式一致。
示例端点
text
https://api.seermartech.cn/v3/dataforseo_labs/google/related_keywords/live由于该类端点均为 live 返回,因此无需单独获取结果。
Backlinks API 如何使用 Sandbox
对任意 Backlinks API 端点,只需切换请求主机名。
示例端点
text
https://api.seermartech.cn/v3/backlinks/referring_domains/liveBacklinks API 端点采用 live 返回结果,因此无需额外 GET。
OnPage API 如何使用 Sandbox
对任意 OnPage API 端点,创建任务,再使用对应接口获取示例结果。
创建任务
text
https://api.seermartech.cn/v3/on_page/task_post获取示例结果
text
https://api.seermartech.cn/v3/on_page/pages
https://api.seermartech.cn/v3/on_page/links说明:OnPage API 在 Sandbox 中获取结果时,仍需按对应结果接口再次发起请求。
Content Analysis API 如何使用 Sandbox
调用任意 Content Analysis API 端点时,直接切换主机名即可,接口会返回示例结果。
示例端点
text
https://api.seermartech.cn/v3/content_analysis/search/liveMerchant API 如何使用 Sandbox
对任意 Merchant API 端点,创建任务,再通过 GET 获取示例结果。
创建任务
text
https://api.seermartech.cn/v3/merchant/google/products/task_post获取示例结果
text
https://api.seermartech.cn/v3/merchant/google/products/task_get/advanced/$idApp Data API 如何使用 Sandbox
对任意 App Data API 端点,创建任务,再通过 GET 获取示例结果。
创建任务
text
https://api.seermartech.cn/v3/app_data/google/app_searches/task_post获取示例结果
text
https://api.seermartech.cn/v3/app_data/google/app_searches/task_get/advanced/$idBusiness Data API 如何使用 Sandbox
对任意 Business Data API 端点,创建任务,再通过 GET 获取示例结果。
创建任务
text
https://api.seermartech.cn/v3/business_data/google/hotel_info/task_post获取示例结果
text
https://api.seermartech.cn/v3/business_data/google/hotel_info/task_get/advanced/$idLive 任务的 Sandbox 测试
Sandbox 也支持各类 API 的 live 任务测试。如果你要测试实时返回模式,可直接请求对应 live 端点。
示例地址
text
https://api.seermartech.cn/v3/keywords_data/google/search_volume/live
https://api.seermartech.cn/v3/serp/google/organic/live/regular
https://api.seermartech.cn/v3/dataforseo_labs/google/ranked_keywords/live
https://api.seermartech.cn/v3/dataforseo_labs/google/related_keywords/live
https://api.seermartech.cn/v3/dataforseo_labs/google/competitors_domain/live
https://api.seermartech.cn/v3/backlinks/referring_domains/live代码示例
cURL
bash
curl --request POST "https://api.seermartech.cn/v3/keywords_data/google/search_volume/task_post" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data '[
{
"location_name": "United States",
"language_name": "English",
"keywords": ["iphone"]
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/google/search_volume/task_post"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
# POST 请求体为 JSON 数组
payload = [
{
"location_name": "United States",
"language_name": "English",
"keywords": ["iphone"]
}
]
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.text)TypeScript
typescript
const url = "https://api.seermartech.cn/v3/keywords_data/google/search_volume/task_post";
const payload = [
{
location_name: "United States",
language_name: "English",
keywords: ["iphone"],
},
];
async function requestSandbox {
const response = await fetch(url, {
method: "POST",
headers: {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
const data = await response.json;
console.log(data);
}
requestSandbox;注意事项
- Sandbox 用于开发测试,不提供真实业务数据
- 返回字段结构与正式环境一致,适合做解析和容性验证
- 所有支持回调的接口,Sandbox 中同样可测试
pingback_url与postback_url - 限流规则与正式环境一致,上线前可据此验证请求节流策略
live方法每次请求 1 个任务;普通POST请求每次最多 100 个任务
实用场景
- 联调任务提交流程:在 Sandbox 验证
task_post、task_get、live等调用链路,降低正式环境调试成本。 - 验证字段解析器:用模拟响应检查 JSON 解析、字段映射、数据库库逻辑,生产环境字段容问题。
- 测试回调机制:
pingback_url或postback_url,验证异步任务回调通知是否能被业务系统正确接收。 - 预演限流与批处理策略:与正式环境一致的频率限制进行压测,验证每分钟调用量与批量任务拆分逻辑。
- 查看复杂响应结构:通过固定示例 ID 获取完整 SERP素结构,提前适富结果、扩展模块及特殊字段。