主题
按任务 ID 获取 Google 应用搜索结果(高级版)
本接口使用 GET 方法,通过以下路径获取指定任务的 Google Play 应用搜索结果:
GET https://api.seermartech.cn/v3/app_data/google/app_searches/task_get/advanced/$id
任务结果与创建任务时提交的、地区和语言参数对应。本接口返回 Google Play 中与指定的应用排名,以及应用 ID、图标、评论数、评分、价格、开发等信息。
本平台会尽可能准确地模拟指定参数下的搜索环境,使返回结果接近任务创建时的搜索结果。你可以访问响应中的 check_url,并使用浏览器隐身模式核验结果。
> 用户偏好、搜索历史及个性化因素不会纳结果。
计费说明
- 在创建任务时产生费用。
- 任务创建后的 30 天,可以调用本接口获取结果。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。 - Sandbox 测试请求不产生费用。
请求参数
本接口通过 URL 路径传任务 ID,无请求体。
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。任务创建成功后获得,可在 30 天用于查询任务结果。 |
请求示例
cURL
bash
id="04011058-0696-0199-0000-2196151a15cb"
curl --location --request GET \
"https://api.seermartech.cn/v3/app_data/google/app_searches/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"PHP
php
<?php
require('RestClient.php');
$api_url = 'https://api.seermartech.cn/';
$api_key = 'smt_live_YOUR_KEY';
$client = new RestClient($api_url, null, null, null, [
'Authorization: Bearer ' . $api_key,
'Content-Type: application/json'
]);
try {
$id = '06141103-2692-0309-1000-980b778b6d25';
// 通过任务 ID 获取任务结果
$result = $client->get(
'/v3/app_data/google/app_searches/task_get/advanced/' . $id
);
print_r($result);
} catch (RestClientException $e) {
echo "HTTP 状态码: {$e->getHttpCode()}\n";
echo "错误码: {$e->getCode()}\n";
echo "错误信息: {$e->getMessage()}\n";
}TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/app_data/google/app_searches/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/google/app_searches/task_get/advanced/"
+ task_id
)
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
data = response.json()
if data.get("status_code") == 20000:
print(data)
else:
print(
"请求失败,错误码:{},错误信息:{}".format(
data.get("status_code"),
data.get("status_message"),
)
)C#
csharp
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace SeerMarTechDemos
{
public static class Demos
{
public static async Task GetGoogleAppSearchResults()
{
using var httpClient = new HttpClient
{
BaseAddress = new Uri("https://api.seermartech.cn/")
};
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Bearer",
"smt_live_YOUR_KEY"
);
string taskId = "06141103-2692-0309-1000-980b778b6d25";
var response = await httpClient.GetAsync(
"/v3/app_data/google/app_searches/task_get/advanced/" + taskId
);
var body = await response.Content.ReadAsStringAsync();
dynamic result = JsonConvert.DeserializeObject(body);
if (result.tasks != null)
{
var task = result.tasks[0];
if (task.status_code >= 40000 || task.result == null)
{
Console.WriteLine(
$"错误码:{task.status_code},错误信息:{task.status_message}"
);
}
else
{
Console.WriteLine(body);
}
}
else
{
Console.WriteLine(
$"错误码:{result.status_code},错误信息:{result.status_message}"
);
}
}
}
}Sandbox
可以使用以下 Sandbox 地址查看该接口支持的完整字段结构:
text
https://sandbox.seermartech.cn/v3/app_data/google/app_searches/task_get/advanced/00000000-0000-0000-0000-000000000000Sandbox 响应会 Google App Searches Advanced 接口的可用字段,并使用模拟数据填。Sandbox 请求不会产生费用。
响应结构
接口返回 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 | 请求路径信息。 |
data | object | 创建任务时提交的参数。 |
result | array | 搜索结果数组。 |
tasks[].data
data 对象创建任务时提交的参数,例如:
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索结果类型,例如 organic。 |
se | string | 搜索引擎,例如 google。 |
api | string | API 类型,例如 app_data。 |
function | string | 功能名称,例如 app_searches。 |
keyword | string | 搜索。 |
location_code | integer | 地区代码。 |
language_code | string | 语言代码。 |
depth | integer | 结果抓取深度。 |
device | string | 设备类型,例如 desktop。 |
os | string | 操作系统,例如 windows。 |
tasks[].result
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | 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。示例:2019-11-15 12:57:46 +00:00。 |
se_results_count | integer | 搜索引擎返回的结果总数。 |
items_count | integer | items 数组中的应用数量。 |
items | array | 找到的应用列表。 |
items 应用字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 结果项类型。目前可能为 google_play_search_organic。 |
rank_group | integer | 同一 type 分组的排名。不同类型结果之间不会计算此排名。 |
rank_absolute | integer | 应用在结果中的绝对排名。 |
position | string | 结果在搜索结果页中的对齐位置。目前可能为 left。 |
app_id | string | 应用 ID。 |
title | string | 应用名称。 |
url | string | Google Play 应用页 URL。 |
icon | string | 应用图标 URL。 |
reviews_count | integer | 应用累计评论数。 |
rating | object | 应用平均评分。 |
is_free | boolean | 是否为应用。 |
price | object | 应用价格信息。 |
developer | string | 应用开发名称。 |
developer_url | string | Google Play 开发页面 URL。 |
items[].rating
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,目前为 Max5。 |
value | float | 当前平均评分。 |
votes_count | integer / null | 反馈数量。对于此类结果通常为 null。 |
rating_max | integer | 评分上限。Max5 类型的上限为 5。 |
items[].price
| 字段 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格。 |
regular | float | 常规价格。 |
max_value | float | 最高价格。 |
currency | string | 价格币种,使用 ISO 币种代码。 |
is_price_range | boolean | 是否以价格区间形式展示。 |
displayed_price | string | 搜索结果中展示的原始价格字符串。 |
响应示例
json
{
"version": "0.1.20220428",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0887 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04011058-0696-0199-0000-2196151a15cb",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0456 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"app_data",
"google",
"app_searches",
"task_get",
"advanced"
],
"data": {
"se_type": "organic",
"se": "google",
"api": "app_data",
"function": "app_searches",
"keyword": "vpn",
"location_code": 2840,
"language_code": "en",
"depth": 200,
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "vpn",
"se_domain": "play.google.com",
"location_code": 2840,
"language_code": "en",
"check_url": "https://play.google.com/store/search?q=vpn&c=apps",
"datetime": "2019-11-15 12:57:46 +00:00",
"se_results_count": 200,
"items_count": 1,
"items": [
{
"type": "google_play_search_organic",
"rank_group": 1,
"rank_absolute": 1,
"position": "left",
"app_id": "com.example.vpn",
"title": "VPN App",
"url": "https://play.google.com/store/apps/details?id=com.example.vpn",
"icon": "https://example.com/icon.png",
"reviews_count": 125000,
"rating": {
"rating_type": "Max5",
"value": 4.5,
"votes_count": null,
"rating_max": 5
},
"is_free": true,
"price": {
"current": 0,
"regular": 0,
"max_value": 0,
"currency": "USD",
"is_price_range": false,
"displayed_price": "Free"
},
"developer": "Example Developer",
"developer_url": "https://play.google.com/store/apps/developer?id=Example"
}
]
}
]
}
]
}状态码与错误处理
建议同时检查以下状态字段:
- 顶层
status_code:判断整个请求是否成功。 tasks[].status_code:判断任务是否成功。status_message或tasks[].status_message:获取对应的状态说明。- 当任务状态码表示错误,或
result为空时,应记录错误信息并执行重试、告警或人工处理。
实用场景
- 监控下的应用排名:定期查询目标的 Google Play 搜索结果,评估应用自然和排名变化。
- 对比竞品应用表现:采集竞品的评分、评论数、价格和开发信息,为竞品分析和产品定位提供依据。
- 分析不同地区的应用可见性:按地区代码和语言分别查询搜索结果,识别应用在不同市场的排名差异。
- 跟踪应用商店优化效果:在更新应用标题、图标或商店描述后,对比排名变化,验证 ASO 优化成效。
- 构建应用市场数据看板:整合应用排名、评分、评论量及价格字段,持续生成应用市场监测报表。