The corpus API serves the texts themselves. Give it any SCTA id (a work, a book, a question, a paragraph, or one witness of any of them) and it returns the text, paragraph by paragraph, each paragraph with its own id. It also gives the structure of a work and searches the whole corpus.
Base URL: https://scta.info/api/corpus/v1. No account or key. Every route is listed, with its parameters and a
"Try it out" button, in the interactive reference at
scta.info/api/corpus/v1/docs.
Texts: /texts/{id} #
curl 'https://scta.info/api/corpus/v1/texts/l1-cpspfs?format=txt'
{id} can be:
- an expression (a work or any part of it, down to a paragraph:
plaoulcommentary,lectio1,l1-cpspfs): its default text, from the edition the SCTA marks as canonical; - a manifestation (
lectio1/reims) or a transcription (lectio1/reims/transcription): the text of that witness; - a segment (
l1-cpspfs@1-8): a run of words within a paragraph, counted from 1, both ends included. Search results and the MCP server give their hits as segments, so a citation can point to the exact words.
| Parameter | Values | Default |
|---|---|---|
format |
json, csv, txt, xml (the TEI itself) |
json, or what the Accept header asks for |
quotes |
include, exclude (leave out the words of quotations) |
include |
punctuation |
keep, strip |
keep |
The text is the reading text of the edition: apparatus readings, notes, bibliographic references and line breaks are left out. JSON gives the units in reading order:
{"id": "lectio1", "type": "expression", "toplevel": "plaoulcommentary",
"transcription": "lectio1/critical/transcription",
"units": [{"id": "l1-cpspfs", "item": "lectio1", "transcription": "...", "text": "Circa prologum Sententiarum ..."}]}
A whole work comes back in one answer (/texts/plaoulcommentary?format=csv). For many works at once, the
corpus on Hugging Face is faster.
Structure: /nav/{id} #
Where a resource sits and what it contains: its title, what it is part of, its parts in order, and links to their texts.
curl 'https://scta.info/api/corpus/v1/nav/plaoulcommentary'
children=parts (the default) gives the direct parts; children=items every question or lecture of a work at
once; children=expressions every work of a work group (/nav/scta lists them all).
Search: /search #
Full-text search of the canonical text of every paragraph in the archive.
curl 'https://scta.info/api/corpus/v1/search?q="potentia absoluta"&author=peter-plaoul&facets=work'
q: words (all must occur),"a phrase",prefix*,OR,NOT,NEAR(a b, 5). Spelling is normalized, sovelfindsuelandcaelumfindscelum.- Filters (each repeatable):
author(peter-plaoul),workGroup(sententiae),within(a work, any part of one, or a paragraph),expressionType(liber1-distinctio17). target=questionssearches the titles of questions and articles instead of the text, to find where a topic is treated.facets: counts byauthor,work,workGroup,question,expressionType, orwithin(the parts one level below a singlewithin).sort(relevanceortext, the order of the texts),limit,offset,context(words shown around each hit).
Each result is a paragraph, with its work, author and question, and each hit as a segment id that /texts reads
back:
{"id": "ppr-l123-cqsinn", "work": {"id": "plaoulreportatio", "title": "Reportatio Sentences Commentary"},
"item": {"id": "ppr-lectio123", "title": "Lectio 123, de Libertate"},
"hits": [{"id": "ppr-l123-cqsinn@13-14", "before": "aliter redemisse genus humanum de",
"hit": "potentia absoluta", "after": "nisi per mortem patet quia"}]}
The index is rebuilt every morning from the texts on GitHub.
Views: /views/{name}/{id} #
A view is a prepared conversion of the TEI into a shape an application can use directly. /views lists them.
The first is tree, the TEI as a JSON tree of elements and text, which the LombardPress Reader and
LombardPress Components use to display a text with its markup.
Also #
?resource=: every route also takes the resource as a parameter, as an id or a full IRI (/texts?resource=http://scta.info/resource/lectio1), for clients that hold IRIs.- Where the text is on the page: the lines API gives, for a paragraph or a segment in one witness, the lines of the manuscript that carry it.
- Older URLs: the text routes of exist.scta.info (
.../scta-app/csv/{id},csv-canonical.xq,tei-to-json.xq) still answer, unchanged, for the clients that use them. New clients should use this API.