主题
按任务 ID 获取 Apple App 评论结果(高级版)
本接口使用 GET 方法,通过任务 ID 获取 Apple App Store 应用评论结果。
接口路径:
GET https://api.seermartech.cn/v3/app_data/apple/app_reviews/task_get/advanced/$id
该接口返回 App Store 应用的评论数据评分、评论、评论资料、评论发布时间等。结果与创建任务时指定的 app_id、地区和语言参数对应。
任务完成后,可在 30 天获取结果。扣费发生在创建任务时,扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
请求参数通过 URL 路径传递。
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。任务创建成功后获得,可在 30 天重复用于获取任务结果。 |
请求示例
cURL
bash
id="04011058-0696-0199-0000-2196151a15cb"
curl --location --request GET \
"https://api.seermartech.cn/v3/app_data/apple/app_reviews/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/app_data/apple/app_reviews/task_get/advanced/${taskId}`,
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
})
.then((response) => {
// 处理接口返回结果
console.log(response.data);
})
.catch((error) => {
console.error("请求失败:", error.response?.data || error.message);
});Python
python
import requests
task_id = "06141103-2692-0309-1000-980b778b6d25"
url = (
"https://api.seermartech.cn/v3/app_data/apple/app_reviews/"
f"task_get/advanced/{task_id}"
)
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
if response.ok:
result = response.json()
print(result)
else:
print(f"请求失败:HTTP {response.status_code}")
print(response.text)响应说明
接口返回 JSON 对象 tasks 数组任务结果。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。20000 表示请求成功。 |
status_message | string | 通用状态信息。 |
time | string | 接口执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
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 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的结果数量。 |
path | array | 当前请求的 API 路径。 |
data | object | 创建任务时提交的参数。 |
result | array | 任务结果数组。 |
data 字段
data含创建任务时提交的参数,例如:
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索类型,例如 reviews。 |
se | string | 数据来源,例如 apple。 |
api | string | API 模块名称,例如 app_data。 |
function | string | 功能名称,例如 app_reviews。 |
app_id | string | App Store 应用 ID。 |
location_code | integer | 地区代码。 |
language_code | string | 语言代码。 |
depth | integer | 获取评论的深度。创建任务时提高该值可获取更多评论。 |
device | string | 设备类型。 |
os | string | 操作系统类型。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
app_id | string | 创建任务时提交的应用 ID。 |
type | string | 创建任务时指定的搜索引擎类型。 |
se_domain | string | 创建任务时指定的搜索引擎域名。 |
location_code | integer | 创建任务时提交的地区代码。 |
language_code | string | 创建任务时提交的语言代码。 |
check_url | string | 对应搜索结果的直接 URL,可用于核验结果准确性。 |
datetime | string | 获取结果的日期和时间,使用 UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
title | string | 应用名称。 |
rating | object | 应用总体评分。 |
reviews_count | integer | null | 应用评论总数。由于 App Store 不提供该总数,此字段通常为 null。 |
items_count | integer | 当前结果中返回的评论数量。 |
items | array | 评论明细数组。 |
result.rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可为 Max5、Percents 或 CustomMax。 |
value | float | 基于评论计算的应用平均评分。 |
votes_count | integer | 评分票数。 |
rating_max | integer | 当前评分类型的最大值。 |
result.items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 评论类型,目前可能为 app_store_reviews_search。 |
rank_group | integer | 同一 type 评论中的组排名。不同类型之间不会计算此排名。 |
rank_absolute | integer | 评论在评论列表中的绝对排名。 |
position | string | 评论在结果页中的位置,目前可能为 left。 |
version | string | 提交评论时对应的应用版本。 |
rating | object | 评论提交的评分。 |
timestamp | string | 评论发布时间,使用 UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
id | string | 评论 ID。 |
title | string | 评论标题。 |
review_text | string | 评论正文。 |
user_profile | object | 评论用户资料。 |
items.rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,目前为 Max5。 |
value | float | 评论提交的评分值。 |
votes_count | null | 反馈数量。此场景下通常为 null。 |
rating_max | integer | 评分最大值。Max5 类型的最大值为 5。 |
items.user_profile 字段
| 字段 | 类型 | 说明 |
|---|---|---|
profile_name | string | 评论名称。 |
profile_image_url | string | 评论头像 URL。 |
响应示例
json
{
"version": "0.1.20230705",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1315 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04011058-0696-0199-0000-2196151a15cb",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1000 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"app_data",
"apple",
"app_reviews",
"task_get",
"advanced",
"04011058-0696-0199-0000-2196151a15cb"
],
"data": {
"se_type": "reviews",
"se": "apple",
"api": "app_data",
"function": "app_reviews",
"app_id": "835599320",
"location_code": 2840,
"language_code": "en",
"depth": 200,
"device": "desktop",
"os": "windows"
},
"result": [
{
"app_id": "835599320",
"type": "reviews",
"se_domain": "apps.apple.com",
"location_code": 2840,
"language_code": "en",
"check_url": "https://apps.apple.com/us/app/id835599320",
"datetime": "2019-11-15 12:57:46 +00:00",
"title": "示例应用",
"rating": {
"rating_type": "Max5",
"value": 4.5,
"votes_count": 1200,
"rating_max": 5
},
"reviews_count": null,
"items_count": 1,
"items": [
{
"type": "app_store_reviews_search",
"rank_group": 1,
"rank_absolute": 1,
"position": "left",
"version": "1.2.3",
"rating": {
"rating_type": "Max5",
"value": 5,
"votes_count": null,
"rating_max": 5
},
"timestamp": "2019-11-15 12:57:46 +00:00",
"id": "review-example-id",
"title": "非常好用",
"review_text": "应用体验流,功能实用。",
"user_profile": {
"profile_name": "示例用户",
"profile_image_url": "https://example.com/profile.jpg"
}
}
]
}
]
}
]
}状态码与错误处理
建议根据顶层 status_code 以及任务级别的 tasks[].status_code 判断请求是否成功:
20000:请求或任务执行成功。40000及以上:通常表示任务处理失败或发生错误。- 当
tasks[].result为空,或任务状态码不是成功状态时,应结合status_message记录并处理异常。
使用时,请为网络异常、任务不存在、任务过期和结果为空等设计重试或错误处理逻辑。
实用场景
- 采集竞品应用评论与评分,对比产品口碑、用户满意度和版本表现,为竞品分析提供结构化依据。
- 监控应用版本评论变化,评论发布时间与应用版本,定位新版本上线后的体验问题。
- 提取用户反馈,分析
review_text和评论标题,发现功能需求、障线索及用户点。 - 构建应用市场舆看板,汇总评分、评论数量和评论信息,持续跟踪应用口碑趋势。
- 筛选低评分评论,根据评论评分和文本建立问题工单优级,支持产品优化与客户运营。