The lines API connects the texts to the pages that carry them. For the manuscripts and printed editions whose line positions the SCTA has, it gives each line's box on the page image (IIIF), its transcribed text, and which words of which paragraph are on it; and the other way round, where a paragraph, or a range of its words, is on the pages of a witness.
Base URL: https://scta.info/api/lines/v1. No account or key. Every route is in the interactive reference at
scta.info/api/lines/v1/docs. Answers are JSON; boxes are [x, y, w, h] in the
coordinates of the IIIF canvas, and every line comes with a link to its cropped image.
Ids #
- A codex by its SCTA id:
cod-d04s02,reims. - A page (surface) as
<codex>/<page>:cod-d04s02/2r. - A line as
<codex>/<page>/<n>:cod-d04s02/2r/1, wherenis the line's number in the transcription. - A paragraph in one witness as
<paragraph>/<witness>, and some of its words as<paragraph>/<witness>@<first>-<last>, counting words as the corpus API does.
Routes #
| Route | What |
|---|---|
/codices |
Every codex, with its pages and lines, and how many lines are matched to a transcription. |
/codices/{codex} |
A codex's pages in order, with their line counts, and the items it carries. |
/surfaces/{codex}/{page} |
A page: its canvas and image, and every line (box, text, image). |
/lines/{codex}/{page}/{n} |
One line: box, text, image, the words of each paragraph on it, the lines before and after. |
/lines/{codex}/{page}/{n}/image |
A redirect to the IIIF image of the line; through= for several lines, width= to scale. |
/zones/{paragraph}/{witness} |
Where a paragraph is on the pages of a witness: runs of lines, each with its box and image. With @first-last, only those words. With the paragraph id alone, the witnesses that have lines. |
/search?q=&codex= |
Lines whose text matches, in page order, each with its box and image. |
/codices/{codex}/report |
Where the transcription and the page geometry disagree: a to-do list for editors. |
curl 'https://scta.info/api/lines/v1/lines/cod-d04s02/2r/1'
{"id": "cod-d04s02/2r/1", "n": 1, "column": "a", "box": [227, 131, 617, 52],
"text": "ri non nisi sept uaginta duorum discipu",
"image": "https://loris2.scta.info/cod-d04s02/2r.jpg/207,111,657,92/full/0/default.jpg",
"canvas": "https://scta.info/iiif/cod-d04s02/canvas/2r",
"words": [{"paragraph": "ddsliv-b1omap-d1e483", "witness": "cod-d04s02", "first": 143, "last": 149,
"segment": "ddsliv-b1omap-d1e483/cod-d04s02@143-149"}],
"previous": "cod-d04s02/1v/104", "next": "cod-d04s02/2r/2"}
pad= (image pixels) widens every crop.
Coverage #
Every codex in the SCTA is listed, but lines exist only for those whose line positions have been recorded
(/codices marks them coordinates: true); the others have their pages and images only. The coordinates are published, without text, in scta/scta-coordinates; the
text of each line comes from the witness's transcription in scta-texts. Both are
read again every night.
In IIIF viewers #
The same line data feeds the IIIF manifests under https://scta.info/api/iiif/v2/: their annotation lists
mark every line on the page with its text, and each manifest has a IIIF search service. In Mirador, for example,
https://scta.info/api/iiif/v2/ddsliv/cod-d04s02/manifest shows the lines and finds words on the pages.
For a language model, the MCP server's get_line_image gives the same: the image of a line, a few lines,
or a paragraph in a witness, with the text of each line.