### GET /words Source: https://languagetoolplus.com/http-api Lists words currently present in the user's dictionaries. ```APIDOC ## GET /words ### Description List words in dictionaries. ### Method GET ### Endpoint /words ### Parameters #### Query Parameters - **dictionary** (string) - Optional - The dictionary to list words from (e.g., 'default', 'user'). Defaults to 'user'. - **language** (string) - Optional - The language code for the dictionary. ### Response #### Success Response (200) - **words** (array) - A list of words in the specified dictionary. #### Response Example ```json { "words": [ "exampleword", "anotherword" ] } ``` ``` -------------------------------- ### Check Text with Mother Tongue Specification Source: https://languagetoolplus.com/http-api/languagetool-swagger.json This example demonstrates how to specify the user's native language using the 'motherTongue' parameter. This can help improve the accuracy of false friends checks for certain language pairs. ```curl curl -X POST https://api.languagetoolplus.com/v2/check \ -d "text=This text is in English." -d "language=fr" -d "motherTongue=en-US" ``` -------------------------------- ### Check Text with Markup using LanguageTool API Source: https://languagetoolplus.com/http-api/languagetool-swagger.json This example shows how to check text that includes markup, such as HTML tags. The 'data' parameter allows you to specify text and markup separately, ensuring that markup is ignored during the check. Entities within the markup need to be expanded. ```curl curl -X POST https://api.languagetoolplus.com/v2/check \ -d "language=en-US" \ -d 'data={"annotation":[ {"text": "A "}, {"markup": "<b>"}, {"text": "test"}, {"markup": "</b>"} ]}' \ -d "username=YOUR_USERNAME" -d "apiKey=YOUR_API_KEY" ``` -------------------------------- ### GET /languages Source: https://languagetoolplus.com/http-api Retrieves a list of all languages supported by the LanguageTool API, including their codes and names. ```APIDOC ## GET /languages ### Description Get a list of supported languages. ### Method GET ### Endpoint /languages ### Response #### Success Response (200) - **languages** (array) - A list of supported languages. - **name** (string) - The full name of the language. - **code** (string) - The language code (e.g., 'en-US', 'de-DE'). - **longCode** (string) - A more detailed language code. - **default** (boolean) - Indicates if this is the default language. - **country** (string) - The country associated with the language. #### Response Example ```json { "languages": [ { "name": "English (US)", "code": "en-US", "longCode": "en-US", "default": true, "country": "US" }, { "name": "German", "code": "de", "longCode": "de-DE", "default": false, "country": "DE" } ] } ``` ``` -------------------------------- ### Check Text with Language Guessing Source: https://languagetoolplus.com/http-api/languagetool-swagger.json This example demonstrates how to let the LanguageTool API automatically detect the language of the text. Use 'language=auto' for automatic language detection. For languages with variants, specifying the variant (e.g., 'en-GB') is recommended for accurate spell checking. ```curl curl -X POST https://api.languagetoolplus.com/v2/check \ -d "text=This text should be automatically detected." -d "language=auto" ``` -------------------------------- ### POST /words/add Source: https://languagetoolplus.com/http-api Adds a word to a specified dictionary. ```APIDOC ## POST /words/add ### Description Add word to a dictionary. ### Method POST ### Endpoint /words/add ### Parameters #### Request Body - **word** (string) - Required - The word to add. - **language** (string) - Optional - The language code for the word. - **dictionary** (string) - Optional - The dictionary to add the word to (e.g., 'default', 'user'). Defaults to 'user'. ### Request Example ```json { "word": "newword", "language": "en-US" } ``` ``` -------------------------------- ### List Words in Dictionaries Source: https://languagetoolplus.com/http-api/languagetool-swagger.json Lists words from the user's personal dictionaries. You can specify offset, limit, and the dictionaries to include. Authentication is required using username and API key. ```APIDOC ## GET /words ### Description List words in the user's personal dictionaries. ### Method GET ### Endpoint /words ### Parameters #### Query Parameters - **offset** (integer) - Optional - Offset of where to start in the list of words. Defaults to 0. - **limit** (integer) - Optional - Maximum number of words to return. Defaults to 10. - **username** (string) - Required - Your username as used to log in at languagetool.org. - **apiKey** (string) - Required - Your API key. API key documentation. - **dicts** (string) - Optional - Comma-separated list of dictionaries to include words from; uses special default dictionary if this is unset. ### Responses #### Success Response (200) - **words** (array) - the user's words from the given user dictionaries. #### Response Example { "example": "{ \"words\": [ \"example\", \"word\" ] }" } ``` -------------------------------- ### POST /check Source: https://languagetoolplus.com/http-api Checks a given text for style and grammar issues using the LanguageTool API. This endpoint is subject to daily and per-minute limits based on the user's plan. ```APIDOC ## POST /check ### Description Check texts for style and grammar issues with LanguageTool. ### Method POST ### Endpoint /check ### Parameters #### Query Parameters - **text** (string) - Required - The text to be checked. - **language** (string) - Optional - The language code for the text (e.g., 'en-US', 'de-DE'). If not provided, the API may attempt to auto-detect the language. ### Request Example ```json { "text": "This is a sample text to check.", "language": "en-US" } ``` ### Response #### Success Response (200) - **language** (object) - Information about the detected language. - **matches** (array) - A list of potential errors or suggestions found in the text. - **message** (string) - The error message or suggestion. - **shortMessage** (string) - A shorter version of the message. - **replacements** (array) - Suggested replacements for the error. - **offset** (integer) - The starting character offset of the error in the text. - **length** (integer) - The length of the error in the text. - **context** (object) - Contextual information about the error. - **sentence** (string) - The sentence containing the error. - **type** (string) - The type of issue (e.g., 'typographical', 'grammatical'). - **ruleId** (string) - The ID of the rule that triggered the issue. - **ruleIssueType** (string) - The type of issue according to the rule. - **isReliable** (boolean) - Indicates if the suggestion is reliable. - **colOffset** (integer) - The starting column offset of the error. - **colLength** (integer) - The length of the error in columns. #### Response Example ```json { "language": { "name": "English (US)", "code": "en-US" }, "matches": [ { "message": "Possible typo: 'teh' instead of 'the'.", "shortMessage": "Possible typo.", "replacements": [ { "value": "the" } ], "offset": 10, "length": 3, "context": { "text": "sample text", "offset": 7, "length": 11 }, "sentence": "This is a sample text to check.", "type": "typographical", "ruleId": "UPPERCASE_SENTENCE_START", "ruleIssueType": "typographical", "isReliable": true, "colOffset": 10, "colLength": 3 } ] } ``` ``` -------------------------------- ### Check Text with Custom Dictionaries Source: https://languagetoolplus.com/http-api/languagetool-swagger.json This snippet shows how to include custom dictionaries when checking text. Provide a comma-separated list of dictionary names to the 'dicts' parameter. If 'dicts' is not set, a special default dictionary is used. ```curl curl -X POST https://api.languagetoolplus.com/v2/check \ -d "text=This text uses custom words." -d "language=en-US" -d "dicts=my_custom_dictionary,another_dictionary" ``` -------------------------------- ### Check Text with LanguageTool API Source: https://languagetoolplus.com/http-api/languagetool-swagger.json This snippet demonstrates how to check a plain text string for grammar and style issues using the LanguageTool API. Ensure you provide a valid language code. ```curl curl -X POST https://api.languagetoolplus.com/v2/check \ -d "text=This is a sample text with some errors." -d "language=en-US" ``` -------------------------------- ### Add Word to Dictionary Source: https://languagetoolplus.com/http-api/languagetool-swagger.json Adds a word to one of the user's personal dictionaries. This feature is intended for personal dictionaries with a limit of 500 words. Non-existent dictionaries will be created. If no dictionary is specified, the word is added to a default dictionary. ```APIDOC ## POST /words/add ### Description Adds a word to one of the user's personal dictionaries. This feature is intended for personal dictionaries with a limit of 500 words. Non-existent dictionaries will be created. If no dictionary is specified, the word is added to a default dictionary. ### Method POST ### Endpoint /words/add ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **word** (string) - Required - 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** (string) - Required - Your username as used to log in at languagetool.org. - **apiKey** (string) - Required - Your API key - **dict** (string) - Optional - Name of the dictionary to add the word to; non-existent dictionaries are created after calling this; if unset, adds to special default dictionary ### Request Example ```json { "word": "exampleword", "username": "yourusername", "apiKey": "yourapikey", "dict": "mydictionary" } ``` ### Response #### Success Response (200) - **added** (boolean) - true if the word has been added. false means the word hasn't been added because it had been added before. #### Response Example ```json { "added": true } ``` ``` -------------------------------- ### Check Text Source: https://languagetoolplus.com/http-api/languagetool-swagger.json This endpoint allows you to check a given text for grammatical errors, style issues, and other writing mistakes. You can customize the checking process by specifying languages, enabling or disabling specific rules and categories, and setting the desired checking level. ```APIDOC ## POST /check ### Description Checks the provided text for errors and returns a list of suggestions. ### Method POST ### Endpoint /check ### Parameters #### Form Data Parameters - **text** (string) - Required - The text to check. - **language** (string) - Optional - The language of the text. Use 'auto' to automatically detect the language. - **variants** (string) - Optional - Comma-separated list of preferred language variants (e.g., 'en-GB', 'de-AT'). Only available with `language=auto`. - **enabledRules** (string) - Optional - IDs of rules to be enabled, comma-separated. - **disabledRules** (string) - Optional - IDs of rules to be disabled, comma-separated. - **enabledCategories** (string) - Optional - IDs of categories to be enabled, comma-separated. - **disabledCategories** (string) - Optional - IDs of categories to be disabled, comma-separated. - **enabledOnly** (boolean) - Optional - If true, only the rules and categories specified with `enabledRules` or `enabledCategories` are enabled. Defaults to false. - **level** (string) - Optional - If set to `picky`, additional rules will be activated. Enum: ['default', 'picky']. ### Response #### Success Response (200) - **software** (object) - Information about the LanguageTool software. - **name** (string) - Usually 'LanguageTool'. - **version** (string) - A version string like '3.3' or '3.4-SNAPSHOT'. - **buildDate** (string) - Date when the software was built, e.g. '2016-05-25'. - **apiVersion** (integer) - Version of this API response. - **status** (string) - An optional warning, e.g. when the API format is not stable. - **premium** (boolean) - true if you're using a Premium account (since LanguageTool 4.2) #### Response Example { "software": { "name": "LanguageTool", "version": "5.0", "buildDate": "2020-01-01", "apiVersion": 1, "premium": false } } ``` -------------------------------- ### POST /words/delete Source: https://languagetoolplus.com/http-api Removes a word from a specified dictionary. ```APIDOC ## POST /words/delete ### Description Remove word from a dictionary. ### Method POST ### Endpoint /words/delete ### Parameters #### Request Body - **word** (string) - Required - The word to remove. - **language** (string) - Optional - The language code for the word. - **dictionary** (string) - Optional - The dictionary to remove the word from (e.g., 'default', 'user'). Defaults to 'user'. ### Request Example ```json { "word": "newword", "language": "en-US" } ``` ``` -------------------------------- ### Check Text with Interpreted Markup as Whitespace Source: https://languagetoolplus.com/http-api/languagetool-swagger.json This snippet illustrates how to use the 'data' parameter to check text where specific markup, like HTML tags, should be interpreted as whitespace. The 'interpretAs' field within the JSON data specifies the desired interpretation. ```curl curl -X POST https://api.languagetoolplus.com/v2/check \ -d "language=en-US" \ -d 'data={"annotation":[ {"markup": "<p>", "interpretAs": "\n\n"}, {"text": "This is a paragraph."} ]}' \ -d "username=YOUR_USERNAME" -d "apiKey=YOUR_API_KEY" ``` -------------------------------- ### Check Text Source: https://languagetoolplus.com/http-api/languagetool-swagger.json The main feature of the LanguageTool API allows you to check a given text for possible style and grammar issues. You can provide the text directly or as a JSON document with markup interpretation. ```APIDOC ## POST /check ### Description Checks a text for style and grammar issues using LanguageTool. ### Method POST ### Endpoint /v2/check ### Parameters #### Form Data Parameters - **text** (string) - Optional - The text to be checked. This or 'data' is required. - **data** (string) - Optional - 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 <b>test</b>
JSON for the example text:
{"annotation":[
 {"text": "A "},
 {"markup": "<b>"},
 {"text": "test"},
 {"markup": "</b>"}
]}

If you have markup that should be interpreted as whitespace, like <p> in HTML, you can have it interpreted like this:

{"markup": "<p>", "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. - **language** (string) - Required - 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`. - **username** (string) - Optional - Set to get Premium API access: Your username/email as used to log in at languagetool.org. - **apiKey** (string) - Optional - Set to get Premium API access: your API key - **dicts** (string) - Optional - Comma-separated list of dictionaries to include words from; uses special default dictionary if this is unset - **motherTongue** (string) - Optional - A language code of the user's native language, enabling false friends checks for some language pairs. - **preferredVariants** (string) - Optional - Comma-separated list of language variants to try when the language is ambiguous. For example, `en-GB,en-CA` will try British English and Canadian English before falling back to American English. ### Response #### Success Response (200) - **language** (object) - Information about the language used for checking. - **warnings** (array) - A list of warnings found in the text. - **errors** (array) - A list of errors found in the text. - **code** (string) - A code indicating the type of error or warning. - **message** (string) - A description of the error or warning. - **shortMessage** (string) - A shorter description of the error or warning. - **replacements** (array) - A list of suggested replacements for the error or warning. - **offset** (integer) - The starting character offset of the error or warning in the original text. - **length** (integer) - The length of the text span containing the error or warning. - **context** (object) - Information about the context in which the error or warning occurred. - **sentence** (string) - The sentence containing the error or warning. - **type** (string) - The type of the issue (e.g., 'grammar', 'style'). - **ruleId** (string) - The ID of the rule that triggered the issue. - **ruleIssueType** (string) - The type of issue according to the rule. - **isCanBeDisabled** (boolean) - Whether the rule can be disabled. - **level** (object) - Information about the severity level of the issue. - **value** (string) - The text that triggered the issue. - **variants** (array) - Possible variants of the issue. - **sentenceBegin** (integer) - The character offset where the sentence begins. - **sentenceEnd** (integer) - The character offset where the sentence ends. - **infoPageUrl** (string) - URL to a page with more information about the issue. - **annotation** (array) - Annotations from the input data, if provided. - **markup** (string) - Markup from the input data, if provided. - **text** (string) - Text content from the input data, if provided. - **interpretAs** (string) - Interpretation of markup as whitespace, if provided. - **stats** (object) - Statistics about the check, such as the number of words checked. ``` -------------------------------- ### Delete Word from Dictionary Source: https://languagetoolplus.com/http-api/languagetool-swagger.json Removes a word from one of the user's personal dictionaries. If the dictionary becomes empty after removal, it will be deleted. If no dictionary is specified, the word is removed from the default dictionary. ```APIDOC ## POST /words/delete ### Description Removes a word from one of the user's personal dictionaries. If the dictionary becomes empty after removal, it will be deleted. If no dictionary is specified, the word is removed from the default dictionary. ### Method POST ### Endpoint /words/delete ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **word** (string) - Required - The word to be removed. - **username** (string) - Required - Your username as used to log in at languagetool.org. - **apiKey** (string) - Required - Your API key - **dict** (string) - Optional - 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 ### Request Example ```json { "word": "exampleword", "username": "yourusername", "apiKey": "yourapikey", "dict": "mydictionary" } ``` ### Response #### Success Response (200) - **deleted** (boolean) - true if the word has been removed. false means the word hasn't been removed because it was not in the dictionary. #### Response Example ```json { "deleted": true } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.