Login


en | de

API Documentation - Request

The request can be send as GET or POST request to the URL
 https://api.neofonie.de/rest/txt/analyzer
The document and the used services are passed as parameters.

Document

The document, which should be annotated, can be passed directly as text.

Alternatively, you can simply specify the URL of a website to be analyzed. In this case, the site of the main text content is crawled, determined and processed. Foreign elements, such as navigation or teaser text will be removed.

Services

The document can be analyzed with different techniques. Choose from the following services:

entities Named Entities based on the Wikidata ontology.
tags Keywords which appear in the text and describe and summarize the content.
categories Assignment of text to categories of politics, business, cars & technology, internet, culture, travel, sports, human interest, science.
dates Dates and periods.

Service Control

More parameters are available for individual services affecting the analysis or the result.

Example Request

Example of a POST request where the document is passed directly as text:

curl "https://api.neofonie.de/rest/txt/analyzer" \
    -H "X-Api-Key: ..." \
    --data-urlencode text='Angela Merkel wurde am 17. Juli 1954 in Hamburg als Angela Dorothea Kasner geboren.' \
    -d services='entities'

Example of a GET request where the document is fetched from the specified website:

curl "https://api.neofonie.de/rest/txt/analyzer?url=http://www.neofonie.de&services=entities" \
    -H "X-Api-Key: ..."

Overview of Parameters

Parameter Area Description
text Document Contains the annotated to document as text. If you have longer texts, please send the request as POST request and pass the text in the request body.

mandatory: either text or url
values: text
url Document URL of the website whose main content should to be analyzed.

mandatory: either text or url
values: valid HTTP URL
title Document Title of the document. By additionally specifying a title, the result can be improved and will only be applied to the following services: tags.

mandatory: no
values: text
teaser Document Teaser of the document. By adding a teaser, the result can be improved and will only be applied to the following services: tags.

mandatory: no
values: text
services Services List of requested services.

mandatory: yes
values: comma-separated list that contains at least one of the supported services: [entities, tags, categories, dates]
language Service control Language of the document. Language-dependent components can be specifically activated by setting this parameter.

mandatory: no, will then be auto-detected
values: 'en' or 'de'
ntags Service control Maximum number of keywords (tags) which are requested.
Service: tags.

mandatory: no, default: 10
values: non-negative integer
ncategories Service control Number of returned categories.
Service: categories.

mandatory: no
values: non-negative integer