openapi: 3.0.3 info: title: 'yingxiaochaoren Developer API' description: '开放 API V2,覆盖身份认证、GEO 监测层级与执行数据、商品卡、财务、Google 搜索表现及项目站点诊断。' version: 1.0.0 servers: - url: 'https://www.yingxiaochaoren.com' tags: - name: 'V2 1. 认证管理' description: '' - name: 'V2 2. 项目管理' description: '' - name: 'V2 3. 监测任务创建与查询' description: '' - name: 'V2 4. 平台任务与每日执行' description: '' - name: 'V2 5. 单个 Prompt 执行数据' description: '' - name: 'V2 6. 兼容接口(旧字段)' description: '' - name: 'V2 7. 财务管理' description: '' - name: 'V2 8. 项目站点诊断' description: '' - name: 'V2 9. 搜索表现' description: '' components: securitySchemes: default: type: http scheme: bearer description: '推荐在个人中心 → API Keys创建长期密钥,请求头添加 Authorization: Bearer YOUR_API_KEY。完整密钥仅创建时展示一次,删除后立即失效。也可调用登录接口获取有效期 24 小时的 access_token。' security: - default: [] paths: /api/v2/auth/login: post: summary: 'API 登录获取 Token' operationId: aPIToken description: "用户通过邮箱和密码登录,获取 API 访问令牌\n也可在个人中心 → API Keys 创建多个访问密钥,使用相同的 Bearer 认证。\n登录令牌有效期为 24 小时;个人中心创建的 API Key 长期有效,可在管理页删除并立即撤销。" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 登录成功 data: token: 1|abc123def456... token_type: Bearer user: id: 1 name: 张三 email: user@example.com properties: success: type: boolean example: true message: type: string example: 登录成功 data: type: object properties: token: type: string example: 1|abc123def456... token_type: type: string example: Bearer user: type: object properties: id: type: integer example: 1 name: type: string example: 张三 email: type: string example: user@example.com 401: description: '' content: application/json: schema: type: object example: success: false message: 邮箱或密码错误 properties: success: type: boolean example: false message: type: string example: 邮箱或密码错误 tags: - 'V2 1. 认证管理' requestBody: required: true content: application/json: schema: type: object properties: email: type: string description: 用户邮箱. example: user@example.com password: type: string description: 用户密码. example: password123 required: - email - password security: [] /api/v2/auth/user: get: summary: 获取当前用户信息 operationId: '' description: 获取当前认证用户的详细信息 parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: id: 1 name: 张三 email: user@example.com uuid: abc123-def456 last_login_time: '2024-01-15 10:30:00' amount: 1000.0 block_reason: null created_at: '2024-01-01 00:00:00' properties: success: type: boolean example: true data: type: object properties: id: type: integer example: 1 name: type: string example: 张三 email: type: string example: user@example.com uuid: type: string example: abc123-def456 last_login_time: type: string example: '2024-01-15 10:30:00' amount: type: number example: 1000.0 block_reason: type: string example: null created_at: type: string example: '2024-01-01 00:00:00' tags: - 'V2 1. 认证管理' /api/v2/auth/logout: post: summary: 'API 登出' operationId: aPI description: '撤销当前使用的 API 访问令牌' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 登出成功 properties: success: type: boolean example: true message: type: string example: 登出成功 tags: - 'V2 1. 认证管理' /api/v2/projects: get: summary: '1. 查询我的项目' operationId: '1' description: "接入第一步先检查是否已有项目。project_id 是站点项目 ID,创建监测任务时传入 my_project_id。\n只返回当前账户的项目,不包含其他用户或已删除项目。默认项目仅在实际创建后出现,is_default=true。" parameters: - in: query name: page description: '页码,从 1 开始.' example: 1 required: false schema: type: integer description: '页码,从 1 开始.' example: 1 - in: query name: per_page description: 每页数量,1–100. example: 20 required: false schema: type: integer description: 每页数量,1–100. example: 20 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - project_id: 2048 site_name: 耐克官网 site_domain: 'https://www.nike.com' is_default: false created_at: '2026-10-24T10:00:00+08:00' total: 1 per_page: 20 last_page: 1 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - project_id: 2048 site_name: 耐克官网 site_domain: 'https://www.nike.com' is_default: false created_at: '2026-10-24T10:00:00+08:00' items: type: object properties: project_id: type: integer example: 2048 site_name: type: string example: 耐克官网 site_domain: type: string example: 'https://www.nike.com' is_default: type: boolean example: false created_at: type: string example: '2026-10-24T10:00:00+08:00' total: type: integer example: 1 per_page: type: integer example: 20 last_page: type: integer example: 1 tags: - 'V2 2. 项目管理' post: summary: '2. 创建项目' operationId: '2' description: "正常顺序:先创建项目,保存返回的 data.project_id,再选择平台并创建监测任务。\n本接口只创建项目,不会生成监测任务、平台任务或 Prompt。已有项目可直接复用其 ID。\n未指定项目的监测任务会自动归入当前用户独立的“默认项目”;默认项目可容纳无网站的监测,site_domain 为空。" parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: success: true message: 项目创建成功 data: project_id: 2048 site_name: 耐克官网 site_domain: 'https://www.nike.com' is_default: false created_at: '2026-10-24T10:00:00+08:00' properties: success: type: boolean example: true message: type: string example: 项目创建成功 data: type: object properties: project_id: type: integer example: 2048 site_name: type: string example: 耐克官网 site_domain: type: string example: 'https://www.nike.com' is_default: type: boolean example: false created_at: type: string example: '2026-10-24T10:00:00+08:00' 422: description: '' content: application/json: schema: type: object example: message: '该网站已经创建过项目,请使用已有项目 ID。' errors: site_domain: - '该网站已经创建过项目,请使用已有项目 ID。' properties: message: type: string example: '该网站已经创建过项目,请使用已有项目 ID。' errors: type: object properties: site_domain: type: array example: - '该网站已经创建过项目,请使用已有项目 ID。' items: type: string tags: - 'V2 2. 项目管理' requestBody: required: true content: application/json: schema: type: object properties: site_name: type: string description: '项目名称,最多 120 字符;不填时从域名提取.' example: 耐克官网 nullable: true site_domain: type: string description: '网站域名或 HTTP/HTTPS URL,保留子目录;裸域名自动补充 https://.' example: 'https://www.nike.com' required: - site_domain '/api/v2/projects/{project_id}': get: summary: '3. 获取项目详情' operationId: '3' description: "project_id 为上一步创建或查询项目得到的站点项目 ID。\n下一步用同一 ID 作为 customer_id 查询 /geo/customer/projects,获取这个项目下的监测任务。" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: project_id: 2048 site_name: 耐克官网 site_domain: 'https://www.nike.com' is_default: false created_at: '2026-10-24T10:00:00+08:00' properties: success: type: boolean example: true data: type: object properties: project_id: type: integer example: 2048 site_name: type: string example: 耐克官网 site_domain: type: string example: 'https://www.nike.com' is_default: type: boolean example: false created_at: type: string example: '2026-10-24T10:00:00+08:00' 404: description: '' content: application/json: schema: type: object example: message: 项目不存在或无权限访问 properties: message: type: string example: 项目不存在或无权限访问 tags: - 'V2 2. 项目管理' parameters: - in: path name: project_id description: '站点项目 ID.' example: 2048 required: true schema: type: integer /api/v2/geo/platforms: get: summary: '1. 查询可选择的 AI 平台' operationId: 1AI description: "创建监测任务之前调用,以当前系统配置返回的 key 为准,不要硬编码平台清单。\n将选中的多个 key 用英文逗号拼成 ai_platform 传给 /geo/project/create。\n每个不同的 key 生成一个平台任务:选择 3 个平台,得到同一监测任务下的 3 个平台任务。" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: - key: deepseek label: DeepSeek - key: doubao label: 豆包 - key: qwen_app label: '千问 App' properties: success: type: boolean example: true data: type: array example: - key: deepseek label: DeepSeek - key: doubao label: 豆包 - key: qwen_app label: '千问 App' items: type: object properties: key: type: string example: deepseek label: type: string example: DeepSeek tags: - 'V2 3. 监测任务创建与查询' /api/v2/geo/project/create: post: summary: '2. 创建监测任务(自动生成平台任务)' operationId: '2' description: "先调用 POST /api/v2/projects 创建项目(或 GET /api/v2/projects 复用已有项目),\n再调用 GET /api/v2/geo/platforms 选择平台。将项目的 data.project_id 作为 my_project_id 传入本接口。\n不传或传 null 时自动创建/复用当前用户的“默认项目”;传入不存在、已删除或无权限的 ID 返回 404,不会回退默认项目。\n\n一次请求创建 1 个监测任务 number_id,并按去重后的 ai_platform 创建 N 个平台任务。\n例如选择 3 个平台、填写 2 个 Prompt:生成 3 个平台任务,每个平台各 2 条当天 Prompt 执行,共 6 条。\nnumber_id 作为 /geo/project/tasks 的 project_id;platform_tasks[].task_id 用于 /geo/task/prompts 和 /geo/task/results。\n查询刚创建的执行时请显式传创建响应中的 execution_date(今天);每日查询接口不传 date 时默认昨天。\n创建仅表示任务已保存并排队,回答异步生成,result_status=missing 时稍后重试;创建和执行沿用账户权限与计费。" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 监测任务创建成功 data: my_project_id: 2048 customer_id: 2048 is_default_project: false number_id: 1791973046 project_name: 耐克 project_ids: - 9300 - 9301 - 9302 platform_tasks: - task_id: 9300 engine: deepseek - task_id: 9301 engine: doubao - task_id: 9302 engine: qwen_app execution_date: '2026-10-24' properties: success: type: boolean example: true message: type: string example: 监测任务创建成功 data: type: object properties: my_project_id: type: integer example: 2048 customer_id: type: integer example: 2048 is_default_project: type: boolean example: false number_id: type: integer example: 1791973046 project_name: type: string example: 耐克 project_ids: type: array example: - 9300 - 9301 - 9302 items: type: integer platform_tasks: type: array example: - task_id: 9300 engine: deepseek - task_id: 9301 engine: doubao - task_id: 9302 engine: qwen_app items: type: object properties: task_id: type: integer example: 9300 engine: type: string example: deepseek execution_date: type: string example: '2026-10-24' 400: description: '' content: application/json: schema: type: object example: success: false message: 请至少选择一个监测平台 properties: success: type: boolean example: false message: type: string example: 请至少选择一个监测平台 404: description: '' content: application/json: schema: type: object example: message: 项目不存在或无权限访问 properties: message: type: string example: 项目不存在或无权限访问 tags: - 'V2 3. 监测任务创建与查询' requestBody: required: true content: application/json: schema: type: object properties: my_project_id: type: integer description: '站点项目 ID,取 POST /projects 或 GET /projects 返回的 project_id;建议显式传入,不传/null 自动归入默认项目.' example: 2048 nullable: true brand: type: string description: 监测任务名称/品牌名称. example: 耐克 brand_desc: type: string description: 品牌列表,使用英文逗号分隔. example: '耐克,阿迪达斯,彪马' diy_prompt: type: string description: 监测问题列表,使用英文逗号分隔;每个平台均执行所有问题. example: '推荐运动鞋品牌,哪个运动品牌好' ai_platform: type: string description: '平台 key 列表,使用英文逗号分隔;先从 GET /geo/platforms 获取,重复 key 自动去重.' example: 'deepseek,doubao,qwen_app' week_restart: type: integer description: 监测频次:0=每天,1=每周,2=本次,3=重查. example: 0 only_rank: type: integer description: 仅排名监测:0=否,1=是. example: 0 rank_match: type: integer description: 排名精确匹配:0=否,1=是. example: 0 brand_url: type: string description: '可选品牌相关 URL,英文逗号分隔.' example: 'https://www.nike.com' email_address: type: string description: 可选通知邮箱,英文逗号分隔. example: developer@example.com required: - brand - brand_desc - diy_prompt - ai_platform /api/v2/geo/customer/projects: get: summary: '3. 查询项目下的监测任务列表' operationId: '3' description: "先通过 POST /api/v2/projects 创建项目或 GET /api/v2/projects 查询项目,再传返回的站点 project_id 作为 customer_id。响应中的 project_id 则表示监测任务 number_id(兼容字段名)。\n本接口列出该项目下的监测任务,不是账号项目目录。接下来用返回的 project_id 调用 /geo/project/tasks,取得平台 task_id。" parameters: - in: query name: customer_id description: '站点项目 ID,取 POST /projects 或 GET /projects 返回的 project_id;创建监测任务响应 customer_id 也可使用.' example: 2048 required: true schema: type: integer description: '站点项目 ID,取 POST /projects 或 GET /projects 返回的 project_id;创建监测任务响应 customer_id 也可使用.' example: 2048 - in: query name: page description: '页码,从 1 开始.' example: 1 required: false schema: type: integer description: '页码,从 1 开始.' example: 1 - in: query name: per_page description: '每页监测任务数,1–100,默认 20.' example: 20 required: false schema: type: integer description: '每页监测任务数,1–100,默认 20.' example: 20 - in: query name: status description: 监测任务状态,-3=全部(默认),-2=欠费暂停,-1=暂停,0=待执行,1=进行中,2=完成. example: -3 required: false schema: type: integer description: 监测任务状态,-3=全部(默认),-2=欠费暂停,-1=暂停,0=待执行,1=进行中,2=完成. example: -3 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - customer_id: 2048 project_id: 1791973046 project_name: 示例品牌 brand_cate_desc: 运动鞋 brand_desc_list: 示例品牌 status: 1 status_name: 进行中 created_at: '2026-09-21 10:00:00' task_count: 2 prompts: - 推荐运动鞋 total: 1 per_page: 20 last_page: 1 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - customer_id: 2048 project_id: 1791973046 project_name: 示例品牌 brand_cate_desc: 运动鞋 brand_desc_list: 示例品牌 status: 1 status_name: 进行中 created_at: '2026-09-21 10:00:00' task_count: 2 prompts: - 推荐运动鞋 items: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 project_name: type: string example: 示例品牌 brand_cate_desc: type: string example: 运动鞋 brand_desc_list: type: string example: 示例品牌 status: type: integer example: 1 status_name: type: string example: 进行中 created_at: type: string example: '2026-09-21 10:00:00' task_count: type: integer example: 2 prompts: type: array example: - 推荐运动鞋 items: type: string total: type: integer example: 1 per_page: type: integer example: 20 last_page: type: integer example: 1 tags: - 'V2 3. 监测任务创建与查询' /api/v2/geo/project/edit: post: summary: '4. 编辑监测任务' operationId: '4' description: "更新现有 GEO 监测任务的配置信息,包括品牌列表、prompt、监测类型等\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n本接口不修改所属项目;新增的平台任务继续归属原项目。ai_platform 和 diy_prompt 是完整配置,移除的平台会停止并软删除其任务,请先读取详情再更新。" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 项目更新成功 properties: success: type: boolean example: true message: type: string example: 项目更新成功 400: description: '' content: application/json: schema: type: object example: success: false message: 请至少选择一个监测平台 properties: success: type: boolean example: false message: type: string example: 请至少选择一个监测平台 tags: - 'V2 3. 监测任务创建与查询' requestBody: required: true content: application/json: schema: type: object properties: number_id: type: integer description: '监测任务 ID(number_id).' example: 1702888800 brand_desc: type: string description: 品牌列表,使用逗号分隔. example: '"耐克,阿迪达斯,彪马"' ai_platform: type: string description: 选择的AI监测平台,使用逗号分隔. example: '"deepseek,doubao,yuanbao"' diy_prompt: type: string description: 自定义监测Prompt,使用逗号分隔. example: '"推荐运动鞋品牌,哪个运动品牌好"' week_restart: type: integer description: 监测频次:0=每天,1=每周,2=本次,3=重查. example: 0 only_rank: type: integer description: 仅排名监测:0=否,1=是. example: 0 rank_match: type: integer description: 排名精确匹配:0=否,1=是. example: 0 required: - number_id - brand_desc - ai_platform - diy_prompt /api/v2/geo/project/tasks: get: summary: 获取监测任务下的全部平台任务 operationId: '' description: "一个项目有多个监测任务,一个监测任务有多个平台任务。project_id 取创建监测任务返回的 number_id,或监测任务列表返回的 project_id;task_id 是平台任务 ID。选择了 3 个不同平台就会返回 3 条平台任务。\n建议同时携带 customer_id(页面项目 ID),限定所属项目。data 是完整数组,不分页。" parameters: - in: query name: project_id description: '监测任务 ID,取监测任务列表的 project_id(网页 number_id);不是页面项目 ID.' example: 1791973046 required: true schema: type: integer description: '监测任务 ID,取监测任务列表的 project_id(网页 number_id);不是页面项目 ID.' example: 1791973046 - in: query name: customer_id description: '可选项目 ID,对应网页 /geo_projects/current/ 后的 ID,用于限定监测任务所属项目.' example: 2048 required: false schema: type: integer description: '可选项目 ID,对应网页 /geo_projects/current/ 后的 ID,用于限定监测任务所属项目.' example: 2048 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: - customer_id: 2048 project_id: 1791973046 task_id: 9300 task_name: 示例品牌 model_key: deepseek model_name: DeepSeek engine: deepseek status: 1 status_name: 进行中 properties: success: type: boolean example: true data: type: array example: - customer_id: 2048 project_id: 1791973046 task_id: 9300 task_name: 示例品牌 model_key: deepseek model_name: DeepSeek engine: deepseek status: 1 status_name: 进行中 items: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 task_name: type: string example: 示例品牌 model_key: type: string example: deepseek model_name: type: string example: DeepSeek engine: type: string example: deepseek status: type: integer example: 1 status_name: type: string example: 进行中 404: description: '' content: application/json: schema: type: object example: message: 项目不存在或无权限访问 properties: message: type: string example: 项目不存在或无权限访问 tags: - 'V2 4. 平台任务与每日执行' /api/v2/geo/task/info: get: summary: 获取一个平台监测任务的详情 operationId: '' description: '返回平台任务配置;customer_id 是页面项目 ID,project_id 是监测任务 ID(number_id),task_id 是平台任务 ID。' parameters: - in: query name: task_id description: '平台监测任务 ID,取 /geo/project/tasks 的 task_id.' example: 9300 required: true schema: type: integer description: '平台监测任务 ID,取 /geo/project/tasks 的 task_id.' example: 9300 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: customer_id: 2048 project_id: 1791973046 task_id: 9300 task_name: 示例品牌 model_key: deepseek model_name: DeepSeek engine: deepseek status: 1 status_name: 进行中 properties: success: type: boolean example: true data: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 task_name: type: string example: 示例品牌 model_key: type: string example: deepseek model_name: type: string example: DeepSeek engine: type: string example: deepseek status: type: integer example: 1 status_name: type: string example: 进行中 tags: - 'V2 4. 平台任务与每日执行' /api/v2/geo/task/prompts: get: summary: '获取平台任务某一天的全部 Prompt 执行列表' operationId: Prompt description: "先取得平台任务 task_id,再查询这一个平台的 Prompt 执行。data 是完整数组,不分页;多个平台需分别请求。同一问题的多次执行保留不同 prompt_task_id。\n刚创建的任务要显式传创建响应的 execution_date(今天);不传 date 默认昨天,可能得到空数组。配置问题和每日执行是两层记录,回答需要等待后台异步完成。\n用返回的 prompt_task_id 调用 /geo/prompt/result 或 /geo/prompt/searches。" parameters: - in: query name: task_id description: '平台监测任务 ID,不是 Prompt 执行 ID.' example: 9300 required: true schema: type: integer description: '平台监测任务 ID,不是 Prompt 执行 ID.' example: 9300 - in: query name: date description: '单日日期 YYYY-MM-DD,默认昨天(Asia/Shanghai);区间需逐日请求.' example: '2026-10-13' required: false schema: type: string description: '单日日期 YYYY-MM-DD,默认昨天(Asia/Shanghai);区间需逐日请求.' example: '2026-10-13' responses: 200: description: '' content: application/json: schema: type: object example: success: true data: - customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 prompt_name: 推荐运动鞋 date_time: '2026-10-13' hours: 8 status: 2 model: deepseek engine: deepseek brand_exposure: 示例品牌 screenshot_url: 'https://example.com/screenshot.png' properties: success: type: boolean example: true data: type: array example: - customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 prompt_name: 推荐运动鞋 date_time: '2026-10-13' hours: 8 status: 2 model: deepseek engine: deepseek brand_exposure: 示例品牌 screenshot_url: 'https://example.com/screenshot.png' items: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 prompt_task_id: type: integer example: 1001 prompt_name: type: string example: 推荐运动鞋 date_time: type: string example: '2026-10-13' hours: type: integer example: 8 status: type: integer example: 2 model: type: string example: deepseek engine: type: string example: deepseek brand_exposure: type: string example: 示例品牌 screenshot_url: type: string example: 'https://example.com/screenshot.png' tags: - 'V2 4. 平台任务与每日执行' /api/v2/geo/task/results: get: summary: '获取平台任务某一天的全部 Prompt 结果与排名' operationId: Prompt description: "可直接按平台 task_id + date 获取结果,无需逐条调用单 Prompt 接口。\n每条包含 prompt_task_id。data.data 为结果数组,读取全部分页才是完整日数据。\n尚无回答的执行也会返回:result_status=missing、answer/think=null;排名仍按真实数据返回。" parameters: - in: query name: task_id description: '平台监测任务 ID.' example: 9300 required: true schema: type: integer description: '平台监测任务 ID.' example: 9300 - in: query name: date description: '单日日期 YYYY-MM-DD,默认昨天(Asia/Shanghai);区间需逐日请求.' example: '2026-10-13' required: false schema: type: string description: '单日日期 YYYY-MM-DD,默认昨天(Asia/Shanghai);区间需逐日请求.' example: '2026-10-13' - in: query name: page description: '页码,从 1 开始.' example: 1 required: false schema: type: integer description: '页码,从 1 开始.' example: 1 - in: query name: per_page description: '每页执行记录数,1–100,默认 20.' example: 100 required: false schema: type: integer description: '每页执行记录数,1–100,默认 20.' example: 100 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 prompt_name: 推荐运动鞋 date_time: '2026-10-13' hours: 8 status: 2 model: deepseek engine: deepseek brand_exposure: 示例品牌 screenshot_url: null result_status: available answer: 推荐示例品牌 think: 分析思路 rank_exposure: 示例品牌 rank_exposure_number: '1' rank_details: - brand: 示例品牌 brand_short: 示例 position: 1 visibility: 80 score: 90 total: 1 per_page: 100 last_page: 1 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 prompt_name: 推荐运动鞋 date_time: '2026-10-13' hours: 8 status: 2 model: deepseek engine: deepseek brand_exposure: 示例品牌 screenshot_url: null result_status: available answer: 推荐示例品牌 think: 分析思路 rank_exposure: 示例品牌 rank_exposure_number: '1' rank_details: - brand: 示例品牌 brand_short: 示例 position: 1 visibility: 80 score: 90 items: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 prompt_task_id: type: integer example: 1001 prompt_name: type: string example: 推荐运动鞋 date_time: type: string example: '2026-10-13' hours: type: integer example: 8 status: type: integer example: 2 model: type: string example: deepseek engine: type: string example: deepseek brand_exposure: type: string example: 示例品牌 screenshot_url: type: string example: null result_status: type: string example: available answer: type: string example: 推荐示例品牌 think: type: string example: 分析思路 rank_exposure: type: string example: 示例品牌 rank_exposure_number: type: string example: '1' rank_details: type: array example: - brand: 示例品牌 brand_short: 示例 position: 1 visibility: 80 score: 90 items: type: object properties: brand: type: string example: 示例品牌 brand_short: type: string example: 示例 position: type: integer example: 1 visibility: type: integer example: 80 score: type: integer example: 90 total: type: integer example: 1 per_page: type: integer example: 100 last_page: type: integer example: 1 tags: - 'V2 4. 平台任务与每日执行' /api/v2/geo/prompt/detail: get: summary: '获取单个 Prompt 执行的基础信息' operationId: Prompt description: 'prompt_task_id 是某天、某平台、某次问题执行的 ID,不是问题文本的固定配置 ID。' parameters: - in: query name: prompt_task_id description: 'Prompt 执行 ID,取 /geo/task/prompts 或 /geo/task/results 的 prompt_task_id.' example: 1001 required: true schema: type: integer description: 'Prompt 执行 ID,取 /geo/task/prompts 或 /geo/task/results 的 prompt_task_id.' example: 1001 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 prompt_name: 推荐运动鞋 date_time: '2026-10-13' hours: 8 status: 2 model: deepseek engine: deepseek brand_exposure: 示例品牌 screenshot_url: null properties: success: type: boolean example: true data: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 prompt_task_id: type: integer example: 1001 prompt_name: type: string example: 推荐运动鞋 date_time: type: string example: '2026-10-13' hours: type: integer example: 8 status: type: integer example: 2 model: type: string example: deepseek engine: type: string example: deepseek brand_exposure: type: string example: 示例品牌 screenshot_url: type: string example: null tags: - 'V2 5. 单个 Prompt 执行数据' /api/v2/geo/prompt/result: get: summary: '获取单个 Prompt 执行的回答与排名' operationId: Prompt description: "answer/think 是该执行最新保存的回答版本;rank_details 为品牌与排名的真实对应关系。\n无回答时仍返回执行记录,result_status=missing,不能将空排名当作第 0 名。" parameters: - in: query name: prompt_task_id description: 'Prompt 执行 ID,不是平台 task_id.' example: 1001 required: true schema: type: integer description: 'Prompt 执行 ID,不是平台 task_id.' example: 1001 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 prompt_name: 推荐运动鞋 date_time: '2026-10-13' result_status: available answer: 推荐示例品牌 think: 分析思路 rank_exposure: 示例品牌 rank_exposure_number: '1' rank_details: - brand: 示例品牌 brand_short: 示例 position: 1 visibility: 80 score: 90 properties: success: type: boolean example: true data: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 prompt_task_id: type: integer example: 1001 prompt_name: type: string example: 推荐运动鞋 date_time: type: string example: '2026-10-13' result_status: type: string example: available answer: type: string example: 推荐示例品牌 think: type: string example: 分析思路 rank_exposure: type: string example: 示例品牌 rank_exposure_number: type: string example: '1' rank_details: type: array example: - brand: 示例品牌 brand_short: 示例 position: 1 visibility: 80 score: 90 items: type: object properties: brand: type: string example: 示例品牌 brand_short: type: string example: 示例 position: type: integer example: 1 visibility: type: integer example: 80 score: type: integer example: 90 tags: - 'V2 5. 单个 Prompt 执行数据' /api/v2/geo/prompt/searches: get: summary: '获取单个 Prompt 执行的全部信源(分页)' operationId: Prompt description: "data.data 为信源数组,分页字段是 data.current_page/last_page/total/per_page。\n读取所有页;信源存在或有 cite_index 不代表回答正文实际采纳该信源。" parameters: - in: query name: prompt_task_id description: 'Prompt 执行 ID.' example: 1001 required: true schema: type: integer description: 'Prompt 执行 ID.' example: 1001 - in: query name: page description: '页码,从 1 开始.' example: 1 required: false schema: type: integer description: '页码,从 1 开始.' example: 1 - in: query name: per_page description: '每页信源数,1–1000,默认 100.' example: 1000 required: false schema: type: integer description: '每页信源数,1–1000,默认 100.' example: 1000 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 source_id: 5001 url: 'https://example.com/source' title: 示例信源 domain: example.com cite_index: '1' snippet: 摘要 upstream_task_id: opaque-ai-id total: 1 per_page: 1000 last_page: 1 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 source_id: 5001 url: 'https://example.com/source' title: 示例信源 domain: example.com cite_index: '1' snippet: 摘要 upstream_task_id: opaque-ai-id items: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 prompt_task_id: type: integer example: 1001 source_id: type: integer example: 5001 url: type: string example: 'https://example.com/source' title: type: string example: 示例信源 domain: type: string example: example.com cite_index: type: string example: '1' snippet: type: string example: 摘要 upstream_task_id: type: string example: opaque-ai-id total: type: integer example: 1 per_page: type: integer example: 1000 last_page: type: integer example: 1 tags: - 'V2 5. 单个 Prompt 执行数据' /api/v2/geo/prompt/screenshot: get: summary: '获取单个 Prompt 执行的截图' operationId: Prompt description: '' parameters: - in: query name: prompt_task_id description: 'Prompt 执行 ID.' example: 1001 required: true schema: type: integer description: 'Prompt 执行 ID.' example: 1001 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 screenshot_status: 2 screenshot_url: 'https://example.com/screenshot.png' properties: success: type: boolean example: true data: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 prompt_task_id: type: integer example: 1001 screenshot_status: type: integer example: 2 screenshot_url: type: string example: 'https://example.com/screenshot.png' tags: - 'V2 5. 单个 Prompt 执行数据' /api/v2/geo/prompt/products: get: summary: '获取单个 Prompt 执行的商品卡数据(分页)' operationId: Prompt description: "使用商品洞察页面相同的已保存商品数据,支持 ChatGPT、千问、豆包 App 和元宝。\nprompt_task_id 必须从每日执行/结果接口取得;不是平台 task_id,也不是上游请求标识。\ndata.products 为本页商品卡,按页面展示顺序排列;遍历所有页才能得到该次执行的全部商品。\nsupported=false/result_status=unsupported 表示平台暂不支持;支持但没有已保存商品卡时 result_status=missing、products=[]。\n字段按平台和实际保存内容返回,缺失字段省略,field_order/field_labels 提供展示顺序和中文名称。\n价格和销量是该次执行时保存的展示值,不是实时成交数据;商品卡出现不等于正文提及或实际引用。\n与商品洞察页面的汇总范围不同,本接口只读取单次 Prompt 执行,不触发抓取、解析或监测。" parameters: - in: query name: prompt_task_id description: 'Prompt 执行 ID,取 /geo/task/prompts 或 /geo/task/results.' example: 1001 required: true schema: type: integer description: 'Prompt 执行 ID,取 /geo/task/prompts 或 /geo/task/results.' example: 1001 - in: query name: page description: '页码,从 1 开始.' example: 1 required: false schema: type: integer description: '页码,从 1 开始.' example: 1 - in: query name: per_page description: '每页商品卡数,1–100,默认 20.' example: 20 required: false schema: type: integer description: '每页商品卡数,1–100,默认 20.' example: 20 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: customer_id: 2048 project_id: 1791973046 task_id: 9300 prompt_task_id: 1001 prompt_name: 推荐运动鞋 engine: qwen supported: true result_status: available current_page: 1 per_page: 20 last_page: 1 total: 1 field_order: - name - price - shop - product_url field_labels: name: 名称 price: 价格 shop: 店铺 product_url: 商品链接 products: - name: 示例运动鞋 price: 'CNY 299' shop: name: 示例旗舰店 product_url: 'https://example.com/product/1' properties: success: type: boolean example: true data: type: object properties: customer_id: type: integer example: 2048 project_id: type: integer example: 1791973046 task_id: type: integer example: 9300 prompt_task_id: type: integer example: 1001 prompt_name: type: string example: 推荐运动鞋 engine: type: string example: qwen supported: type: boolean example: true result_status: type: string example: available current_page: type: integer example: 1 per_page: type: integer example: 20 last_page: type: integer example: 1 total: type: integer example: 1 field_order: type: array example: - name - price - shop - product_url items: type: string field_labels: type: object properties: name: type: string example: 名称 price: type: string example: 价格 shop: type: string example: 店铺 product_url: type: string example: 商品链接 products: type: array example: - name: 示例运动鞋 price: 'CNY 299' shop: name: 示例旗舰店 product_url: 'https://example.com/product/1' items: type: object properties: name: type: string example: 示例运动鞋 price: type: string example: 'CNY 299' shop: type: object properties: name: type: string example: 示例旗舰店 product_url: type: string example: 'https://example.com/product/1' 404: description: '' content: application/json: schema: type: object example: message: 'Prompt 执行不存在或无权限访问' properties: message: type: string example: 'Prompt 执行不存在或无权限访问' tags: - 'V2 5. 单个 Prompt 执行数据' /api/v2/geo/project/list: get: summary: 获取监测任务列表(兼容字段) operationId: '' description: "获取当前用户可读取的 GEO 监测任务;一个页面项目下有多个监测任务,一个监测任务下有多个平台任务。\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n新接入请使用项目 / 监测任务 / 平台任务 / Prompt 分组的层级读取接口;本接口保持旧字段及原有行为。" parameters: - in: query name: page description: 页码. example: 1 required: false schema: type: integer description: 页码. example: 1 - in: query name: per_page description: 每页数量. example: 20 required: false schema: type: integer description: 每页数量. example: 20 - in: query name: my_project_id description: '页面项目 ID(Partner URL 中 /geo_projects/current/ 后的 ID),仅返回该项目下当前用户有权读取的监测任务.' example: 2039 required: false schema: type: integer description: '页面项目 ID(Partner URL 中 /geo_projects/current/ 后的 ID),仅返回该项目下当前用户有权读取的监测任务.' example: 2039 - in: query name: status description: 监测任务状态筛选:-3=全部,-2=欠费暂停,-1=暂停,0=待执行,1=进行中,2=已完成. example: 1 required: false schema: type: integer description: 监测任务状态筛选:-3=全部,-2=欠费暂停,-1=暂停,0=待执行,1=进行中,2=已完成. example: 1 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - number_id: 1702888800 brand_name: 耐克 brand_cate_desc: 耐克 brand_desc_list: "耐克\n阿迪达斯" status: 1 status_name: 进行中 created_at: '2024-01-01 12:00:00' projects: - project_id: 123 model_key: chatgpt model_name: ChatGPT prompts: - 推荐运动鞋品牌 - 哪个运动品牌好 total: 100 per_page: 20 last_page: 5 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - number_id: 1702888800 brand_name: 耐克 brand_cate_desc: 耐克 brand_desc_list: "耐克\n阿迪达斯" status: 1 status_name: 进行中 created_at: '2024-01-01 12:00:00' projects: - project_id: 123 model_key: chatgpt model_name: ChatGPT prompts: - 推荐运动鞋品牌 - 哪个运动品牌好 items: type: object properties: number_id: type: integer example: 1702888800 brand_name: type: string example: 耐克 brand_cate_desc: type: string example: 耐克 brand_desc_list: type: string example: "耐克\n阿迪达斯" status: type: integer example: 1 status_name: type: string example: 进行中 created_at: type: string example: '2024-01-01 12:00:00' projects: type: array example: - project_id: 123 model_key: chatgpt model_name: ChatGPT items: type: object properties: project_id: type: integer example: 123 model_key: type: string example: chatgpt model_name: type: string example: ChatGPT prompts: type: array example: - 推荐运动鞋品牌 - 哪个运动品牌好 items: type: string total: type: integer example: 100 per_page: type: integer example: 20 last_page: type: integer example: 5 tags: - 'V2 6. 兼容接口(旧字段)' /api/v2/geo/project/detail: get: summary: 获取单个监测任务详情(兼容字段) operationId: '' description: "根据 number_id 获取监测任务详情,包括其全部平台任务和配置问题。\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n新接入请使用项目 / 监测任务 / 平台任务 / Prompt 分组的层级读取接口;本接口保持旧字段及原有行为。" parameters: - in: query name: number_id description: '监测任务 ID(number_id).' example: 1702888800 required: true schema: type: integer description: '监测任务 ID(number_id).' example: 1702888800 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: number_id: 1702888800 brand_name: 耐克 brand_cate_desc: 耐克 brand_desc_list: "耐克\n阿迪达斯" status: 1 status_name: 进行中 week_restart: 0 only_rank: 0 rank_match: 1 created_at: '2024-01-01 12:00:00' projects: - project_id: 123 model_key: deepseek model_name: DeepSeek prompts: - 推荐运动鞋品牌 - 哪个运动品牌好 brand_urls: - 'https://www.nike.com' emails: - user@example.com properties: success: type: boolean example: true data: type: object properties: number_id: type: integer example: 1702888800 brand_name: type: string example: 耐克 brand_cate_desc: type: string example: 耐克 brand_desc_list: type: string example: "耐克\n阿迪达斯" status: type: integer example: 1 status_name: type: string example: 进行中 week_restart: type: integer example: 0 only_rank: type: integer example: 0 rank_match: type: integer example: 1 created_at: type: string example: '2024-01-01 12:00:00' projects: type: array example: - project_id: 123 model_key: deepseek model_name: DeepSeek items: type: object properties: project_id: type: integer example: 123 model_key: type: string example: deepseek model_name: type: string example: DeepSeek prompts: type: array example: - 推荐运动鞋品牌 - 哪个运动品牌好 items: type: string brand_urls: type: array example: - 'https://www.nike.com' items: type: string emails: type: array example: - user@example.com items: type: string 404: description: '' content: application/json: schema: type: object example: success: false message: 项目不存在 properties: success: type: boolean example: false message: type: string example: 项目不存在 tags: - 'V2 6. 兼容接口(旧字段)' /api/v2/geo/task/list: get: summary: '获取平台任务某一天的 Prompt 执行(兼容字段)' operationId: Prompt description: "根据平台任务 ID 和日期获取该平台的 Prompt 执行列表。\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n新接入请使用项目 / 监测任务 / 平台任务 / Prompt 分组的层级读取接口;本接口保持旧字段及原有行为。" parameters: - in: query name: project_id description: '平台任务 ID,取兼容列表 data.data[].projects[].project_id.' example: 123 required: true schema: type: integer description: '平台任务 ID,取兼容列表 data.data[].projects[].project_id.' example: 123 - in: query name: date description: 日期,格式:Y-m-d,默认为今天. example: '2026-10-14' required: false schema: type: string description: 日期,格式:Y-m-d,默认为今天. example: '2026-10-14' nullable: true responses: 200: description: '' content: application/json: schema: type: object example: success: true data: - project_id: 123 task_id: 1001 prompt_name: 推荐运动鞋品牌 status: 2 model: chatgpt sceenshot_result: 'https://example.com/screenshot.png' date_time: '2026-10-14' brand_exposure: '耐克,阿迪达斯' properties: success: type: boolean example: true data: type: array example: - project_id: 123 task_id: 1001 prompt_name: 推荐运动鞋品牌 status: 2 model: chatgpt sceenshot_result: 'https://example.com/screenshot.png' date_time: '2026-10-14' brand_exposure: '耐克,阿迪达斯' items: type: object properties: project_id: type: integer example: 123 task_id: type: integer example: 1001 prompt_name: type: string example: 推荐运动鞋品牌 status: type: integer example: 2 model: type: string example: chatgpt sceenshot_result: type: string example: 'https://example.com/screenshot.png' date_time: type: string example: '2026-10-14' brand_exposure: type: string example: '耐克,阿迪达斯' tags: - 'V2 6. 兼容接口(旧字段)' /api/v2/geo/task/detail: get: summary: 获取任务基础信息 operationId: '' description: "使用每日任务列表返回的 task_id 获取问题、平台、执行状态和日期。\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n新接入请使用项目 / 监测任务 / 平台任务 / Prompt 分组的层级读取接口;本接口保持旧字段及原有行为。" parameters: - in: query name: task_id description: '每日任务ID(任务列表中的 task_id).' example: 1001 required: true schema: type: integer description: '每日任务ID(任务列表中的 task_id).' example: 1001 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: project_id: 123 task_id: 1001 prompt_name: 推荐运动鞋品牌 status: 2 model: deepseek engine: deepseek date_time: '2026-10-14' brand_exposure: 耐克 sceenshot_result: null created_at: '2026-10-14 08:00:00' updated_at: '2026-10-14 08:05:00' properties: success: type: boolean example: true data: type: object properties: project_id: type: integer example: 123 task_id: type: integer example: 1001 prompt_name: type: string example: 推荐运动鞋品牌 status: type: integer example: 2 model: type: string example: deepseek engine: type: string example: deepseek date_time: type: string example: '2026-10-14' brand_exposure: type: string example: 耐克 sceenshot_result: type: string example: null created_at: type: string example: '2026-10-14 08:00:00' updated_at: type: string example: '2026-10-14 08:05:00' 404: description: '' content: application/json: schema: type: object example: success: false message: 任务不存在或者无权限访问 properties: success: type: boolean example: false message: type: string example: 任务不存在或者无权限访问 tags: - 'V2 6. 兼容接口(旧字段)' /api/v2/geo/task/result: get: summary: 获取任务的问答结果、思考过程和排名 operationId: '' description: "根据send_task的ID获取AI的回答内容和思考过程\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n新接入请使用项目 / 监测任务 / 平台任务 / Prompt 分组的层级读取接口;本接口保持旧字段及原有行为。" parameters: - in: query name: task_id description: 任务ID(send_task的ID). example: 1001 required: true schema: type: integer description: 任务ID(send_task的ID). example: 1001 - in: query name: with_products description: '是否附带该任务命中的商品数据;1 开启,默认 0 关闭。开启后返回体的 data 中会新增 products 字段(无商品数据时为空数组[])。仅豆包 App / 千问 App 系列模型有商品数据,其它模型统一返回 []。' example: 1 required: false schema: type: integer description: '是否附带该任务命中的商品数据;1 开启,默认 0 关闭。开启后返回体的 data 中会新增 products 字段(无商品数据时为空数组[])。仅豆包 App / 千问 App 系列模型有商品数据,其它模型统一返回 []。' example: 1 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: project_id: 123 task_id: 1001 answer: '根据市场调研和用户反馈,推荐以下运动鞋品牌:1. 耐克...' think: 分析思路:首先考虑品牌知名度... brand_exposure: '耐克,阿迪达斯,彪马' model: chatgpt engine: chatgpt_api prompt_name: 推荐运动鞋品牌 date_time: '2026-10-13' rank_exposure: 耐克 rank_exposure_number: '1' rank_details: - brand: 耐克 brand_short: 耐克 position: 1 visibility: 1 score: 100 products: [] properties: success: type: boolean example: true data: type: object properties: project_id: type: integer example: 123 task_id: type: integer example: 1001 answer: type: string example: '根据市场调研和用户反馈,推荐以下运动鞋品牌:1. 耐克...' think: type: string example: 分析思路:首先考虑品牌知名度... brand_exposure: type: string example: '耐克,阿迪达斯,彪马' model: type: string example: chatgpt engine: type: string example: chatgpt_api prompt_name: type: string example: 推荐运动鞋品牌 date_time: type: string example: '2026-10-13' rank_exposure: type: string example: 耐克 rank_exposure_number: type: string example: '1' rank_details: type: array example: - brand: 耐克 brand_short: 耐克 position: 1 visibility: 1 score: 100 items: type: object properties: brand: type: string example: 耐克 brand_short: type: string example: 耐克 position: type: integer example: 1 visibility: type: integer example: 1 score: type: integer example: 100 products: type: array example: [] 404: description: '' content: application/json: schema: type: object example: success: false message: 未找到结果 properties: success: type: boolean example: false message: type: string example: 未找到结果 tags: - 'V2 6. 兼容接口(旧字段)' /api/v2/geo/task/screenshot: get: summary: 获取任务的截图结果 operationId: '' description: "根据send_task的ID获取截图URL\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n新接入请使用项目 / 监测任务 / 平台任务 / Prompt 分组的层级读取接口;本接口保持旧字段及原有行为。" parameters: - in: query name: task_id description: 任务ID(send_task的ID). example: 1001 required: true schema: type: integer description: 任务ID(send_task的ID). example: 1001 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: task_id: 1001 sc_status: 2 sceenshot_result: 'https://example.com/screenshots/abc123.png' properties: success: type: boolean example: true data: type: object properties: task_id: type: integer example: 1001 sc_status: type: integer example: 2 sceenshot_result: type: string example: 'https://example.com/screenshots/abc123.png' 404: description: '' content: application/json: schema: type: object example: success: false message: 任务不存在 properties: success: type: boolean example: false message: type: string example: 任务不存在 tags: - 'V2 6. 兼容接口(旧字段)' /api/v2/geo/task/searches: get: summary: 获取任务的信息源列表 operationId: '' description: "根据send_task的ID获取AI搜索的信息源列表\n\n兼容旧接口:my_project_id 是页面项目 ID,number_id 是监测任务 ID;旧 project_id 是平台监测任务 ID,旧 task_id 是 Prompt 执行 ID。\n新接入请使用项目 / 监测任务 / 平台任务 / Prompt 分组的层级读取接口;本接口保持旧字段及原有行为。" parameters: - in: query name: task_id description: 任务ID(send_task的ID). example: 1001 required: true schema: type: integer description: 任务ID(send_task的ID). example: 1001 - in: query name: limit description: '返回数量限制,默认 10,范围 1–1000.' example: 10 required: false schema: type: integer description: '返回数量限制,默认 10,范围 1–1000.' example: 10 nullable: true - in: query name: page description: '可选页码,从1开始。传入后返回 pagination(current_page、last_page、per_page、total),data 仍为信源数组.' example: 1 required: false schema: type: integer description: '可选页码,从1开始。传入后返回 pagination(current_page、last_page、per_page、total),data 仍为信源数组.' example: 1 nullable: true responses: 200: description: '' content: application/json: schema: type: object example: success: true data: - id: 2001 task_ai_id: abc123 task_prompt_id: 1001 url: 'https://www.nike.com/article/best-shoes' title: 2024年最佳运动鞋推荐 site_name: Nike官网 site_icon: 'https://www.nike.com/favicon.ico' cite_index: '1' published_at: '2024-01-10' snippet: 耐克推出的最新运动鞋系列... domain: nike.com properties: success: type: boolean example: true data: type: array example: - id: 2001 task_ai_id: abc123 task_prompt_id: 1001 url: 'https://www.nike.com/article/best-shoes' title: 2024年最佳运动鞋推荐 site_name: Nike官网 site_icon: 'https://www.nike.com/favicon.ico' cite_index: '1' published_at: '2024-01-10' snippet: 耐克推出的最新运动鞋系列... domain: nike.com items: type: object properties: id: type: integer example: 2001 task_ai_id: type: string example: abc123 task_prompt_id: type: integer example: 1001 url: type: string example: 'https://www.nike.com/article/best-shoes' title: type: string example: 2024年最佳运动鞋推荐 site_name: type: string example: Nike官网 site_icon: type: string example: 'https://www.nike.com/favicon.ico' cite_index: type: string example: '1' published_at: type: string example: '2024-01-10' snippet: type: string example: 耐克推出的最新运动鞋系列... domain: type: string example: nike.com tags: - 'V2 6. 兼容接口(旧字段)' /api/v2/finance/balance: get: summary: 获取当前用户余额 operationId: '' description: 获取当前认证用户的账户余额信息 parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: amount: 1000.0 user_id: 1 user_name: 张三 properties: success: type: boolean example: true data: type: object properties: amount: type: number example: 1000.0 user_id: type: integer example: 1 user_name: type: string example: 张三 tags: - 'V2 7. 财务管理' /api/v2/finance/deduction/details: get: summary: 获取扣费详情 operationId: '' description: "按旧扣费关联 ID 和时间范围查询当前用户的扣费记录。\n本接口保留旧字段:project_id 实际表示关联的 Prompt 执行 ID(新 GEO prompt_task_id),不是页面项目 ID,也不是 number_id 对应的监测任务 ID。" parameters: - in: query name: project_id description: '兼容旧字段:扣费关联的 Prompt 执行 ID(可选),不是新 GEO project_id.' example: 1001 required: false schema: type: integer description: '兼容旧字段:扣费关联的 Prompt 执行 ID(可选),不是新 GEO project_id.' example: 1001 - in: query name: start_date description: 开始日期(可选)格式:Y-m-d. example: '2024-01-01' required: false schema: type: string description: 开始日期(可选)格式:Y-m-d. example: '2024-01-01' - in: query name: end_date description: 结束日期(可选)格式:Y-m-d. example: '2024-01-31' required: false schema: type: string description: 结束日期(可选)格式:Y-m-d. example: '2024-01-31' - in: query name: page description: 页码. example: 1 required: false schema: type: integer description: 页码. example: 1 - in: query name: per_page description: 每页数量. example: 20 required: false schema: type: integer description: 每页数量. example: 20 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - id: 1 user_id: 1 project_id: 123 diff_amount: -10.0 before_amount: 1010.0 after_amount: 1000.0 remark: 项目监测扣费 created_at: '2024-01-15 10:30:00' total: 100 per_page: 20 last_page: 5 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - id: 1 user_id: 1 project_id: 123 diff_amount: -10 before_amount: 1010 after_amount: 1000 remark: 项目监测扣费 created_at: '2024-01-15 10:30:00' items: type: object properties: id: type: integer example: 1 user_id: type: integer example: 1 project_id: type: integer example: 123 diff_amount: type: number example: -10.0 before_amount: type: number example: 1010.0 after_amount: type: number example: 1000.0 remark: type: string example: 项目监测扣费 created_at: type: string example: '2024-01-15 10:30:00' total: type: integer example: 100 per_page: type: integer example: 20 last_page: type: integer example: 5 tags: - 'V2 7. 财务管理' '/api/v2/projects/{project_id}/site-diagnosis': post: summary: 创建项目站点诊断 operationId: '' description: "使用项目创建时保存的 site_domain(完整 URL,可包含子目录),无需再次提交 URL。\nproject_id 是页面 /geo_projects/current/ 后的项目 ID,不是 GEO 层级读取接口中表示 number_id 的旧 project_id。\n通过当前系统后台队列创建项目诊断:新建返回 202,复用最新诊断返回 200。\n默认复用当前 URL 下排队中、运行中或已完成的最新诊断;失败后再次 POST 会新建。\nforce_refresh=true 在最新任务结束后新建诊断并绕过远端缓存;进行中的任务仍复用。\n重新诊断保留历史记录。仅项目所有者或管理员可调用,网页分享权限不授予此 API 权限。" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true created: false data: project_id: 2048 diagnosis_id: 501 status: running result_ready: false result: null properties: success: type: boolean example: true created: type: boolean example: false data: type: object properties: project_id: type: integer example: 2048 diagnosis_id: type: integer example: 501 status: type: string example: running result_ready: type: boolean example: false result: type: string example: null 202: description: '' content: application/json: schema: type: object example: success: true created: true data: project_id: 2048 project_url: 'https://example.com/nl/' diagnosis_id: 501 diagnosis_task_id: null url: 'https://example.com/nl/' is_current_url: true status: queued progress_percent: 0 current_step: queued cached: false result_ready: false result: null error: null created_at: '2026-10-16T10:00:00+08:00' updated_at: '2026-10-16T10:00:00+08:00' completed_at: null properties: success: type: boolean example: true created: type: boolean example: true data: type: object properties: project_id: type: integer example: 2048 project_url: type: string example: 'https://example.com/nl/' diagnosis_id: type: integer example: 501 diagnosis_task_id: type: string example: null url: type: string example: 'https://example.com/nl/' is_current_url: type: boolean example: true status: type: string example: queued progress_percent: type: integer example: 0 current_step: type: string example: queued cached: type: boolean example: false result_ready: type: boolean example: false result: type: string example: null error: type: string example: null created_at: type: string example: '2026-10-16T10:00:00+08:00' updated_at: type: string example: '2026-10-16T10:00:00+08:00' completed_at: type: string example: null 404: description: '' content: application/json: schema: type: object example: message: 项目不存在或无权限访问 properties: message: type: string example: 项目不存在或无权限访问 422: description: '' content: application/json: schema: type: object example: message: '请先为项目设置有效的 HTTP/HTTPS 站点 URL' errors: project_url: - '请先为项目设置有效的 HTTP/HTTPS 站点 URL' properties: message: type: string example: '请先为项目设置有效的 HTTP/HTTPS 站点 URL' errors: type: object properties: project_url: type: array example: - '请先为项目设置有效的 HTTP/HTTPS 站点 URL' items: type: string 503: description: '' content: application/json: schema: type: object example: success: false message: 诊断任务提交失败,请稍后重试 properties: success: type: boolean example: false message: type: string example: 诊断任务提交失败,请稍后重试 tags: - 'V2 8. 项目站点诊断' requestBody: required: false content: application/json: schema: type: object properties: force_refresh: type: boolean description: '是否重新诊断并绕过远端缓存,默认 false.' example: false get: summary: 获取项目最新站点诊断状态与结果 operationId: '' description: "始终按项目取最新一次诊断,不会回退到较早的成功报告,也不会按相同域名读取其他项目的诊断。\n此 GET 仅读取已保存数据,不创建任务或调用远端。后台队列与每分钟轮询命令负责更新结果。\n未诊断时 status=not_started、diagnosis_id/result=null;排队或运行时 result_ready=false、result=null。\nstatus 为 not_started/queued/running/completed/failed。仅在 result_ready=true 时消费报告;完成状态与结果写入之间可能短暂存在延迟。\nresult 包含综合评分、摘要、主要问题、优化建议、模块/平台评分、观察数据、逐页诊断和完整 result_json,缺失字段保持空值。\n建议每 10 秒轮询;failed 时读取 error 并按需重新 POST。所有时间戳为 ISO 8601,包含时区。\nproject_url 是项目当前 URL,url 是本次诊断 URL;is_current_url=false 表示项目 URL 已修改,应重新诊断。\ndiagnosis_id 是站点诊断记录 ID;diagnosis_task_id 是诊断服务的本地记录 ID(提交远端后可用),均不同于 GEO 平台 task_id 或 prompt_task_id。" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: project_id: 2048 project_url: 'https://example.com/nl/' diagnosis_id: 501 diagnosis_task_id: 801 url: 'https://example.com/nl/' is_current_url: true status: completed progress_percent: 100 current_step: completed cached: false result_ready: true result: composite_score: 82 summary_text: 站点可被发现,建议完善结构化数据。 top_issues: - title: 缺少结构化数据 quick_wins: - title: '补充 Organization Schema' modules_summary: technical: score: 85 platform_scores: [] result_json: summary: score: 82 observation: null page_diagnostics: [] error: null created_at: '2026-10-16T10:00:00+08:00' updated_at: '2026-10-16T10:02:00+08:00' completed_at: '2026-10-16T10:02:00+08:00' properties: success: type: boolean example: true data: type: object properties: project_id: type: integer example: 2048 project_url: type: string example: 'https://example.com/nl/' diagnosis_id: type: integer example: 501 diagnosis_task_id: type: integer example: 801 url: type: string example: 'https://example.com/nl/' is_current_url: type: boolean example: true status: type: string example: completed progress_percent: type: integer example: 100 current_step: type: string example: completed cached: type: boolean example: false result_ready: type: boolean example: true result: type: object properties: composite_score: type: integer example: 82 summary_text: type: string example: 站点可被发现,建议完善结构化数据。 top_issues: type: array example: - title: 缺少结构化数据 items: type: object properties: title: type: string example: 缺少结构化数据 quick_wins: type: array example: - title: '补充 Organization Schema' items: type: object properties: title: type: string example: '补充 Organization Schema' modules_summary: type: object properties: technical: type: object properties: score: type: integer example: 85 platform_scores: type: array example: [] result_json: type: object properties: summary: type: object properties: score: type: integer example: 82 observation: type: string example: null page_diagnostics: type: array example: [] error: type: string example: null created_at: type: string example: '2026-10-16T10:00:00+08:00' updated_at: type: string example: '2026-10-16T10:02:00+08:00' completed_at: type: string example: '2026-10-16T10:02:00+08:00' 404: description: '' content: application/json: schema: type: object example: message: 项目不存在或无权限访问 properties: message: type: string example: 项目不存在或无权限访问 tags: - 'V2 8. 项目站点诊断' parameters: - in: path name: project_id description: '页面项目 ID,与 /geo_projects/current/2048 的 2048 相同.' example: 2048 required: true schema: type: integer '/api/v2/projects/{project_id}/search-performance': get: summary: '读取项目 GSC 连接状态' operationId: getProjectSearchPerformanceConnection description: "用户先在 DTCPack 控制台为当前项目授权 GSC 账号并选择站点,然后使用 DTCPack API Key 调用。\nproject_id 是页面项目 ID(my_projects.id),不是 GEO 旧接口中的监测任务 number_id。\nstatus 为 not_connected(未连接)、site_not_selected(待选择站点)或 ready(已配置,可查询)。\n此接口仅读取本地连接配置;ready 不代表刚刚向 Google 验证过 Token 或站点权限。\n不返回 Google Token、远程连接标识或账号下其他站点。仅项目所有者或管理员可访问。" parameters: [] responses: 200: description: '' content: application/json: schema: description: '' type: object example: success: true data: project_id: 2048 status: ready site_url: 'sc-domain:example.com' properties: success: type: boolean example: true data: type: object properties: project_id: type: integer example: 2048 description: '控制台项目 ID。' status: type: string example: ready description: '' enum: - not_connected - site_not_selected - ready site_url: type: string example: 'sc-domain:example.com' description: '项目绑定的 GSC 属性;未选择时为 null。' nullable: true examples: response_0: value: success: true data: project_id: 2048 status: ready site_url: 'sc-domain:example.com' response_1: value: success: true data: project_id: 2048 status: not_connected site_url: null 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. 403: description: '' content: application/json: schema: type: object example: message: 账户已被封禁 properties: message: type: string example: 账户已被封禁 404: description: '' content: application/json: schema: type: object example: message: 项目不存在或无权限访问 properties: message: type: string example: 项目不存在或无权限访问 tags: - 'V2 9. 搜索表现' parameters: - in: path name: project_id description: '已在系统内授权 GSC 的页面项目 ID.' example: 2048 required: true schema: type: integer '/api/v2/projects/{project_id}/search-performance/query': post: summary: '查询 Google 搜索表现' operationId: queryProjectSearchPerformance description: "使用项目已保存的 GSC 授权与站点,通过 GoogleSearchConsoleService 查询 Google Search Analytics。\n请求体沿用 Google 的 camelCase 结构,可用于站点汇总、日期趋势、关键词、页面、国家、设备和搜索展现分析。\n不传 dimensions 或传 [] 返回区间汇总;按 query/page 同时分组可获取关键词与落地页组合。\nrows[].keys 的顺序与 dimensions 一致;clicks 为点击量,impressions 为曝光量,ctr 为 0–1 的点击率,position 为平均排名。\nDiscover / Google News 不支持关键词和平均排名等所有搜索维度,缺失指标保持缺失。\n按 hour 分组必须同时使用 dataState=hourly_all;小时数据最多覆盖最近 10 天,可能尚未定稿。\n日期按 America/Los_Angeles 解释。默认仅返回最终数据;all 包含最新未定稿数据,metadata 标记未完成日期或小时。\n每次最多返回 25000 行。pagination.has_more 表示本页已满、可继续请求,不保证下页有数据或已获取全部明细。\n分页保持其他参数不变,将 startRow 设置为 next_start_row。无数据返回 rows=[]、has_more=false。\n此接口实时查询 GSC,不读取词库快照、不导入关键词,也不修改同步计划。Google 可能隐藏隐私查询或截断明细。\n站点由项目绑定关系决定,不接受调用方提交 siteUrl/site_url、connection_id 或 Google Token。" parameters: [] responses: 200: description: '' content: application/json: schema: description: '' type: object example: success: true data: project_id: 2048 site_url: 'sc-domain:example.com' dimensions: - query - page rows: - keys: - 'packaging box' - 'https://example.com/boxes' clicks: 12 impressions: 120 ctr: 0.1 position: 3.2 responseAggregationType: byPage metadata: null pagination: start_row: 0 row_limit: 1000 row_count: 1 has_more: false next_start_row: null properties: success: type: boolean example: true data: type: object properties: project_id: type: integer example: 2048 description: '控制台项目 ID。' site_url: type: string example: 'sc-domain:example.com' description: '项目已绑定的 GSC 属性。' nullable: true dimensions: type: array example: - query - page description: '本次分组维度,顺序与 rows[].keys 一致;汇总时为空。' items: type: string rows: type: array example: - keys: - 'packaging box' - 'https://example.com/boxes' clicks: 12 impressions: 120 ctr: 0.1 position: 3.2 description: 'Google 搜索表现明细,无数据时为空数组。' items: type: object properties: keys: type: array items: type: string clicks: type: number impressions: type: number ctr: type: number position: type: number responseAggregationType: type: string example: byPage description: 'Google 实际使用的聚合方式。' nullable: true metadata: type: object example: null description: 'Google 未定稿数据元信息;未返回时为 null。first_incomplete_date/first_incomplete_hour 之后的数据仍可能变化。' nullable: true properties: first_incomplete_date: type: string format: date first_incomplete_hour: type: string format: date-time pagination: type: object properties: start_row: type: integer example: 0 description: '' row_limit: type: integer example: 1000 description: '' row_count: type: integer example: 1 description: '' has_more: type: boolean example: false description: '' next_start_row: type: integer example: null description: '下一页的 startRow;本页未满时为 null。' nullable: true examples: response_0: value: success: true data: project_id: 2048 site_url: 'sc-domain:example.com' dimensions: - query - page rows: - keys: - 'packaging box' - 'https://example.com/boxes' clicks: 12 impressions: 120 ctr: 0.1 position: 3.2 responseAggregationType: byPage metadata: null pagination: start_row: 0 row_limit: 1000 row_count: 1 has_more: false next_start_row: null response_1: value: success: true data: project_id: 2048 site_url: 'sc-domain:example.com' dimensions: [] rows: [] responseAggregationType: byProperty metadata: null pagination: start_row: 0 row_limit: 1000 row_count: 0 has_more: false next_start_row: null 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. 403: description: '' content: application/json: schema: type: object example: message: 账户已被封禁 properties: message: type: string example: 账户已被封禁 404: description: '' content: application/json: schema: type: object example: message: 项目不存在或无权限访问 properties: message: type: string example: 项目不存在或无权限访问 409: description: '' content: application/json: schema: type: object example: success: false message: '请先在系统内授权 GSC 账号并选择站点' status: not_connected properties: success: type: boolean example: false message: type: string example: '请先在系统内授权 GSC 账号并选择站点' status: type: string example: not_connected 422: description: '' content: application/json: schema: type: object example: message: 'The given data was invalid.' errors: endDate: - 结束日期不能早于开始日期 properties: message: type: string example: 'The given data was invalid.' errors: type: object properties: endDate: type: array example: - 结束日期不能早于开始日期 items: type: string 429: description: '' content: application/json: schema: type: object example: success: false message: 'GSC 查询配额不足,请稍后重试' properties: success: type: boolean example: false message: type: string example: 'GSC 查询配额不足,请稍后重试' 502: description: '' content: application/json: schema: type: object example: success: false message: 'GSC 搜索表现查询失败,请检查授权和站点权限或稍后重试' properties: success: type: boolean example: false message: type: string example: 'GSC 搜索表现查询失败,请检查授权和站点权限或稍后重试' tags: - 'V2 9. 搜索表现' requestBody: required: true content: application/json: schema: type: object properties: startDate: type: string description: 开始日期,YYYY-MM-DD,包含当天,按美国太平洋时间. example: '2026-10-01' format: date endDate: type: string description: '结束日期,YYYY-MM-DD,包含当天,不得早于 startDate.' example: '2026-10-15' format: date dimensions: type: array description: '分组维度,可组合 date、query、page、country、device、searchAppearance、hour,不能重复;默认 [] 汇总.' example: - query - page items: type: string type: type: string description: '搜索类型:web、image、video、news、discover、googleNews,默认 web.' example: web dimensionFilterGroups: type: array description: '筛选条件组,各组之间为 AND.' example: null items: type: object properties: groupType: type: string description: '仅支持 and,省略时按 and 处理.' example: and filters: type: array description: '条件列表,各条件之间为 AND.' example: null items: type: object properties: dimension: type: string description: 筛选维度:query、page、country、device、searchAppearance. example: country operator: type: string description: equals、notEquals、contains、notContains、includingRegex、excludingRegex. example: equals expression: type: string description: '筛选值,最长 4096 字符;country 使用三位国家代码,device 使用 DESKTOP/MOBILE/TABLET.' example: usa required: - dimension - operator - expression required: - filters aggregationType: type: string description: '聚合方式:auto、byPage、byProperty、byNewsShowcasePanel,默认 auto;须符合 Google 的维度与搜索类型限制.' example: auto rowLimit: type: integer description: '每页行数,1–25000,默认 1000.' example: 1000 minimum: 1 maximum: 25000 startRow: type: integer description: '分页起始偏移,从 0 开始,默认 0.' example: 0 minimum: 0 dataState: type: string description: '数据状态:final、all、hourly_all,默认 final;hourly_all 须按 hour 分组.' example: final required: - startDate - endDate parameters: - in: path name: project_id description: '页面项目 ID,与 /geo_projects/current/2048 的 2048 相同.' example: 2048 required: true schema: type: integer