@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api LanguageTool API
@base https://api.languagetoolplus.com/v2
@version 1.1.2
@auth ApiKey apiKey in formData
@endpoints 5
@toc check(1), languages(1), words(3)

@group check
@endpoint POST /check
@desc Check a text
@required {language: any # A language code like `en-US`, `de-DE`, `fr`, or `auto` to guess the language automatically (see `preferredVariants` below). For languages with variants (English, German, Portuguese) spell checking will only be activated when you specify the variant, e.g. `en-GB` instead of just `en`.}
@optional {text: any # The text to be checked. This or 'data' is required., data: any # The text to be checked, given as a JSON document that specifies what's text and what's markup. This or 'text' is required. Markup will be ignored when looking for errors. Example text: A testJSON for the example text: {"annotation":[  {"text": "A "},  {"markup": ""},  {"text": "test"},  {"markup": ""} ]} If you have markup that should be interpreted as whitespace, like  in HTML, you can have it interpreted like this: {"markup": "", "interpretAs": "\n\n"}The 'data' feature is not limited to HTML or XML, it can be used for any kind of markup. Entities will need to be expanded in this input., username: any # Set to get Premium API access: Your username/email as used to log in at languagetool.org., apiKey: any # Set to get Premium API access: your API key, dicts: any # Comma-separated list of dictionaries to include words from; uses special default dictionary if this is unset, motherTongue: any # A language code of the user's native language, enabling false friends checks for some language pairs., preferredVariants: any # Comma-separated list of preferred language variants. The language detector used with `language=auto` can detect e.g. English, but it cannot decide whether British English or American English is used. Thus this parameter can be used to specify the preferred variants like `en-GB` and `de-AT`. Only available with `language=auto`. You should set variants for at least German and English, as otherwise the spell checking will not work for those, as no spelling dictionary can be selected for just `en` or `de`., enabledRules: any # IDs of rules to be enabled, comma-separated. Note that 'level' still applies, so the rule won't run unless 'level' is set to a level that activates the rule., disabledRules: any # IDs of rules to be disabled, comma-separated, enabledCategories: any # IDs of categories to be enabled, comma-separated, disabledCategories: any # IDs of categories to be disabled, comma-separated, enabledOnly: any # If true, only the rules and categories whose IDs are specified with `enabledRules` or `enabledCategories` are enabled., level: any # If set to `picky`, additional rules will be activated, i.e. rules that you might only find useful when checking formal text.}
@returns(200) the result of checking the text

@endgroup

@group languages
@endpoint GET /languages
@desc Get a list of supported languages.
@returns(200) An array of language objects.

@endgroup

@group words
@endpoint GET /words
@desc List words in dictionaries
@required {username: any # Your username as used to log in at languagetool.org., apiKey: any # Your API key}
@optional {offset: any # Offset of where to start in the list of words. Defaults to 0., limit: any # Maximum number of words to return. Defaults to 10., dicts: any # Comma-separated list of dictionaries to include words from; uses special default dictionary if this is unset}
@returns(200) the user's words from the given user dictionaries

@endpoint POST /words/add
@desc Add word to a dictionary
@required {word: any # The word to be added. Must not be a phrase, i.e. cannot contain white space. The word is added to a global dictionary that applies to all languages., username: any # Your username as used to log in at languagetool.org., apiKey: any # Your API key}
@optional {dict: any # Name of the dictionary to add the word to; non-existent dictionaries are created after calling this; if unset, adds to special default dictionary}
@returns(200) the result of adding the word

@endpoint POST /words/delete
@desc Remove word from a dictionary
@required {word: any # The word to be removed., username: any # Your username as used to log in at languagetool.org., apiKey: any # Your API key}
@optional {dict: any # Name of the dictionary to remove the word from; if the dictionary is empty upon calling this, it is deleted; if unset, removes from special default dictionary}
@returns(200) the result of removing the word

@endgroup

@end
