首页 开发文档 简历解析

简历解析

解析简历文本或照片:姓名联系方式、教育经历、工作经历与技能标签。text 与 image 至少传一个。上游处理较慢时,同步请求超过等待秒数会自动转为异步返回 task_id,可凭 task_id 调用任务查询接口获取最终结果,失败自动退款。

请求信息
请求地址 https://www.cx4.cn/openApi/ai/resume_parse 复制
请求方式 GET / POST
接口标识 resume_parse
鉴权方式 必须
四种方式任选其一:Header「X-Api-Key」/ Header「Authorization: Bearer 你的key」/ URL 参数「?key=你的key」/ POST 参数「key」
请求参数
参数名 类型 必填 说明 示例
text string 否 简历文本内容(与 image 二选一) 张三 13800138000…
image string 否 简历照片/扫描件,公网 URL 或 base64(与 text 二选一) https://example.com/resume.jpg
async int 否 是否异步:0 同步直接返回(默认);1 异步提交返回 task_id,结果走回调或任务查询 0
callback_url string 否 异步回调地址(仅 async=1 生效),公网 http(s);有结果时 POST,HMAC-SHA256 签名 https://example.com/cb
返回参数

下表字段位于返回结构的 data 内;外层 code / message 为全平台统一格式,不在此重复列出。

参数名 类型 说明 示例
name string 姓名 张三
phone string 电话 13800138000
email string 邮箱 zhangsan@example.com
education array 教育经历列表 [{"school":"某某大学","major":"计算机","degree":"本科","period":"2016-2020"}]
education[].school string 学校 某某大学
education[].major string 专业 计算机科学
education[].degree string 学历 本科
education[].period string 时间段 2016-2020
experience array 工作经历列表 [{"company":"某某科技","role":"后端工程师","period":"2020-2024","highlights":"主导支付系统重构"}]
experience[].company string 公司 某某科技
experience[].role string 职位 后端工程师
experience[].period string 时间段 2020-2024
experience[].highlights string 主要业绩 主导支付系统重构
skills array 技能标签 ["PHP","MySQL","Redis"]
task_id string 同步请求超过系统配置的等待秒数仍未完成时自动转为异步,返回任务 ID;凭此调用「任务查询」接口获取结果 20261120a1b2c3d4e5
status string 仅转为异步时返回,任务状态 pending(同步完成时本字段不出现,直接返回业务结果) pending
返回示例

成功

{
    "code": 200,
    "message": "操作成功",
    "data": {
        "name": "张三",
        "phone": "13800138000",
        "email": "zhangsan@example.com",
        "education": [
            {
                "school": "某某大学",
                "major": "计算机",
                "degree": "本科",
                "period": "2016-2020"
            }
        ],
        "experience": [
            {
                "company": "某某科技",
                "role": "后端",
                "period": "2020-2024",
                "highlights": "支付重构"
            }
        ],
        "skills": [
            "PHP"
        ]
    }
}

失败

{
    "code": 500,
    "message": "智能识别失败",
    "data": null
}
平台通用状态码
状态码 说明
200调用成功
400缺少必填参数或参数格式有误
401密钥缺失或无效
402余额不足,请充值后重试
403未开通该接口,请在本页开通后调用
404接口不存在或已下架
429触发限流,请稍后重试
500接口调用失败(已扣款的会自动退款)
调用示例

cURL 复制

curl -X POST "https://www.cx4.cn/openApi/ai/resume_parse" -H "X-Api-Key: 你的SecretKey" -d "text=张三 13800138000…&image=https://example.com/resume.jpg&async=0&callback_url=https://example.com/cb"

JavaScript 复制

fetch('https://www.cx4.cn/openApi/ai/resume_parse', {
  method: 'POST',
  headers: {
    'X-Api-Key': '你的SecretKey',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: 'text=张三 13800138000…&image=https://example.com/resume.jpg&async=0&callback_url=https://example.com/cb'
})
.then(res => res.json())
.then(data => console.log(data));

PHP 复制

<?php
require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();
$response = $client->post('https://www.cx4.cn/openApi/ai/resume_parse', [
    'headers' => ['X-Api-Key' => '你的SecretKey'],
    'form_params' => ['text' => '张三 13800138000…', 'image' => 'https://example.com/resume.jpg', 'async' => '0', 'callback_url' => 'https://example.com/cb'],
]);
echo $response->getBody();

Java 复制

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://www.cx4.cn/openApi/ai/resume_parse"))
    .header("X-Api-Key", "你的SecretKey")
    .header("Content-Type", "application/x-www-form-urlencoded")
    .POST(HttpRequest.BodyPublishers.ofString("text=张三 13800138000…&image=https://example.com/resume.jpg&async=0&callback_url=https://example.com/cb"))
    .build();
HttpResponse<String> response = client.send(
        request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());

Python 复制

import requests

res = requests.post('https://www.cx4.cn/openApi/ai/resume_parse',
    headers={'X-Api-Key': '你的SecretKey'},
    data={'text': '张三 13800138000…', 'image': 'https://example.com/resume.jpg', 'async': '0', 'callback_url': 'https://example.com/cb'})
print(res.json())
在线测试 (使用你的密钥真实调用,计费与正常调用一致)

登录后可在线测试: 立即登录

计费说明

¥0.3000

每次调用


每日免费额度:无

累计调用:0 次


快速上手

1. 注册并完成邮箱验证:立即注册

2. 登录后复制 Secret Key:去登录

3. 点击右侧「开通接口」按钮

4. 用下方「在线测试」一键体验,或复制下方示例代码直接调用