TRISMEGISTOS An interdisciplinary portal of papyrological and epigraphical resources
formerly Egypt and the Nile valley (800 BC-AD 800), now expanding to the Ancient World in general

How to cite TM

NEW A guide for first time users

Trismegistos TexRelations Matcher API Documentation

Introduction

The goal of this API is to connect different partner projects working on the Antiquity.

How to use this API

This API has three ways to return data, by default it will return JSON responses with the IDs of related texts. You can however make the API return a URI or XML-formatted response

JSON responses

This is the default way for the API to return data. You can find the API endpoint at the TexRelations section of our Data Services. Unless you provide it with an ID, the response is:


                {
                  "message": "No search string given, please provide valid search parameters.",
                  "more info": "You can find the documentation at https://www.trismegistos.org/dataservices/texrelations/documentation"
                }
              
You can provide IDs by adding a number to the URL; e.g. https://www.trismegistos.org/dataservices/texrelations/9. This search parameter will look for all partner IDs that are related to the TM ID: 9
The provided response is:

[
    {
        "TM_ID": [
            "9"
        ]
    },
    {
        "EDB": null
    },
    {
        "EDH": null
    },
    {
        "EDCS": null
    },
    {
        "EDR": null
    },
    {
        "HE": null
    },
    {
        "UOXF": null
    },
    {
        "RIB": null
    },
    {
        "PHI": null
    },
    {
        "LUPA": null
    },
    {
        "ISic": null
    },
    {
        "IRT": null
    },
    {
        "IGCyR": null
    },
    {
        "Orient": null
    },
    {
        "cisp": null
    },
    {
        "DeM": null
    },
    {
        "PSI": null
    },
    {
        "PapNav-Duke": null
    },
    {
        "Lexicological_lep": null
    },
    {
        "Berliner_papyri": null
    },
    {
        "Bremen_papyri": null
    },
    {
        "chartes": null
    },
    {
        "HispEpOl": null
    },
    {
        "NaBuCCo": null
    },
    {
        "Ashmolion_latin_inscriptions": null
    },
    {
        "PUG": null
    },
    {
        "IIP": null
    },
    {
        "Dresden_papyri": null
    },
    {
        "GVCYR": null
    },
    {
        "Vindolanda": null
    },
    {
        "Ghent_papyri": null
    },
    {
        "Köln_papyri": null
    },
    {
        "DDBDP": [
            "p.adl.;;9"
        ]
    },
    {
        "HGV": [
            "9a",
            "9b"
        ]
    },
    {
        "CACHKaRN": null
    },
    {
        "PapNav-Stanford": null
    },
    {
        "PapNav-Fordham": null
    },
    {
        "PapNav-Berenike": null
    },
    {
        "PapNav-Oslo": null
    },
    {
        "PapNav-Toronto": null
    },
    {
        "PapNav-Lund": null
    },
    {
        "PapNav-Hermitage": null
    },
    {
        "PapNav-Wisconsin": null
    },
    {
        "PapNav-UTS": null
    },
    {
        "PapNav-UPenn": null
    },
    {
        "PSR": null
    },
    {
        "PTS": null
    },
    {
        "PapNav-Perkins": null
    },
    {
        "PapNav-Petra": null
    },
    {
        "PapNav-Princeton": null
    },
    {
        "Achemenet": null
    },
    {
        "tir": null
    },
    {
        "DaSi": null
    },
    {
        "¨PetRaE": null
    },
    {
        "DBMNT": null
    },
    {
        "BritishMuseum-Ostraca": null
    },
    {
        "BritishMuseum-Papyri": null
    },
    {
        "PNCOL": null
    },
    {
        "PapPal": null
    },
    {
        "PapNav-SAC": null
    },
    {
        "PapNav-Pull": null
    },
    {
        "Runenprojekt_Kiel": null
    },
    {
        "Penn_Museum": null
    },
    {
        "SAAO": null
    },
    {
        "CDLI": null
    },
    {
        "OCIANA": null
    }
]              

In the above response you can find all three different datatypes:

In both cases of the above, there was only one TM ID that matched the requested ID. There are however cases where the ID of a parnter can be matched against multiple TM IDs. In this case the API provides only the found TM IDs and a warning as the last key-value pair. This happens when a partner has 1 ID for multiple texts; whereas Trismegistos holds multiple IDs (one per text.). This was a conscious choice to prevent false matches with partners who follow the same or another strategy.

You can see this example for id rom.mil.rec;1;78 from source ddbdp; the API-call for this record is: https://www.trismegistos.org/dataservices/texrelations/rom.mil.rec;1;78?source=ddbdp.

The response given by this source consists of two parts. Firstly it provides all related Trismegistos IDs under the TM key. The second part is a warning message explaining why this may occur.

URI responses

URI (Uniform Resource Identifier) responses are returned by modifying the API call to https://www.trismegistos.org/dataservices/texrelations/uri/, followed by the same way you would perform a request to the default-endpoint. The returned data is a JSON object, which has the same properties as the JSON object returned by the default-endpoint.

XML responses

The API supports XML responses by querying the endpoint at https://www.trismegistos.org/dataservices/texrelations/xml. Unlike the URI and JSON responses this methode does not return 'null' values. Each item that matches your request is presented as the child of a Trismegistos ID. Example:


              <tmid id="93">
                <link cp="DDBDP">p.lond;3;1206</link>
                <link cp="HGV">93</link>
              </tmid>

          

In this case the Trismegistos ID 93 has two children, one where the source is DDBDP and one where the source is HGV. If there are multiple children of a given TM ID from one source, then each child is presented separately. Example:


            <tmid id="745515">
              <link cp="EDCS">67200274</link>
              <link cp="EDCS">67300005</link>
            </tmid>

          

Fair use of this API

Complete list of covered projects

Homepage URL-parameter JSON-Key
Trismegistos None TM
Epigraphic Database Bari edb EDB
Epigraphic Database Heidelberg edh EDH
Epigraphik-Datenbank Clauss / Slaby edcs EDCS
Epigraphic Database Roma edr EDR
Hesperia he HE
Last Statues of Antiquity lsa (see footnote 1) UOXF
Roman Inscriptions of Britain rib RIB
PHI Greek Inscriptions phi PHI
Ubi Erat Lupa lupa LUPA
Inscriptions of Sicily isic ISic
Inscriptions of Roman Tripolitania irt IRT
Inscriptions of Greek Cyrenaica igcyr IGCyR
ERROR IN URL! apd Orient
Celtic Inscribed Stones cisp cisp
The Deir el-Medina Database dem DeM
PSIOnline psi PSI
Papyri.info: Duke collection. duke PapNav-Duke
Lexicon Leponticum lexlep Lexicological_lep
Berliner Papyrusdatenbank berlpap Berliner_papyri
Die Bremer Papyri brempap Bremen_papyri
Chartes.it chartes chartes
Hispania Epigraphica hisp hispEpOl
NaBuCCo NaBuCCo nabucco
Ashmolean Latin Inscriptions ashmolian Ashmolion_latin_inscriptions
Papiri ddell'Università di Genova pug PUG
Inscriptions of Israel / Palestine iip IIP
SLUB Dresden dresden Dresden_papyri
Greek Verse Inscriptions of Cyrenaica gvcyr GVCYR
Vindolanda Tablets Online II vindolanda Vindolanda
Universiteitsbibliotheek Gent ghent Ghent_papyri
Kölner Papyri cologne Köln_papyri
Papyrological Navigator ddbdp DDBDP
HEIDELBERGER GESAMTVERZEICHNIS DER GRIECHISCHEN PAPYRUSURKUNDEN ÄGYPTENS hgv HGV
Cachette de Karnak cachkarn CACHKaRN
Papyrological Navigator: Stanford stanford PapNav-Stanford
Papyrological Navigator: Fordham fordham PapNav-Fordham
Papyrological Navigator: Berenike berenike PapNav-Berenike
Papyrological Navigator: Oslo oslo PapNav-Oslo
Papyrological Navigator: Toronto toronto PapNav-Toronto
Papyrological Navigator: Lund lund PapNav-Lund
Papyrological Navigator: Hermitage hermitage PapNav-Hermitage
Papyrological Navigator: Wisconsin wisconsin PapNav-Wisconsin
Papyrological Navigator: UTS uts PapNav-UTS
Papyrological Navigator: UPENN upenn PapNav-UPenn
Papyrological Navigator: PSR psr PSR
Papyrological Navigator: PTS pts PTS
Papyrological Navigator: Perkins perkins PapNav-Perkins
Papyrological Navigator: Petra petra PapNav-Petra
Papyrological Navigator: Princeton princeton PapNav-Princeton
ACHEMENET achemenet Achemenet
Thesaurus Inscriptionum Raeticarum tir tir
Digital Archive for the Study of pre-Islamic Arabian Inscriptions dasi DaSi
PETRAE petrae PetRaE
Database of Medieval Nubian Texts dbmnt DBMNT
Papyri.info: Columbia pncol PNCOL
PapPal pappal PapPal
Papyri.info: Sacramentos pnsac PapNav-SAC
Papyri.info: Pullman pnpull PapNav-Pull
Runenprojekt Kiel runenprojekt Runenprojekt_Kiel
Penn Museum penn Penn_Museum
State Archives of Assyria Online (URI's not working) saao SAAO
Cuneiform Digital Library Initiative cdli CDLI
Online Corpus of the Inscriptions of Ancient North Arabia ociana OCIANA
österreichische Nationalbibliothek onb ONB
Das Altägyptische Totentbuch tbp TBP
Earlier Latin Manuscripts cla CLA
Goskatalog goskatalog Goskatalog
DCLP dclp DCLP
New Testament Virtual Manuscript Room ntvmr NTVMR
FerCan fercan FerCan
The Leon Levy Dead Sea Scrolls Digital Library dss DSS
The Center For The Study of New Testament Manuscripts csntm CSNTM
Metropolitan Museum of Art themet MET
Institut de Papyrologie de la Sorbonne sorbonne Sorbonne
Spurlock Museum of World Cultures at ILLINOIS spurlock Spurlock
e-codices ecodices E-Codices
British Museum: Papyrus collection bm BritishMuseum
MertensPack mertenspack MertensPack
RuneS runes RuneS

Notes

1) LSA remark: Searching for an LSA resource requires the use of a padded integer; so to find the records related to LSA-23, the searchvalue needs to be: LSA-0023. The total length of the padded integer needs to be 4, so IDs starting from 1000 and up won't need padding.

Word of thanks

Special thanks goes to Pietro Liuzzo who hosted a eXist-db solution during the development of the Trismegistos TexRelations API and gave access to his XML files.

We also wish to thank our partner projects for providing open access to their data and the entire Trismegistos team for adding new matches to this database on a daily basis.

Report mistakes & bug reports.

Thank you for taking the time to report bugs or mistakes. To help us fix the issue please provide the following details: