# Get a document (/reference/api/documents/get-document)

```json
[
  {
    "method": "GET",
    "path": "/api/v1/documents/{id}",
    "operationId": "getDocument",
    "tags": [
      "Documents"
    ],
    "summary": "Get a document",
    "description": "Returns metadata and whether the document is ready to read. This read starts no work and does not change recent activity.",
    "x-required-scope": "documents:read",
    "security": [
      {
        "oauth": [
          "documents:read"
        ]
      },
      {
        "sessionCookie": []
      },
      {
        "secureSessionCookie": []
      }
    ],
    "responses": {
      "200": {
        "description": "Document; this read does not open the reader or create playback plans.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Document"
            }
          }
        }
      },
      "429": {
        "description": "Compute admission or usage is limited.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds until retry.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        }
      },
      "default": {
        "description": "Request failed. Inspect error.code and error.message.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
]
```

## Components

```json
{
  "#/components/schemas/Document": {
    "allOf": [
      {
        "$ref": "#/components/schemas/DocumentMetadata"
      },
      {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "not_started",
              "processing",
              "ready",
              "failed",
              "unknown"
            ],
            "description": "not_started: a PDF has not been parsed yet and reading or generating will start it. unknown: the compute worker could not be reached; retry."
          },
          "operationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "webUrl": {
            "type": "string",
            "format": "uri"
          },
          "fileUrl": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "operationId",
          "error",
          "webUrl",
          "fileUrl"
        ]
      }
    ]
  },
  "#/components/schemas/DocumentMetadata": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      },
      "name": {
        "type": "string"
      },
      "size": {
        "type": "integer"
      },
      "lastModified": {
        "type": "number"
      },
      "type": {
        "type": "string",
        "enum": [
          "pdf",
          "epub",
          "docx",
          "html"
        ]
      },
      "scope": {
        "type": "string",
        "enum": [
          "user"
        ]
      },
      "folderId": {
        "type": "string"
      },
      "recentlyOpenedAt": {
        "type": "number"
      },
      "contentVersion": {
        "type": "string"
      },
      "author": {
        "type": "string"
      },
      "language": {
        "type": "string"
      },
      "readingProgress": {
        "type": "object",
        "properties": {
          "fraction": {
            "type": [
              "number",
              "null"
            ]
          },
          "updatedAtMs": {
            "type": "number"
          }
        },
        "required": [
          "fraction",
          "updatedAtMs"
        ]
      }
    },
    "required": [
      "id",
      "name",
      "size",
      "lastModified",
      "type"
    ]
  },
  "#/components/schemas/Error": {
    "type": "object",
    "properties": {
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryAfterMs": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "code",
          "message"
        ]
      }
    },
    "required": [
      "error"
    ]
  }
}
```