Login


en | de

API Documentation - Response

The response is always in json format. It contains the analyzed text and the language of the text, and for every requested service the response contains a block. The content of the response block is service-specific and contains the actual analysis result for this service. For clear documentation, the response block will be omitted here, but will be described later in detail for each service.

For an example of a complete response, see section Overview.

Response Format

  • {
    • text: "Angela Merkel wurde am 17. Juli 1954 in Hamburg als Angela Dorothea Kasner geboren.",
    • timestamp: 1400247994051,
    • language: "de",
    • entities: [
    • ]
    • tags: [
    • ]
    • dates: [
    • ]
    • categories: [
    • ]
  • }

An empty result list will be returned if a service has successfully analyzed the text, but found no results. In case of an error of a single service, the returned HTTP status will be 200 and the response content will contain the results of all the services, except for the failed service block.

Description of each field:

text The analyzed text. If you passed an URL, the extracted plain text (with boiler plate removal) will be displayed. If you passed an plain text within the parameter 'text', the unchanged text will be shown.
language The language for the text, eg "de" , "en", or "ru" or others.
timestamp The timestamp of the response (in milliseconds since January 1, 1970).

Response Format: Entities

  • {
    • entities: [
      • {
        • confidence: 47.150089263916016,
        • end: 13,
        • label: "Angela Merkel",
        • start: 0,
        • surface: "Angela Merkel",
        • type: "PERSON",
        • uri: "https://www.wikidata.org/wiki/Q567"
      • },
      • {
        • confidence: 46.01070785522461,
        • end: 47,
        • label: "Hamburg",
        • start: 40,
        • surface: "Hamburg",
        • type: "PLACE",
        • uri: "https://www.wikidata.org/wiki/Q1055"
      • },
      • {
        • confidence: 75.0,
        • end: 74,
        • label: null,
        • start: 52,
        • surface: "Angela Dorothea Kasner",
        • type: "PERSON",
        • uri: null
      • }
    • ]
  • }

Description of each field:

label The unique label of the entity.
surface The surface form of the entity in the text.
type Type of entity. Possible values ​​are "PERSON", "PLACE", "ORGANISATION", "JOB TITLE", "WORK", "EVENT", "CONCEPT". This is determined heuristically and may vary in some cases from the expected value. Example: A city can act as an employer and can be therefore classified as an organization.
uri The Wikidata URI of the named entity. Set to 'null' if there is no entity URI in the Wikidata knowledge base.
confidence Confidence value about the discovered entity. A higher value represents a more secure detection. The upper value of the confidence is unlimited.
start The start position of the entity in the text.
end The end position of the entity in the text.

Response Format: Entities ML

The machine learning (ML) Service uses a machine learning model to detect the correct entities. Generally speaking, it is more accurate for lesser known entities as they may occur in blog posts. For more well-known entities - as they often occur in news articles - the regular entity service will generally perform better. If you are unsure which service to pick, use the regular Entity service. The response format of the Entity ML service is identical to that of the regular Entity service.

Response Format: Tags

  • {
    • tags: [
      • {
        • confidence: 0.9967904107197822,
        • term: "Angela Merkel"
      • },
      • {
        • confidence: 0.9927268430144784,
        • term: "Juli"
      • },
      • {
        • confidence: 0.9751561498425574,
        • term: "Hamburg"
      • },
      • {
        • confidence: 0.7406453816287002,
        • term: "Angela Dorothea Kasner"
      • }
    • ]
  • }

Description of each field:

term The found Keyword.
confidence The confidence value of the phrase. The value is always between 0 to 1.

Response Format: Dates

  • {
    • dates: [
      • {
        • dateEnd:
          • {
            • bc: false,
            • day: 17,
            • month: 7,
            • year: 1954
          • }
        • dateStart:
          • {
            • bc: false,
            • day: 17,
            • month: 7,
            • year: 1954
          • }
        • end: 36,
        • start: 23,
        • surface: "17. Juli 1954"
      • }
    • ]
  • }

Description of each field:

surface The surface form of the date in the text.
start The start position of the date in the text.
end The final position of the date in the text.
dateStart The start date. A date is always represented as time periods, e.g. start and end date may have the same value.
dateEnd The end date.
day The day of the start or end date. Possible values ​​are 1-31.
month The month of the start or end date. Possible values ​​are 1-12.
year The year of the start or end date.
bc Describes whether the date refers to the time before Christ. Possible values ​​are true and false.

Response Format: Categories

  • {
    • categories: [
      • {
        • confidence: 0.9840945695370302,
        • label: "politik"
      • },
      • {
        • confidence: 0.010815793425103136,
        • label: "wirtschaft"
      • },
      • {
        • confidence: 0.005075348628913112,
        • label: "kultur"
      • },
      • {
        • confidence: 1.09702999767795e-05,
        • label: "sport"
      • },
      • {
        • confidence: 1.8793566199359706e-06,
        • label: "reisen"
      • },
      • {
        • confidence: 8.05313821392574e-07,
        • label: "wissenschaft"
      • },
      • {
        • confidence: 6.26958551045314e-07,
        • label: "internet"
      • },
      • {
        • confidence: 6.479984358403916e-09,
        • label: "auto+technik"
      • }
    • ]
  • }

Description of each field:

label The name of the category. Possible values ​​are "politik", "wirtschaft", "auto+technik", "internet", "kultur", "reisen", "sport", "vermischtes", "wissenschaft" (e.g. "politics", "economics", "auto + technology", "internet", "culture", "travel", "sport", "mixed", "economy", "science")
confidence The confidence value for the category is always between 0 to 1.

Response Format: Measures

  • {
    • measures: [
      • {
        • start: 8,
        • end: 15,
        • text: "2 Meter",
        • valueString: "2",
        • unitString: "Meter",
        • type: "LENGTH"
      • }
    • ]
  • }

Description of each field:

start The start position of the measurement in the text.
end The end position of the measurement in the text.
text The measurement string, exactly as it occurs in the text.
valueString The value as a string, exactly as it occurs in the text.
unitString The unit as a string, exactly as it occurs in the text.
type The type of the measurement. Possible values are "LENGTH", "AREA", "MASS", "TEMPERATURE", "VOLTAGE", "AMPERAGE", "RESISTANCE", "CHARGE", "CAPACITY", "CONDUCTANCE", "INDUCTANCE", "MAGNETIC_STRENGTH", "POWER", "ENERGY", "FORCE", "PRESSURE", "FREQUENCY", "VOLUME", "LUMINOSITY", "ILLUMINANCE", "SPIN", "SUBSTANCE", "RADIOACTIVITY", "CURRENCY", "TIME", "UNKNOWN"