主题
商家列表分类列表
GET /v3/business_data/business_listings/categories
接口说明
该接口用于获取商家列表 API 支持的分类单,并按商家数量返回热门分类。
你可以用它快速了解本接口支持的业务分类范围,例如哪些行业类别覆盖更多商家数据。接口响应为 JSON 格式,核心数据位于 tasks[].result 数组中。
- 请求方式:
GET - 接口路径:
/v3/business_data/business_listings/categories - 完整地址:
https://api.seermartech.cn/v3/business_data/business_listings/categories - 计费说明:调用该接口不收费
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准
如需离线处理分类数据,也可基于接口返回结果自行导出为 CSV。
请求
HTTP Request
bash
GET /v3/business_data/business_listings/categories请求头
| 名称 | 类型 | 填 | 说明 |
|---|---|---|---|
| Authorization | string | 是 | 认证信息,格式:Bearer smt_live_YOUR_KEY |
| Content-Type | string | 否 | 建议传 application/json |
请求参数
该接口为 GET 请求,无需请求体。
响应结构
顶层响应任务执行信息与结果数据。
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码 |
status_message | string | 通用状态信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次请求总费用,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
tasks[] 字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000 |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时,单位秒 |
cost | float | 该任务费用,单位 USD |
result_count | integer | result 数组中的数量 |
path | array | 请求路径 |
data | object | GET 请求 URL 中携带的参数信息 |
result | array | 分类结果数组 |
result[] 字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
category_name | string | 分类完整名称 |
business_count | integer | 该分类下的商家数量 |
状态码说明
- 顶层
status_code表示整个请求的处理状态 tasks[].status_code表示单个任务的执行状态- 完整错误码与通用信息请参考:
/v3/appendix/errors
请求示例
cURL
bash
curl --location --request GET "https://api.seermartech.cn/v3/business_data/business_listings/categories" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
url = "https://api.seermartech.cn/v3/business_data/business_listings/categories"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json
if data.get("status_code") == 20000:
print(data)
else:
print(f"error. Code: {data.get('status_code')} Message: {data.get('status_message')}")TypeScript
typescript
import axios from "axios";
// 获取商家列表分类单
axios({
method: "get",
url: "https://api.seermartech.cn/v3/business_data/business_listings/categories",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
})
.then((response) => {
// 返回结果
console.log(response.data);
})
.catch((error) => {
console.error(error);
});响应示例
以下示例为根据参考文档结构整理后的标准 JSON 形式。
json
{
"version": "0.1.20221214",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.7569 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "12345678-1234-1234-1234-1234567890ab",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1234 sec.",
"cost": 0,
"result_count": 2,
"path": [
"v3",
"business_data",
"business_listings",
"categories"
],
"data": {
"api": "business_data",
"function": "categories"
},
"result": [
{
"category_name": "Restaurants",
"business_count": 1250000
},
{
"category_name": "Hotels",
"business_count": 830000
}
]
}
]
}使用说明
该接口适合在正式调用商家列表数据前,同步分类字或建立行业分类映射。常见处理方式:
- 拉取分类列表;
- 按
business_count识别高覆盖行业; - 将
category_name映射到你的行业标签体系; - 在商家采集、竞争分析或本地 SEO 流程中作为筛选依据使用。
注意事项
- 该接口为只读查询接口,无需创建任务参数
- 不收费,但仍建议以响应中的
cost字段为准 - 返回的是平台支持的分类列表,不代表你后续查询时一定能在每个地区获得相同规模的数据
- 若需处理异常,请同时检查顶层
status_code与tasks[].status_code
实用场景
- 同步分类字:拉取最新商家分类列表,建立行业枚举表,便于后续查询参数标准化。
- 筛选高价值行业:根据
business_count找出商家量大的分类,优布局本地 SEO、地图采集或商机挖掘任务。 - 构建行业映射:把接口返回的
category_name映射到 CRM、广告投放或 BI 系统中的行业标签,减少人工对齐成本。 - 评估数据覆盖范围:在启动城市级或国家级商家研究前,查看分类支持,将资源到覆盖较弱的垂直行业。
- 优化采集优级:基于分类商家数量制定抓取顺序,优处理商家基数大的行业,提高数据产出效率。