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

# Get the status and result of an async extract job

> Poll for the status and result of an async extract job submitted via `POST /api/v3/extract` with `options.async=true`. Returns the same envelope shape as the synchronous extract endpoint once `status` is `completed`.

```bash
curl https://api.lighton.ai/api/v3/extract/ext_0196e4b2a3c14d5e \
  -H 'Authorization: Bearer $TOKEN'
```

**Pagination:** when completed, `result.data` is paginated with a fixed page size of 15. Use the `page` query param (1-based) to navigate; `result.pagination` reports `total_items`, `total_pages`, `has_next`, `has_prev`.

**Recommended polling cadence:** 1s for the first 10s, then 5s, capped at 30s. Stop polling once `status` is in `{completed, failed}`.



## OpenAPI

````yaml /api-reference/api-console.yaml get /api/v3/extract/{job_id}
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.9.0 (v1)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://api.lighton.ai
security: []
tags:
  - name: Ask
    description: >-
      Retrieval-augmented generation: search your indexed corpus and generate an
      LLM answer grounded in the retrieved passages. Supports streaming (SSE)
      and synchronous modes.
  - name: Search
    description: >-
      Hybrid vector + text retrieval over your indexed corpus. Returns ranked
      passages with provenance (file, page range, workspace). Optional reranking
      and vision mode.
  - name: Files
    description: Upload, list, fetch, and delete documents indexed in your workspaces.
  - name: Facets
    description: >-
      Organise documents with hierarchical content types and custom attributes
      per file. Start from starter templates or build your own classification
      schema from scratch.
  - name: Tags
    description: >-
      Manage flat, company-wide labels used to scope search and group content
      across workspaces.
  - name: Workspaces
    description: >-
      Create and manage workspaces — the access-controlled containers your
      documents live in.
  - name: Parse
    description: >-
      Convert documents into structured Markdown — PDFs, images, Office files,
      and HTML. Synchronous endpoint capped at 20 MB / 15 pages.
  - name: Extract
    description: >-
      Pull typed fields out of documents using a JSON Schema you provide. Sync
      mode for small documents (≤20 MB / 15 pages); async mode for larger jobs
      (≤100 MB / 1000 pages) with polling on a job ID.
  - name: API Keys
    description: >-
      Provision and revoke API keys used to authenticate against the Console
      API.
  - name: Models
    description: >-
      List, register, update, and delete custom ML models scoped to your
      company.
paths:
  /api/v3/extract/{job_id}:
    get:
      tags:
        - Extract
      summary: Get the status and result of an async extract job
      description: >-
        Poll for the status and result of an async extract job submitted via
        `POST /api/v3/extract` with `options.async=true`. Returns the same
        envelope shape as the synchronous extract endpoint once `status` is
        `completed`.


        ```bash

        curl https://api.lighton.ai/api/v3/extract/ext_0196e4b2a3c14d5e \
          -H 'Authorization: Bearer $TOKEN'
        ```


        **Pagination:** when completed, `result.data` is paginated with a fixed
        page size of 15. Use the `page` query param (1-based) to navigate;
        `result.pagination` reports `total_items`, `total_pages`, `has_next`,
        `has_prev`.


        **Recommended polling cadence:** 1s for the first 10s, then 5s, capped
        at 30s. Stop polling once `status` is in `{completed, failed}`.
      operationId: api_v3_extract_retrieve
      parameters:
        - in: path
          name: job_id
          schema:
            type: string
          required: true
        - in: query
          name: page
          schema:
            type: integer
            default: 1
          description: >-
            1-based page index for navigating `result.data`. Fixed page size of
            15 items. Returns 400 if the page is out of range.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractJobResponse'
              examples:
                CompletedJob:
                  value:
                    id: ext_0196e4b2a3c14d5e8f7a9b2c1d0e3f4a
                    status: completed
                    created_at: '2026-03-31T10:00:00+00:00'
                    completed_at: '2026-03-31T10:00:04+00:00'
                    processing_time_ms: 3200
                    document:
                      filename: invoice.pdf
                      page_count: 3
                      file_size_bytes: 245120
                      mime_type: application/pdf
                    result:
                      data:
                        - invoice_number: INV-2026-001
                          total: null
                        - invoice_number: null
                          total: 1250
                        - invoice_number: null
                          total: null
                      pagination:
                        page: 1
                        page_size: 15
                        total_items: 3
                        total_pages: 1
                        has_next: false
                        has_prev: false
                    usage:
                      pages_processed: 3
                    progress:
                      percentage: 100
                      pages_processed: 3
                  summary: Completed job
                ProcessingJob:
                  value:
                    id: ext_0196e4b2a3c14d5e8f7a9b2c1d0e3f4d
                    status: processing
                    created_at: '2026-03-31T10:00:00+00:00'
                    completed_at: null
                    processing_time_ms: null
                    document:
                      filename: large-report.pdf
                      page_count: 450
                      file_size_bytes: 5242880
                      mime_type: application/pdf
                    result: null
                    usage: null
                    progress:
                      percentage: 27
                      pages_processed: 120
                  summary: Processing job
                  description: >-
                    A worker is extracting page-by-page. `progress` is the
                    completion percentage [0, 100] so clients can show a
                    determinate progress bar. Keep polling.
                PendingJob:
                  value:
                    id: ext_0196e4b2a3c14d5e8f7a9b2c1d0e3f4b
                    status: pending
                    created_at: '2026-03-31T10:00:00+00:00'
                    completed_at: null
                    processing_time_ms: null
                    document:
                      filename: large-report.pdf
                      page_count: null
                      file_size_bytes: 5242880
                      mime_type: application/pdf
                    result: null
                    usage: null
                    progress: null
                  summary: Pending job
                FailedJob:
                  value:
                    id: ext_0196e4b2a3c14d5e8f7a9b2c1d0e3f4c
                    status: failed
                    created_at: '2026-03-31T10:00:00+00:00'
                    completed_at: '2026-03-31T10:00:05+00:00'
                    processing_time_ms: null
                    document:
                      filename: corrupted.pdf
                      page_count: null
                      file_size_bytes: 102400
                      mime_type: application/pdf
                    result: null
                    usage: null
                    progress: null
                  summary: Failed job
          description: Extract job status (pending, processing, completed, or failed).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                Unauthorized:
                  value:
                    id: null
                    code: 401
                    error: unauthorized
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                    doc_url: https://developers.lighton.ai/errors#unauthorized
          description: Authentication credentials were not provided or are invalid
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                NotFound:
                  value:
                    id: null
                    code: 404
                    error: not_found
                    detail: The requested resource was not found.
                    doc_url: https://developers.lighton.ai/errors#not_found
                  summary: Not Found
          description: The requested resource was not found
      security:
        - bearerAuth: []
components:
  schemas:
    ExtractJobResponse:
      properties:
        id:
          title: Id
          type: string
        status:
          title: Status
          type: string
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          default: null
          title: Created At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          default: null
          title: Completed At
        processing_time_ms:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Processing Time Ms
        document:
          anyOf:
            - $ref: '#/components/schemas/ExtractDocument'
            - type: 'null'
          default: null
        result:
          anyOf:
            - $ref: '#/components/schemas/ExtractResult'
            - type: 'null'
          default: null
        usage:
          anyOf:
            - $ref: '#/components/schemas/ExtractUsage'
            - type: 'null'
          default: null
        progress:
          anyOf:
            - $ref: '#/components/schemas/JobProgress'
            - type: 'null'
          default: null
      required:
        - id
        - status
      title: ExtractJobResponse
      type: object
    APIV3ErrorResponse:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: >-
            Job/resource id when one already exists (useful for async error
            diagnosis); null otherwise.
        code:
          type: integer
          description: HTTP status code
        error:
          type: string
          description: Error code used by the UI as a translation key
        detail:
          type: string
          description: Human-readable error message for developers
        doc_url:
          type: string
          description: Link to the error-code documentation page
      required:
        - code
        - detail
        - doc_url
        - error
        - id
    ExtractDocument:
      properties:
        filename:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Filename
        page_count:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Page Count
        file_size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: File Size Bytes
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Mime Type
      title: ExtractDocument
      type: object
    ExtractResult:
      properties:
        data:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Data
        pagination:
          anyOf:
            - $ref: '#/components/schemas/ExtractPagination'
            - type: 'null'
          default: null
      title: ExtractResult
      type: object
    ExtractUsage:
      properties:
        pages_processed:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Pages Processed
      title: ExtractUsage
      type: object
    JobProgress:
      description: >-
        Live progress of a long-running async job while it is in flight.


        Shared by the parse (``GET /api/v3/parse/<id>``) and extract

        (``GET /api/v3/extract/<id>``) polling envelopes: ``pages_processed`` is
        the

        count of pages done so far and ``percentage`` is the completion
        percentage

        [0, 100] derived from it.
      properties:
        percentage:
          title: Percentage
          type: integer
        pages_processed:
          title: Pages Processed
          type: integer
      required:
        - percentage
        - pages_processed
      title: JobProgress
      type: object
    ExtractPagination:
      properties:
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total_items:
          title: Total Items
          type: integer
        total_pages:
          title: Total Pages
          type: integer
        has_next:
          title: Has Next
          type: boolean
        has_prev:
          title: Has Prev
          type: boolean
      required:
        - page
        - page_size
        - total_items
        - total_pages
        - has_next
        - has_prev
      title: ExtractPagination
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````