Grammar and spelling check API documentation
TextGears API allows you to integrate the latest technologies for text analyzing virtually to any product. From simple mobile apps to bulky enterprise developments. The API allows you to check text for all kinds of errors in a flexible manner, determine the readability of the text, evaluate the approximate vocabulary of the author, and much more.
Looking for a plugin for website?
You can easily add text checking to your website. More info about the plugin and sample code can be found on documentation page.
What can the API do?
Docs for Postman
You can download API documentation file for Postman or any other HTTP debugging program. In Postman you can set a key at collection Variables tab..
Where to begin
It's simple and easy. The API is available for regular HTTP and HTTPS requests.
The output data is sent in JSON.
All requests are made to the api.textgears.com
server
To speed up access from different parts of the world, we placed servers
in 3 countries: USA, Estonia and Singapore. When submitting a request to api.textgears.com
we will choose the closest cluster. But you can explicitly make requests to the cluster located nearby
to reduce the delay in receiving a response.
https://eu.api.textgears.com
– Europe
https://us.api.textgears.com
– America
https://sg.api.textgears.com
– Asia
All API endpoints are independent clusters of servers. We guarantee a 99.9% availability for each of them . If this seems insufficient to you, you can change the cluster when a connection error occurs.
import textgears from 'textgears-api';
const textgearsApi = textgears('YOUR_KEY', {language: 'en-US'});
textgearsApi.checkGrammar('I is a engineer')
.then((data) => {
for (const error of data.errors) {
console.log('Error: %s. Suggestions: %s', error.bad, error.better.join(', '));
}
})
.catch((err) => {});
If you have implemented a library for working with API in another language or for another framework, just send us a link on GitHub or GitLab, while we will publish it as well.
Supported languages
TextGears analyzes text not only by taking the language of the text into account, but also keeping the dialect in mind. Full list of supported languages: English, French, German, Portuguese, Russian, Italian, Arabic, Spanish, Japanese, Chinese, Greek
Supported dialects (have to be sent in the language
parameter): en-US, en-GB, en-ZA, en-AU, en-NZ, fr-FR, de-DE, de-AT, de-CH, pt-PT, pt-BR, it-IT, ar-AR, ru-RU, es-ES, ja-JP, zh-CN, el-GR
Authorization and parameter transfer
The request is authorized by transferring your key among other parameters in one of the following ways:
- POST parameter
key
-
GET parameter
key
?key=YOURKEY
-
Json-request
{ "key": "YOURKEY", // Other params }
-
HTTP Header
Where YOURKEY is your key.Authorization: Basic YOURKEY
Error codes
In case of an error, the status
parameter will have false
value
{
status : false,
error_code : 600, // API error code
description : "Invalid license key. Go to https://textgears.com/signup.php to get one"
}
- 600 - Invalid key
- 606 - Unsupported Language
- 607 - Allowed number of requests exceeded
- 500 - Unknown internal service error
- 501 - Text length exceeds rate limit
Text validation API
Checking the grammar of the text
https://api.textgears.com/grammar
The method allows you to check the text for grammatical, spelling, punctuation and stylistic errors.
Request parameters
Checking the spelling of text
https://api.textgears.com/spelling
The method checks the text for typos by using the updated dictionary
Request parameters
Auto-correcting text
https://api.textgears.com/correct
There are two methods for automatic text correction. The "correct" method is noticeably more precise, but it applies to AI requests.
Important!
At the moment, the method only works for the English language.
Request parameters
https://api.textgears.com/suggest
The verification system automatically corrects errors in the text and suggests a continuation of the last sentence.
Important!
If a typo is found, the word is replaced to the closest word from the dictionary. If there are multiple words looking similar to the detected one, then the most common word in modern speech is chosen. TextGears is still far from telepathy, so if there are a lot of typos the meaning of the final text may change.
Request parameters
Readability of the text
https://api.textgears.com/readability
Calculation of the readability of the text according to the most common algorithms and their adaptations for most languages. You can learn more about readability metrics. by reading our separate article.
Important!
When determining text metrics, accuracy is directly related to the size of the text. Determining the readability or other parameters of the text for a two-word sentence is meaningless. It is recommended to check texts that has at least 30 words. The more the better.
Request parameters
Text analysis
https://api.textgears.com/analyze
Comprehensive text analysis. It finds all kinds of errors, calculates readability metrics, grades spelling on a 100-point scale, and also evaluates the emotional mood of the text.
Important!
When determining text metrics, accuracy is directly related to the size of the text. Determining the readability or other parameters of the text for a two-word sentence is meaningless. It is recommended to check texts that has at least 30 words. The more the better.
Request parameters
Language detection
https://api.textgears.com/detect
Determination of the language of the text and the assumption of its dialect.
The method returns an array of probable options for each language.
If it is not possible to unambiguously identify the language, the language
field
returns null
Request parameters
Summarization and keywords extraction
https://api.textgears.com/summarize
Request parameters
Admin API
Plan quota
https://api.textgears.com/account/resourcequota
Receiving data on the current plan quota. The method can be used to keep track of whether how many requests within the plan have already been made, or how many requests can still be made within the billing period
Request parameters
Usage statistics
https://api.textgears.com/account/usage
Getting statistics of API usage for your account with a breakdown by day
Request parameters
Create and edit dictionaries
https://api.textgears.com/custom/createdictionary
If you need a flexible setting for checking text for errors, use the custom exceptions setting. This will be especially useful for companies working with texts that are full of words from a special vocabulary. Mark words or phrases as "correct" so that the system stops considering them mistakes. You can also use it to allow the system to find mistakes according to the list of specific words. Custom rules can be combined and transformed into dictionaries. Such an approach makes it possible for the different functions of your product to use a different set of rules. At the same time, each user of your product can have their own set of exceptions
Request parameters
https://api.textgears.com/custom/updatedictionary
https://api.textgears.com/custom/listdictionaries
https://api.textgears.com/custom/deletedictionary
Add an exception
https://api.textgears.com/custom/addexception
If you are checking texts with very specific vocabulary that is marked as errors in our system, you can add words or phrases to exceptions. After that, they will not be considered errors.
Request parameters
List of exceptions
https://api.textgears.com/custom/listexceptions
List previously added exclusion words
Request parameters
Remove exception
https://api.textgears.com/custom/deleteexception
Remove the exception word for checking. If you try to delete a previously deleted word, no error occurs.