Skip to content

Corpus information ​

Return the corpus metadata, including size, document format, annotated and metadata fields, status and more.

URL : /blacklab-server/corpora/<corpus-name>

Method : GET

Parameter Description
limitvalues Maximum number of values to return for fields. Default: 200
listvalues Annotations to list the values for. Default: none
listmetadatavalues Metadata fields to list the values for. Default: all
custom (API v5) Whether to include custom properties like displayName, description, etc. Default: false

Success Response ​

HTTP response code: 200 OK

Content examples ​

Response for /blacklab-server/corpora/BaB?custom=true (API v5):

jsonc
// API v5: /blacklab-server/corpora/parlamint/
{
  "corpusName": "parlamint",
  "custom": {
      "displayName": "ParlaMint BE federaal",
      "description": "Corpus van Parlementaire zittingen"
  },
  "status": "available",
  "contentViewable": true,
  "documentFormat": "parlamint-saxon",
  "count": {
    "tokens": 50672559,
    "documents": 2349
  },
  "versionInfo": {
    "blacklabBuildTime": "2025-03-20T12:32:20Z",
    "blacklabVersion": "4.0.0-SNAPSHOT",
    "blacklabScmRevision": "7efeb8d",
    "indexFormat": "4",
    "timeCreated": "2025-04-29 11:44:20",
    "timeModified": "2025-04-29 11:44:20"
  },
  "pidField": "pid",
  "mainAnnotatedField": "contents",
  "annotatedFields": {
    "contents": {
      "fieldName": "contents",
      "isAnnotatedField": true,
      "count": {
        "tokens": 50672559,
        "documents": 2349
      },
      "custom": {
        "displayName": "Contents",
        "description": "Contents of the documents."
      },
      "hasContentStore": true,
      "mainAnnotation": "word",
      "annotations": {
        "word": {
          "custom": {
            "displayName": "Word"
          },
          "hasForwardIndex": true,
          "sensitivity": "SENSITIVE_AND_INSENSITIVE",
          "offsetsAlternative": "s",
          "isInternal": false
        },
        "lemma": {
          "custom": {
            "displayName": "Lemma"
          },
          "hasForwardIndex": true,
          "sensitivity": "SENSITIVE_AND_INSENSITIVE",
          "offsetsAlternative": "",
          "isInternal": false
        },
        "pos": {
          "custom": {
            "displayName": "Part of speech"
          },
          "hasForwardIndex": true,
          "sensitivity": "ONLY_INSENSITIVE",
          "offsetsAlternative": "",
          "isInternal": false
        }
      }
    }
  },
  "metadataFields": {
    "pid": {
      "fieldName": "pid",
      "isAnnotatedField": false,
      "type": "UNTOKENIZED",
      "analyzer": "DEFAULT",
      "custom": {
        "displayName": "PID"
      },
      "fieldValues": {
        "ParlaMint-BE_2014-06-19-54-plenair-ip001x.ana": 1
        // ...
      },
      "valueListComplete": false
    },
    "datering": {
      "fieldName": "datering",
      "isAnnotatedField": false,
      "type": "TOKENIZED",
      "analyzer": "DEFAULT",
      "custom": {
        "displayName": "Datering"
      },
      "fieldValues": {
        "2014-06-19": 1
        // ...
      },
      "valueListComplete": false
    },
    "fromInputFile": {
      "fieldName": "fromInputFile",
      "isAnnotatedField": false,
      "type": "UNTOKENIZED",
      "analyzer": "DEFAULT",
      "custom": {
        "displayName": "From input file"
      },
      "fieldValues": {
        "/path/to/input/file.xml": 1
        // ...
      },
      "valueListComplete": false
    }
  }
}

API version differences ​

The major differences between API v4 and v5 are:

  • API v5 omits custom properties like displayName, description and fieldInfo unless you specify custom=true. These properties are not used by BlackLab itself, but may be useful to some clients.
  • API v5 has a count object with tokens and documents, while API v4 has tokenCount and no document count.

Notes ​

  • versionInfo gives information about when the corpus was created/updated, as well as what version of BlackLab it was created with.
  • Now includes relations info as well. For the format, see here.

Apache license 2.0