---
title: "Retrieve page spatial data"
method: GET
path: "/api/v1/annotations/{annotationID}/page_data"
tags: ["Annotation"]
---

# Retrieve page spatial data

`GET /api/v1/annotations/{annotationID}/page_data`

Get text content for every page, including position coordinates, considering granularity options like lines, words,
characters, or complete page text content.

## Path parameters

- `annotationID` integer, required

## Query parameters

- `page_numbers` string
- `granularity` 'words' | 'lines' | 'chars' | 'texts' | 'barcodes', required

## Response `200`

Spatial data retrieved successfully

- object
  - `results` object[] — Array of page results
    - `page_number` integer — Page number
    - `granularity` string — Granularity level of the data
    - `items` object[] — Text items with spatial data
      - `text` string — Extracted text content
      - `position` integer[] — Coordinates of the item on the given page. In case of `texts` granularity, the result items objects are missing `position` key, since the `text` value is the full page text.
      - `type` string — Type of barcode. This value is present only for granularity `barcodes`.

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

[API](https://skmtc.dev/rossum/apis/rossum-api.md) · [All operations](https://skmtc.dev/rossum/apis/rossum-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rossum/rossum-api/revisions/f1b5a910991d/schema)
