# Get the open reader (/reference/api/reader/get-reader)

```json
[
  {
    "method": "GET",
    "path": "/api/v1/reader",
    "operationId": "getReader",
    "tags": [
      "Reader"
    ],
    "summary": "Get the open reader",
    "x-required-scope": "reader:read",
    "security": [
      {
        "oauth": [
          "reader:read"
        ]
      },
      {
        "sessionCookie": []
      },
      {
        "secureSessionCookie": []
      }
    ],
    "responses": {
      "200": {
        "description": "The open reader view that is sharing (source live), else the last document opened and its saved position (source saved).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ReaderContext"
            }
          }
        }
      },
      "403": {
        "description": "READER_NOT_SHARED: the user keeps their books from connected apps.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "READER_EMPTY: the user has not opened a document yet.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "409": {
        "description": "READER_NEEDS_APPROVAL: the user has not chosen whether to share their reader with connected apps. The call asked them in any open OpenReader page and waited up to a minute; ask them to answer there, then try again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "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"
            }
          }
        }
      }
    },
    "description": "A reader view shares its live state only while an app the user approved holds a reader scope. A book is shared when its own setting says so, else by the user's default; until the user has chosen that default, the first call asks them. A document the user keeps from connected apps never appears, live or saved. Live state is kept briefly while OpenReader stays open and is never stored in the database."
  }
]
```

## Components

```json
{
  "#/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"
    ]
  },
  "#/components/schemas/ReaderContext": {
    "type": "object",
    "properties": {
      "source": {
        "type": "string",
        "enum": [
          "live",
          "saved"
        ]
      },
      "open": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "reader",
          "library",
          null
        ],
        "description": "What an open OpenReader tab shows: a shared book (reader), the library or another page (library), or nothing an app may see (null)."
      },
      "document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "pdf",
              "epub",
              "docx",
              "html"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ]
      },
      "segmentKey": {
        "type": [
          "string",
          "null"
        ],
        "description": "The sentence the reader is at. Pass it as at= on a reader URL to open there."
      },
      "segmentOrdinal": {
        "type": [
          "integer",
          "null"
        ]
      },
      "page": {
        "type": [
          "integer",
          "null"
        ],
        "description": "The PDF page shown; null for other formats and saved state."
      },
      "sentence": {
        "type": [
          "string",
          "null"
        ],
        "description": "Text of the sentence the reader is at; live state only."
      },
      "selection": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 2000,
        "description": "Text the user has selected; live state only."
      },
      "playback": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "playing",
          "paused",
          "preparing",
          null
        ],
        "description": "Live state only."
      },
      "progress": {
        "type": [
          "number",
          "null"
        ],
        "description": "Saved reading progress from 0 to 1; saved state only."
      },
      "updatedAt": {
        "type": [
          "number",
          "null"
        ]
      },
      "webUrl": {
        "type": "string",
        "format": "uri",
        "description": "Opens the reader at this position."
      }
    },
    "required": [
      "source",
      "open",
      "document",
      "segmentKey",
      "segmentOrdinal",
      "page",
      "sentence",
      "selection",
      "playback",
      "progress",
      "updatedAt",
      "webUrl"
    ]
  }
}
```