The Language Detection API is a tool that uses machine learning algorithms to automatically identify the language of a given piece of text. The API can process a wide variety of text input, including short phrases, sentences, and full documents, and it can detect a wide range of languages, including English, Spanish, French, German, Chinese, and many others.
To use the API, developers send an HTTP request to a specified endpoint, including the text to be analyzed as well as any necessary authentication information. The API then processes the text and returns a response indicating the detected language, along with a confidence score. The confidence score reflects the API's level of certainty in its detection, and can be used to determine how likely it is that the detection is accurate.
The Language Detection API can be integrated into a wide range of applications, including natural language processing, machine translation, and text-to-speech systems. It can also be used to automatically classify text data, such as social media posts or customer feedback, by language, making it easier to understand and analyze.
Pass the text from where you want to recognize its language.
Detector - Endpoint Features
| Object | Description |
|---|---|
Request Body |
[Required] Json |
{"confidence":0.862168675288558,"lang":"en","predictions":[{"lang":"en","prob":0.8731940388679504},{"lang":"de","prob":0.011025363579392433},{"lang":"id","prob":0.006528798956423998},{"lang":"zh","prob":0.004763109143823385},{"lang":"te","prob":0.004366433247923851}],"prob":0.8731940388679504}
curl --location --request POST 'https://zylalabs.com/api/928/language+detection+api/746/detector' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"text": "This is an english text.",
"includePredictions": true
}'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The Language Detection API returns a JSON response containing a list of detected languages along with their ISO codes, names, and relevance scores. It also includes a status object indicating the request's success and remaining credits.
Key fields in the response include "language_list," which contains detected languages with "iso639-2," "iso639-3," "language," "name," and "relevance." The "status" field provides a code, message, and credit information.
The response data is structured as a JSON object. It includes a "language_list" array for detected languages and a "status" object for request details. Each language entry contains relevant identifiers and a relevance score.
The primary parameter for the Language Detection API is the text input, which should be included in the HTTP request. Additional parameters may include authentication tokens, but specific customization options are not detailed.
Data accuracy is maintained through advanced Natural Language Processing techniques and machine learning algorithms. Continuous training on diverse datasets helps improve detection capabilities for various languages.
Typical use cases include machine translation, text-to-speech systems, social media monitoring, customer service routing, search engine optimization, and content curation, enabling efficient language processing across applications.
Users can utilize the returned data by analyzing the "language_list" to determine the most relevant language for their text. The relevance score helps assess confidence in the detection, guiding further processing or actions.
Users can expect a list of languages sorted by relevance, with the highest relevance indicating the most likely detected language. The response will consistently include the status code and message, ensuring clarity on request outcomes.
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
287ms
Service Level:
100%
Response Time:
1,164ms
Service Level:
100%
Response Time:
1,273ms
Service Level:
100%
Response Time:
1,376ms
Service Level:
100%
Response Time:
725ms
Service Level:
100%
Response Time:
1,658ms
Service Level:
100%
Response Time:
1,320ms
Service Level:
100%
Response Time:
728ms
Service Level:
100%
Response Time:
375ms
Service Level:
100%
Response Time:
250ms
Service Level:
100%
Response Time:
335ms
Service Level:
100%
Response Time:
398ms
Service Level:
100%
Response Time:
127ms
Service Level:
100%
Response Time:
326ms
Service Level:
83%
Response Time:
334ms
Service Level:
100%
Response Time:
290ms
Service Level:
100%
Response Time:
1,293ms
Service Level:
100%
Response Time:
876ms
Service Level:
100%
Response Time:
1,654ms