Seite bearbeiten Autoren/Versionen Neue Seite Letzte Änderungen

Heinzelnisse REST-API

License

Heinzelnisse supports a REST-API which can be used free of charge. Usage terms are covered under: GPL-v2 or CC-BY-NC-SA. The API is used internally in the App and therefore considered stable. To be informed about usage changes, e.g. over-usage countermeasures (API-keys), please write an email to heiko.klein@gmx.net .

Usage

The Heinzelnisse REST-API can be called under https://heinzelnisse.info/searchResults? The API support the following options:

  • searchItem=* the word to search for
  • dictExactSearch=on| only search for the complete word
  • dictDeNoSearch=on| search from German (DE) to Norwegian (NO). Corresponds to the deTrans attribute in the response.
  • dictNoDeSearch=on| search from Norwegian (NO) to German (DE). Corresponds to the noTrans attribute in the response.
  • dictPhoneticSearch=on| find suggestions for phonetically similar words (e.g. fandom=phantom), or conjugated/declinated words (e.g vergas=vergessen). Corresponds to the dePhonetics and noPhonetics attribute in the response.
  • wikiSearch=on| find results from the wiki. Corresponds to the wikiPageNames attribute in the response.
  • forumKeywordSearch=on| find results in the forum. Corresponds to the forumQuestions attribute in the response.
  • dictNynorskSearch=on| find similar words in the nynorsk dictionary
  • dictBokmaalSearch=checked| find similar words in the bokmål dictionary
  • type=json return json (only option)
  • setOption=on| use these options (or use defaults)

The response of a typical query like API-Link:

The most important attributes are noTrans and deTrans with lists of the following objects:

{
"word": "Test", "article": "m",
"other": "",
"t_article": "m",
"t_other": "",
"t_word": "test"
}

This describes (among others) the word in the original language de or no with article and additional information other and the translation t_word, t_article, t_other.

Examples

A fast and typical query to find the translations from a german text, e.g. to find the word vergessen would be:

Test-Api-Link vergessen

The list of words dePhonetics are in particularly useful, when the given word can not be found, or does not give the desired results. In these cases, the desired word in the dePhonetics list should be used as searchItem. Example: Test-API-Link vergas will not give any deTrans but:

{
"dePhonetics": [ "Vergaser", "vergessen" ],
}

which should lead to the query in the first example.