> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取异步解析结果

> 通过job_id查询异步解析任务的处理状态和结果。

任务状态包括：
- pending: 排队中
- in_progress: 处理中
- completed: 已完成
- failed: 处理失败




## OpenAPI

````yaml api-reference/parse-async-1.3.0.openapi.yaml GET /api/v1/xparse/parse/async/{job_id}
openapi: 3.0.3
info:
  title: XParse Parse Async API
  description: |
    独立的文档解析异步API接口，支持异步处理文档解析任务。

    该API适用于处理大文件或批量文件，通过job_id查询处理状态和结果，避免长时间等待。
  version: 1.0.0
  contact:
    name: TextIn API Team
servers:
  - url: https://api.textin.com
    description: 生产环境
security:
  - AppIdAuth: []
    SecretCodeAuth: []
tags:
  - name: XParse Parse
    description: |
      独立的文档解析异步API接口

      ## 功能特性
      - 📄 异步处理：支持大文件和批量文件处理
      - 🔔 Webhook支持：支持任务完成回调通知
      - 📊 状态查询：通过job_id查询任务状态
      - ⏱️ 无超时限制：避免HTTP超时问题

      ## 计费说明
      - 按照处理的页数计费
      - 计费信息通过 x-ti-app-id 和 x-ti-secret-code 进行关联
paths:
  /api/v1/xparse/parse/async/{job_id}:
    get:
      tags:
        - XParse Parse
      summary: 查询异步解析任务状态
      description: |
        通过job_id查询异步解析任务的处理状态和结果。

        任务状态包括：
        - pending: 排队中
        - in_progress: 处理中
        - completed: 已完成
        - failed: 处理失败
      operationId: getParseAsyncJobStatus
      parameters:
        - name: job_id
          in: path
          required: true
          description: 任务ID
          schema:
            type: string
          example: xxx
      responses:
        '200':
          description: 任务状态
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/codemessage'
                  - $ref: '#/components/schemas/JobStatusResponse'
              examples:
                pending:
                  summary: 排队中
                  value:
                    code: 200
                    message: success
                    data:
                      job_id: c020a1f03c994091a94d6763cdbe0684
                      file_id: 00c685bad97544609d3607885d76bdc4
                      status: pending
                in_progress:
                  summary: 处理中
                  value:
                    code: 200
                    message: success
                    data:
                      job_id: c020a1f03c994091a94d6763cdbe0684
                      file_id: 00c685bad97544609d3607885d76bdc4
                      status: in_progress
                completed:
                  summary: 已完成
                  value:
                    code: 200
                    message: success
                    data:
                      job_id: c020a1f03c994091a94d6763cdbe0684
                      file_id: 00c685bad97544609d3607885d76bdc4
                      status: completed
                      result_url: https://web-api.textin.com/file/xparse_result/xxx
                failed:
                  summary: 处理失败
                  value:
                    code: 200
                    message: success
                    data:
                      job_id: c020a1f03c994091a94d6763cdbe0684
                      file_id: 00c685bad97544609d3607885d76bdc4
                      status: failed
                      message: error message
components:
  schemas:
    codemessage:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          default: 200
          description: |
            状态码
            - 200: Success
            - 40101: x-ti-app-id 或 x-ti-secret-code 为空
            - 40102: x-ti-app-id 或 x-ti-secret-code 无效，验证失败
            - 40004: 参数错误，请查看技术文档，检查传参
            - 500: 服务器内部错误

            更多详细错误信息参考[错误码说明](/xparse/v1/parse-response#常见错误码)。
          enum:
            - 200
            - 40101
            - 40102
            - 40004
            - 500
        message:
          type: string
          description: 错误信息
          example: success
    JobStatusResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/JobStatusData'
    JobStatusData:
      type: object
      required:
        - job_id
        - file_id
        - status
      properties:
        job_id:
          type: string
          description: 任务ID
          example: c020a1f03c994091a94d6763cdbe0684
        file_id:
          type: string
          description: 文件 ID
          example: 00c685bad97544609d3607885d76bdc4
        status:
          type: string
          description: |
            任务状态
            - pending: 排队中
            - in_progress: 处理中
            - completed: 已完成
            - failed: 处理失败
          enum:
            - pending
            - in_progress
            - completed
            - failed
          example: completed
        result_url:
          type: string
          description: |
            结果下载URL（仅在status为completed时返回）

            通过该URL可以下载解析结果，结果格式与同步API一致。
          example: https://web-api.textin.com/file/xparse_result/xxx
        message:
          type: string
          description: 错误信息（仅在status为failed时返回）
          example: error message
  securitySchemes:
    AppIdAuth:
      type: apiKey
      in: header
      name: x-ti-app-id
      description: >-
        请[登录Textin](https://www.textin.com/console/dashboard/setting)后前往
        "工作台-账号设置-开发者信息" 查看 x-ti-app-id
    SecretCodeAuth:
      type: apiKey
      in: header
      name: x-ti-secret-code
      description: >-
        请[登录Textin](https://www.textin.com/console/dashboard/setting)后前往
        "工作台-账号设置-开发者信息" 查看 x-ti-secret-code

````