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

# Get Run Status and Result

> Poll an async AI run for its status and retrieve results when complete. Returns the current status of the run, and if the run is done, includes the extracted data or reconciliation results.

<Note>
  **This is step 3 of 3** in the async run pattern. Poll this endpoint using the `run_id` returned by [Start AI Run](/api-reference/tables/request-starts-the-analyze-process-for-a-table) until `status` is `done` or `error`.

  See the full [async run pattern guide](/concepts/async-run-pattern) for a complete working example with a polling loop.
</Note>

## Run status values

| Status    | Meaning                                                     |
| --------- | ----------------------------------------------------------- |
| `pending` | Queued, not yet started                                     |
| `running` | AI is actively processing                                   |
| `done`    | Complete — `data` field is populated with extracted results |
| `error`   | Processing failed                                           |

## Polling example

```python Python theme={null}
import time, requests

while True:
    result = requests.get(
        "https://api.cloudsquid.io/api/projects/my-project/tables/TABLE_ID/run/RUN_ID",
        headers={"X-API-Key": "YOUR_API_KEY"}
    ).json()

    if result["status"] == "done":
        print(result["data"])
        break
    elif result["status"] == "error":
        raise RuntimeError("Extraction failed")

    time.sleep(3)
```

A poll interval of 2–5 seconds is appropriate for most workloads.


## OpenAPI

````yaml get /projects/{project_name}/tables/{table_id}/run/{run_id}
openapi: 3.0.3
info:
  title: Cloudsquid
  description: This is the backend of cloudsquid specification
  termsOfService: cloudsquid.io
  contact:
    email: info@cloudsquid.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.11
servers:
  - url: https://api.cloudsquid.io/api
    description: API
security:
  - api-key: []
paths:
  /projects/{project_name}/tables/{table_id}/run/{run_id}:
    parameters:
      - name: project_name
        in: path
        required: true
        description: the name of the project
        schema:
          type: string
      - name: table_id
        in: path
        required: true
        description: the ID of the table
        schema:
          type: string
          format: uuid
      - name: run_id
        in: path
        required: true
        description: the ID of the run
        schema:
          type: string
          format: uuid
    get:
      tags:
        - tables
      summary: Get AI Run Status & Result
      description: Gets the status of the file and if the run is done, the result.
      responses:
        '200':
          description: Successfully got status of the file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataRow'
        '400':
          description: Bad or malformed request
        '401':
          description: Unauthorized
components:
  schemas:
    DataRow:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Data'
        created_at:
          type: string
          format: date-time
        reasoning:
          type: string
        row_id:
          type: string
          format: uuid
        review:
          $ref: '#/components/schemas/Review'
        status:
          $ref: '#/components/schemas/RunStatus'
        input:
          $ref: '#/components/schemas/AgentJobInput'
      required:
        - data
        - row_id
        - created_at
    Data:
      type: object
      additionalProperties:
        oneOf:
          - type: string
          - type: boolean
          - type: number
          - type: array
            items:
              oneOf:
                - type: string
                - type: boolean
                - type: number
      description: >-
        Object with direct values for each key, allowing single values or arrays
        of values.
    Review:
      type: object
      properties:
        approved:
          type: boolean
          description: Whether it is approved or not
        comment:
          type: string
          description: review comment
        reviewed_by:
          type: string
          description: Email of the user who reviewed it
        review_date:
          type: string
          format: date-time
      required:
        - comment
        - reviewed_by
        - review_date
    RunStatus:
      type: string
      description: status of the AI run
      enum:
        - running
        - done
        - error
        - pending
    AgentJobInput:
      type: object
      properties:
        files:
          type: array
          description: Filesystem object references
          items:
            $ref: '#/components/schemas/AgentJobFilesystemObject'
        data:
          description: Arbitrary data payload
          type: object
          additionalProperties: true
      required:
        - data
    AgentJobFilesystemObject:
      type: object
      properties:
        id:
          type: string
          format: uuid
      required:
        - id
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key

````