Skip to content
HALOWERK

Textwerk

wikidata link

For each mention the public Wikidata API (wbsearchentities, German or English labels and aliases) returns up to 7 candidates; one query to the Wikidata Query Service fetches their instance-of (P31) types. Candidates are ranked by search rank, exact label or alias match and word overlap between an optional context and the item description and types; optional type QIDs filter by direct P31. Humans (Q5), family and given name items, disambiguation, category, list and template pages are removed,.

POST https://text.halowerk.com/v1/wikidata-link

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
mentionsarrayYesEntity names to link.
languagestringNo
contextstringNoOptional surrounding text for disambiguation.
typesarrayNoOptional allowed instance-of QIDs, e.g. Q515 (city).
candidatesintegerNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "mentions"
  ],
  "properties": {
    "mentions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 8,
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 100
      },
      "description": "Entity names to link."
    },
    "language": {
      "type": "string",
      "enum": [
        "de",
        "en"
      ],
      "default": "de"
    },
    "context": {
      "type": "string",
      "maxLength": 2000,
      "description": "Optional surrounding text for disambiguation."
    },
    "types": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string",
        "pattern": "^Q[1-9]\\d{0,9}$"
      },
      "description": "Optional allowed instance-of QIDs, e.g. Q515 (city)."
    },
    "candidates": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5,
      "default": 3
    }
  }
}

Open original schema

Published input example

{
  "mentions": [
    "Köln",
    "Rhein"
  ],
  "language": "de",
  "context": "Der Rhein fließt durch Köln."
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →