AI 笔面助手/用户指南/Agent 开放 API 指南

Agent 开放 API 指南

API Key 创建方式、权限说明和常用接口示例。

Agent 开放 API 指南

开放 API 主要给 Cursor、本地脚本或其他 Agent 使用。先在官网创建 API Key,再把 key 填到 Agent 的环境变量或配置里即可。

基础信息

Base URL: https://www.gankinterview.cn/api
Authorization: Bearer gank_sk_live_xxx
Content-Type: application/json

API Key 以 gank_sk_live_ 开头。完整 key 只会在创建成功时显示一次,后面无法再次查看。

公开 API 按账号套餐限流:免费版和试用版 60 次/分钟,专业版 120 次/分钟,旗舰版 360 次/分钟。面试复盘这类消耗型接口还会继续检查对应套餐权益。

创建 API Key

API Key 在官网管理面板的账户设置里创建:

官网登录后 → 右上角用户菜单 → 管理面板 → 账户设置 → API Key

创建步骤:

  1. 打开官网并登录账号。
  2. 从右上角用户菜单进入“管理面板”。
  3. 打开“账户设置”,点击左侧的“API Key”。
  4. 点击“创建 Key”。
  5. 填写名称,例如 Cursor AgentLocal Sync Script
  6. 勾选需要的权限。建议只选当前 Agent 会用到的权限。
  7. 如有需要,设置过期时间。
  8. 点击“创建并显示 Key”。
  9. 复制弹窗里的完整 gank_sk_live_... key。

忘记复制完整 key 时,不能重新查看,只能吊销后再创建一个新的。

在同一个页面可以查看已创建的 key,也可以吊销不用的 key。

权限说明

Scope能力
resumes:read读取简历列表和详情
interviews:read读取面试/笔试记录
interviews:write上传本地面试/笔试文本记录
interviews:analyze生成面试复盘
recruitment:read读取投递进度
recruitment:write创建或更新投递进度
questions:read查询公共题库
questions:write收藏公共题到个人题库
campus:read查询校招岗位和资料

简历接口只开放读取,不支持通过开放 API 创建或修改简历。

常用接口

读取简历

curl "https://www.gankinterview.cn/api/v1/resumes?page=1&limit=20" \
  -H "Authorization: Bearer $GANK_API_KEY"
curl "https://www.gankinterview.cn/api/v1/resumes/<resume_id>" \
  -H "Authorization: Bearer $GANK_API_KEY"

读取面试记录

curl "https://www.gankinterview.cn/api/v1/interviews?type=interview&page=1&limit=20" \
  -H "Authorization: Bearer $GANK_API_KEY"

常用查询参数:

参数说明
typeinterviewexam
query按公司、岗位或转写文本搜索
page页码,默认 1
limit每页数量,默认 20,最大 100

上传本地面试记录

curl -X POST "https://www.gankinterview.cn/api/v1/interviews" \
  -H "Authorization: Bearer $GANK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "interview",
    "startTime": "2026-07-03T10:00:00.000Z",
    "endTime": "2026-07-03T10:45:00.000Z",
    "company": "Example Inc.",
    "position": "Frontend Engineer",
    "round": "一面",
    "transcript": "面试官:请介绍一下你做过的项目。\n候选人:..."
  }'

字段说明:

字段必填说明
transcript本地整理后的面试或笔试文本
typeinterviewexam,默认 interview
startTimeISO 8601 时间;不传则使用当前时间
endTimeISO 8601 时间;不传则等于 startTime
company公司名称
position岗位名称
round轮次,例如 一面HR 面
parentIdtype: "exam" 可用,用于关联到一条面试记录

生成面试复盘

curl -X POST "https://www.gankinterview.cn/api/v1/interviews/<record_id>/review" \
  -H "Authorization: Bearer $GANK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "includeRelatedExams": true,
    "language": "zh-CN",
    "techStack": "React, TypeScript, Next.js",
    "resumeText": "候选人简历摘要...",
    "jobDescription": "岗位 JD 摘要...",
    "reviewFocus": "重点评估项目表达、系统设计和追问应对"
  }'

投递进度

读取投递记录:

curl "https://www.gankinterview.cn/api/v1/recruitment-progress?page=1&limit=20" \
  -H "Authorization: Bearer $GANK_API_KEY"

创建投递记录:

curl -X POST "https://www.gankinterview.cn/api/v1/recruitment-progress" \
  -H "Authorization: Bearer $GANK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "companyName": "Example Inc.",
    "positionText": "Frontend Engineer",
    "applyUrl": "https://example.com/jobs/123",
    "progressStage": "投递",
    "progressStatus": "等待",
    "note": "由 Agent 根据本地求职表格同步"
  }'

更新投递记录:

curl -X PATCH "https://www.gankinterview.cn/api/v1/recruitment-progress/<record_id>" \
  -H "Authorization: Bearer $GANK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "progressStage": "面试",
    "progressStatus": "已约时间",
    "progressAt": "2026-07-03T12:00:00.000Z"
  }'

题库

查询公共题库:

curl "https://www.gankinterview.cn/api/v1/question-bank/questions?q=React&pageSize=20" \
  -H "Authorization: Bearer $GANK_API_KEY"

收藏题目:

curl -X POST "https://www.gankinterview.cn/api/v1/question-bank/questions/<question_id>/save" \
  -H "Authorization: Bearer $GANK_API_KEY"

校招岗位和资料

查询校招岗位:

curl "https://www.gankinterview.cn/api/v1/campus?q=前端&updatedAfter=2026-07-01T00:00:00.000Z&pageSize=20" \
  -H "Authorization: Bearer $GANK_API_KEY"

常用参数:qcompanyindustrytypetargetlocationupdatedAfterpagepageSizeupdatedAfter 使用 ISO 8601 时间,返回该时间及之后更新的岗位。

查询岗位详情:

curl "https://www.gankinterview.cn/api/v1/campus/<posting_id>" \
  -H "Authorization: Bearer $GANK_API_KEY"

查询校招资料:

curl "https://www.gankinterview.cn/api/v1/campus-resources?q=笔试&pageSize=20" \
  -H "Authorization: Bearer $GANK_API_KEY"

常见错误

状态码含义
401API Key 缺失、错误、过期或已吊销
403当前 key 没有所需权限
429请求过快,稍后重试
404要读取或更新的记录不存在