API Documentation


Since 2018 the WeGA webpages are served only through encrypted https. Requests made via http are redirected to https. Hence, the following URLs in the examples are compatible with both protocols.

Output Formats and Content Negotiation

Several output formats are made available for every resource via content negotiation. At present, HTML, TEI-XML, JSON-LD and Plain Text are supported and you can request the desired format by either adding the appropriate file extension or by specifying the HTTP Accept Header. If both are given, the suffix takes precedence. NB: The plain text output is considered an experimental feature!

Format Suffix Accept Header
HTML .html, .htm text/html, application/xhtml+xml
TEI XML .tei, .xml application/xml, application/tei+xml
Plain Text .txt text/plain
JSON-LD .jsonld application/ld+json

The persistent URL of every resource is composed of the domain “weber-gesamtausgabe.de” and its ID.

Examples with curl

# curl -L https://weber-gesamtausgabe.de/A002068.xml
# curl -L https://weber-gesamtausgabe.de/A002068.html
# curl -L -H "Accept: text/html" https://weber-gesamtausgabe.de/A002068
# curl -L -H "Accept: application/xml" https://weber-gesamtausgabe.de/A002068

Please note that you’ll need the -L switch since most requests will be redirected.

TEI Output Formats

When requesting a TEI XML document (see Content Negotiation above) the default output format is our WeGA TEI format. This format is a “TEI-Customization” and documented at https://github.com/Edirom/WeGA-ODD. Alternatively, you can request more standard formats via the URL parameter format; at present, “TEI all” (format=tei_all) and “TEI simplePrint” (format=tei_simplePrint) are supported.

Examples with curl

# curl -L "https://weber-gesamtausgabe.de/A002068.xml?format=tei_all"
# curl -L -H "Accept: application/xml" "https://weber-gesamtausgabe.de/A002068?format=tei_simplePrint"

Requesting GND IDs

The WeGA API supports requests made via GND IDs for the types “Person” (formerly PND), “Organisation/Institution” (formerly GKD), and “Work”. Additionally, BEACON files are provided for these types at https://weber-gesamtausgabe.de/pnd_beacon.txt, https://weber-gesamtausgabe.de/gkd_beacon.txt, and https://weber-gesamtausgabe.de/works_beacon.txt. Requests can be made by appending a valid GND ID to the base address at https://weber-gesamtausgabe.de/en/gnd/.

Examples with curl

# curl -L https://weber-gesamtausgabe.de/en/gnd/118629662
# curl -L -H "Accept: application/tei+xml" https://weber-gesamtausgabe.de/en/gnd/118629662

Detailed information about the BEACON format can be found at https://meta.wikimedia.org/wiki/Dynamic_links_to_external_resources .

Correspondence Metadata Interchange-Format (CMIF)

Since 2014 the WeGA provides metadata about its correspondence corpus as Correspondence Metadata Interchange-Format (CMIF). The URL of the BEACON-file is https://weber-gesamtausgabe.de/correspDesc.xml.

Detailed information about the CMIF can be found at the correspSearch Webservice and at the TEI Correspondence SIG GitHub page .

International Image Interoperability Framework (IIIF)

The WeGA provides access to the images—for which we have permission to do so—via the IIIF standard . Metadata for the images (info.json) are created automatically by our Digilib image server and the “Resource Structure” for the IIIF Presentation API (manifest.json) is generated fom the TEI documents by the WeGA-WebApp.

The persistent URL of every resource is composed of the domain “weber-gesamtausgabe.de” and the path “/IIIF/$ID/manifest.json”.

Examples with curl

# curl -L https://weber-gesamtausgabe.de/de/gnd/118629662
# curl -L -H "Accept: application/application/json" https://weber-gesamtausgabe.de/IIIF/A040709/manifest.json

Swagger OpenAPI

The WeGA offers a dedicated RESTful interface at https://weber-gesamtausgabe.de/api/v1/ in compliance with the Swagger OpenAPI Specification 2.0 . This interface shall provide for fast and comfortable discovery of documents from the digital edition.


If you've spotted some error or inaccurateness please do not hesitate to inform us via bugs [@] weber-gesamtausgabe.de.