# Retrieve an OCR request
URL: https://docs.munito.ai/api/getOcr

GET /ocr/{request_id}

Returns the state of an OCR request: `running` with the pages that are done, then `completed` with the full result (including document_annotation when requested), or `failed`, `cancelled` or `timed_out`.

```json
{
  "operationId": "getOcr",
  "summary": "Retrieve an OCR request",
  "tags": [
    "OCR"
  ],
  "description": "Returns the state of an OCR request: `running` with the pages that are done, then `completed` with the full result (including document_annotation when requested), or `failed`, `cancelled` or `timed_out`.",
  "parameters": [
    {
      "name": "request_id",
      "in": "path",
      "required": true,
      "description": "The request id from the `location` of the 202 answer.",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "The request state, and the result when it is `completed`.",
      "content": {
        "application/json": {
          "example": {
            "request_id": "5f0c2b8e-3a4d-4c61-9f27-0b8d1e6a7c42",
            "status": "running",
            "total": 12,
            "completed": 5,
            "pages": []
          }
        }
      }
    },
    "404": {
      "description": "No OCR request with this id exists in your workspace."
    }
  }
}
```

# Shared API schemas
{
  "securitySchemes": {
    "BearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "description": "Your Munito API key."
    },
    "ApiKeyAuth": {
      "type": "apiKey",
      "in": "header",
      "name": "x-api-key",
      "description": "Your Munito API key."
    }
  }
}