主题
按任务 ID 获取 Google Jobs 高级结果
接口说明
GET https://api.seermartech.cn/v3/serp/google/jobs/task_get/advanced/$id
根据任务 ID 获取 Google Jobs 高级搜索结果。任务提交成功后,可在 30 天重复获取结果;获取已提交任务的结果不额外收费,扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,为 UUID 格式。任务提交后 30 天可使用该 ID 获取结果。 |
例如:
text
/v3/serp/google/jobs/task_get/advanced/02261816-2027-0066-0000-c27d02864073> 任务结果通常在任务完成后可获取。建议客户端根据 status_code 和 status_message 实现错误处理及重试机制。
响应说明
接口返回 JSON 数据,顶层 tasks 数组。每个任务对象任务状态、请求参数及 Google Jobs 搜索结果。
如需查看该接口支持的 SERP素和字段,可使用沙盒地址:
text
https://sandbox.seermartech.cn/v3/serp/google/jobs/task_get/advanced/00000000-0000-0000-0000-000000000000沙盒数据为虚拟数据,不产生费用。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 请求 URL 路径。 |
data | object | POST 提交任务时使用的原始参数。 |
result | array | 搜索结果数组。 |
result 结果字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | POST 请求中的。返回时会对编码后的字符进行解码,+ 会被解码为空格。 |
type | string | POST 请求中的搜索引擎类型。 |
se_domain | string | POST 请求中的搜索引擎域名。 |
location_code | integer | POST 请求中的地区代码。 |
language_code | string | POST 请求中的语言代码。 |
check_url | string | 搜索结果页的直接 URL,可用于核验返回结果的准确性。 |
datetime | string | 获取结果的时间,采用 UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
spell | object | 搜索引擎自动纠错信息。如果搜索引擎对进行了纠错,则返回纠正后的及纠错类型;否则为 null。 |
refinement_chips | object | 搜索细化选项。 |
item_types | array | SERP 中的结果类型。本接口通常 google_jobs_item。 |
se_results_count | integer | SERP 中的结果总数。 |
items_count | integer | items 数组中返回的结果数量。 |
items | array | SERP 中的职位结果数组。 |
refinement_chips 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 refinement_chips。 |
xpath | string | 素在页面中的 XPath。 |
items | array | 搜索细化项数组。 |
options | array | 更多搜索细化选项。 |
refinement_chips.items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 refinement_chips_element。 |
title | string | 细化项标题。 |
url | string | 带细化参数的搜索 URL。 |
domain | string | 结果所在域名。 |
refinement_chips.options 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 refinement_chips_option。 |
title | string | 细化选项标题。 |
url | string | 带细化参数的搜索 URL。 |
domain | string | 结果所在域名。 |
items 职位结果字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 google_jobs_item。 |
rank_group | integer | 同类型中的组排名。不同类型之间不会影响该字段。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 素在 SERP 中的对齐位置,可取 left 或 right。 |
xpath | string | 素在页面中的 XPath。 |
job_id | string | Google Jobs 中的职位 ID。 |
title | string | 职位名称。 |
employer_name | string | 雇主名称。 |
employer_url | string | 雇主网站 URL。 |
employer_image_url | string | 职位信息中使用的雇主图片 URL。 |
location | string | 职位发布地点。 |
source_name | string | 职位信息的原始来源名称。 |
source_url | string | 职位信息的原始来源 URL。 |
salary | string | 职位中标注的薪资。未提供薪资时为 null。 |
contract_type | string | 用工或合同类型。 |
timestamp | string | 职位发布时间,采用 UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
time_ago | string | 职位发布距今的时间。 |
rectangle | object | 结果摘要区域的矩形参数,笛卡尔坐标及像素尺寸;当前通常为 null。 |
请求示例
cURL
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/serp/google/jobs/task_get/advanced/02261816-2027-0066-0000-c27d02864073" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02261816-2027-0066-0000-c27d02864073"
url = (
"https://api.seermartech.cn/v3/serp/google/jobs/"
f"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:
for task in data.get("tasks", []):
if task.get("status_code", 0) < 40000:
print(task.get("result", []))
else:
print(
f"任务错误:{task.get('status_code')} "
f"{task.get('status_message')}"
)
else:
print(
f"请求错误:{data.get('status_code')} "
f"{data.get('status_message')}"
)TypeScript
typescript
import axios from "axios";
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
axios
.get(
`https://api.seermartech.cn/v3/serp/google/jobs/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);
});响应示例
json
{
"version": "0.1.20220428",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0680 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "02261816-2027-0066-0000-c27d02864073",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0520 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"serp",
"google",
"jobs",
"task_get",
"advanced"
],
"data": {
"api": "serp",
"function": "task_get",
"se": "google",
"se_type": "jobs",
"keyword": ".net developer",
"language_code": "en",
"location_code": 2840,
"depth": 10,
"employment_type": null,
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": ".net developer",
"type": "jobs",
"se_domain": "google.com",
"location_code": 2840,
"language_code": "en",
"check_url": "https://www.google.com/search?q=.net+developer",
"datetime": "2022-06-08 08:44:32 +00:00",
"spell": null,
"refinement_chips": null,
"item_types": [
"google_jobs_item"
],
"se_results_count": 0,
"items_count": 2,
"items": [
{
"type": "google_jobs_item",
"rank_group": 1,
"rank_absolute": 1,
"position": "right",
"xpath": "/html/body/div/div/div/div/div/div/div/div/div/div/div/div/ul/li",
"job_id": "DfhOEnE2FFkAAAAAAAAAAA==",
"title": ".NET Developer (SR/SSR)",
"employer_name": "Upwork",
"employer_url": "http://www.elance.com/",
"employer_image_url": null,
"location": "United States",
"source_name": "via Upwork",
"source_url": "https://www.upwork.com/freelance-jobs/apply/NET-Developer-SSR_~015f52b11d62a99be1/",
"salary": null,
"contract_type": "Contractor",
"timestamp": "2022-06-07 21:44:32 +00:00",
"time_ago": "11 hours ago",
"rectangle": null
},
{
"type": "google_jobs_item",
"rank_group": 2,
"rank_absolute": 2,
"position": "right",
"xpath": "/html/body/div/div/div/div/div/div/div/div/div/div/div/div/ul/li",
"job_id": "RQeiSXggZy4AAAAAAAAAAA==",
"title": ".NET Developer/ Java Developer",
"employer_name": "People Tech Group Inc",
"employer_url": "http://peopletech.com/",
"employer_image_url": null,
"location": "United States",
"source_name": "via LinkedIn",
"source_url": "https://www.linkedin.com/jobs/view/net-developer-java-developer-at-people-tech-group-inc-3113958650",
"salary": null,
"contract_type": "Full–time",
"timestamp": "2022-06-07 18:44:32 +00:00",
"time_ago": "14 hours ago",
"rectangle": null
}
]
}
]
}
]
}状态码与异常处理
20000:请求成功。40000及以上:任务或请求处理失败,应结合status_message定位问题。- 当
tasks_error大于0时,应逐项检查tasks中的status_code和status_message。 - 当任务尚未完成或
result为空时,建议稍后重新请求;任务结果可在任务有效期重复获取。 - 响应码及说明请参考错误码文档。
实用场景
- 监测职位排名:定期获取目标对应的 Google Jobs 结果,评估招聘网站或职位页面的搜索表现。
- 分析竞争雇主分布:汇总
employer_name、location和contract_type,识别目标岗位的主要招聘企业、地区及用工形式。 - 追踪职位来源渠道:分析
source_name与source_url,比较不同招聘平台在 Google Jobs 中的覆盖和流量机会。 - 采集薪资与岗位趋势:提取
salary、timestamp和time_ago,建立岗位薪资及发布时间监测报表。 - 核验 SERP 抓取准确性:使用
check_url对搜索结果页,发现、地区、语言或设备参数导致的结果偏差。