Developer API

Programmatic access to the Premodern Concordance.

The API is under development.

The concordance data is currently available as a static JSON file at /data/concordance.json. A REST API with filtering, pagination, and semantic search is planned.

Data Schema

{
  "metadata": { "created": "...", "threshold": 0.84 },
  "books": [
    { "id": "...", "title": "...", "author": "...", "year": 1652, "language": "English" }
  ],
  "stats": { "total_clusters": 1491, "by_category": { ... } },
  "clusters": [
    {
      "id": 1,
      "canonical_name": "Mercury",
      "category": "SUBSTANCE",
      "book_count": 4,
      "total_mentions": 87,
      "members": [ { "book_id": "...", "name": "...", "count": 12, ... } ],
      "edges": [ { "source_book": "...", "target_book": "...", "similarity": 0.94 } ]
    }
  ]
}

Planned Endpoints

GET
/api/clusters

List all clusters with optional category and book filters.

Coming soon
GET
/api/clusters/:id

Retrieve a single cluster by ID, including members and edges.

Coming soon
GET
/api/books

List all books in the corpus with metadata.

Coming soon
GET
/api/search

Semantic search across clusters using text-embedding-3-small.

Coming soon

Questions or feature requests? Open an issue on GitHub.