Open data
Data & downloads
Every finished page is published with its text, region boxes and provenance.
Downloads are public: no account, no key, and readable from any website
(Access-Control-Allow-Origin: *).
Per-item files carry ETag
and Last-Modified, so re-fetching an
unchanged item costs a 304.
Downloads
| URL | Format |
|---|---|
| /items/<id>/pages.jsonl | JSON Lines, one glam_scribe.page/2 record per finished page, in canvas order |
| /items/<id>/text.txt |
Plain text (UTF-8), each page headed --- label ---
|
| /items/<id>/annotations.json |
W3C Web Annotation AnnotationCollection of all OCR text
|
| /collections/<slug>/pages.jsonl |
Every finished page of a collection (same records), regenerated
every few minutes while the collection changes; also .jsonl.gz. Supports byte ranges for
resuming; answers 202
with Retry-After
while a first export is prepared, and 429
past two
downloads at a time per client.
|
| /iiif/items/<id>/manifest.json | IIIF Presentation 3 manifest with the OCR on each canvas |
| /iiif/items/<id>/canvas/<n>/annotations.json | One canvas's IIIF AnnotationPage |
| /schema/glam_scribe.page.v2.json | JSON Schema (2020-12) of the record |
# one item
curl -O https://glamscribe.com/items/ITEM_ID/pages.jsonl
# only lines with text, with jq
curl -s https://glamscribe.com/items/ITEM_ID/pages.jsonl | jq -r 'select(.text != "") | .text'
# revalidate: 304 if nothing changed
curl -s -o /dev/null -w "%{http_code}\n" -H 'If-None-Match: "ETAG"' https://glamscribe.com/items/ITEM_ID/pages.jsonl
The record: glam_scribe.page/2
One JSON object per finished page. Every key is always present; unknown values are
null
(or an empty list). New keys may be added within version 2; renaming or
removing one makes a version 3.
| Key | Type | Meaning |
|---|---|---|
| schema | string | Always "glam_scribe.page/2". |
| record_id | string | "<item_id>/<canvas_index>", stable for a page. |
| item_id | string | GlamScribe item id (the Figgy UUID for Figgy manifests). |
| item_label | string | null | The item's title. |
| manifest_url | string | GlamScribe's IIIF manifest for the item, with the OCR as annotations. |
| canvas_id | string | The page's canvas in GlamScribe's manifest. |
| canvas_index | integer | 0-based position of the page in the item. |
| canvas_label | string | null | Canvas label, e.g. a folio or page number. |
| image_service | string | null | IIIF Image API base URL of the page image. |
| width, height | integer | null | Full-resolution image size in pixels. |
| text | string | Reading text: region texts in reading order, separated by blank lines, page numbers removed. |
| text_sha256 | string | Lowercase hex SHA-256 of text (UTF-8). |
| languages | string[] | BCP 47 tags from the catalog language (empty when unknown). |
| language_name | string | null | The catalog language as written. |
| scripts | string[] | ISO 15924 script codes, e.g. Latn, Grek, Hebr. |
| regions | object[] | Layout regions in reading order (below). |
| provenance | object | What produced the result (below). |
| created_at, updated_at | string | ISO 8601 UTC timestamps (page added; result last changed). |
Regions
| Key | Type | Meaning |
|---|---|---|
| id | string | "r<order>", unique within the record. |
| bbox | [x, y, w, h] | Integers, full-resolution pixels, origin top-left. |
| label | string | null | Layout class: text, title, header, footer, page_number, table, figure, caption, page, … |
| order | integer | 0-based reading order. |
| text | string | null | Region text; null for figures, or when the page was read whole (then see text). |
| confidence | number | null | exp(mean token log-probability) of the kept reading, 0–1, when the model reports it. |
| layout_score | number | null | The layout detector's score. |
| model | string | null | The model that read the region. |
Provenance
An allowlist: no volunteer names, tokens or other personal data are ever published.
| Key | Type | Meaning |
|---|---|---|
| pipeline | string | null | "volunteer:<pipeline>" when read by a volunteer. |
| worker_type | string | null | browser (the volunteer page), cli (the command-line worker), coordinator (the server), or null. |
| models | string[] | Recognition models used. |
| layout_model | string | null | Layout detector. |
| runtime, client | string | null | Browser runtime, or command-line worker version. |
| route | object | null | The page router's decision: pipeline, reason, scripts, language, rotate, layout, table_kind, material, has_text. |
| contributions | integer | null | Agreeing volunteer readings behind the result. |
| elapsed_ms | integer | null | Time spent reading the page. |
Coordinates
bbox is [x, y, w, h]: the top-left corner, width and height,
as integers, in full-resolution pixels of image_service, with the origin at the
top-left of the unrotated image. That is the IIIF Image API region order and the canvas's
own pixel space, so a region can be fetched or targeted directly:
image: <image_service>/x,y,w,h/full/0/default.jpg target: <canvas>#xywh=x,y,w,h
IIIF manifest & annotations
Each item has a IIIF Presentation 3 manifest forked from its source (Presentation 2
sources are converted): the same canvases and images, the source's label, metadata and
rights, and on each canvas an AnnotationPage
of supplementing
annotations — one plain-text TextualBody
per region, targeting canvas#xywh=…, with a language
when the catalog names one. Pages read whole get one annotation on the whole canvas.
Open it in any IIIF viewer; the item page has an “Open in Clover” link.
The institution the source manifest comes from is credited in the manifest's
metadata
as “Contributing institution” (its name and web domain). In the JSON Lines records,
manifest_url
is this manifest and canvas_id
its canvas.
Requesting manifests
Anyone may ask for a IIIF manifest from a library, archive or museum (an
https
address on a public website) to be read, from the request page, or as JSON with the same checks and limits (no token needed).
A request for a library we haven't approved yet waits, and nothing is fetched from it,
until we approve that library. A 422
names the problem with each field; a 429
says how many seconds to wait (also in Retry-After).
Collaborators with a command-line token from us can send it as
Authorization: Bearer …
for a much higher limit.
# ask: 201 {"id", "status": "pending" | "queued" | "failed" | "rejected", "institution", "item", "status_url", ...}
curl -s -X POST https://glamscribe.com/api/v1/manifest_requests \
-H 'content-type: application/json' \
-d '{"url": "https://collections.library.yale.edu/manifests/2002826", "note": "optional, for us"}'
# check on it later: "queued" once the item exists ("item": {"id", "label", "url"})
curl -s https://glamscribe.com/api/v1/manifest_requests/REQUEST_ID
Licensing
License to be decided. The images and catalog metadata belong to their holding
institutions under the rights stated in each source manifest (carried into our manifest as
rights
/ requiredStatement). Please credit GlamScribe and the source collection.