ApyHub
ApyHub
verified icon
50 atoms
Base tier

About

The Detect Language API analyzes the provided text and returns the identified language. Currently, the language detection API supports more than 50 languages.
Language detection can help automate data processing tasks by identifying the language of large volumes of text data. This can be useful in various industries including social media monitoring or online advertising, learning, and development, where identifying the language of user-generated content is essential. Using a language detection API inside an application can also help prevent security breaches by detecting text that is written in an unauthorized language. This can be particularly useful in the financial or legal industries, where compliance regulations require the use of specific languages.
Try out the API in the API playground and see how this free online language detector API can help you detect any language easily, save time, and reduce errors through a simple API call.
Supported languages: Esperanto, English, Russian, Mandarin, Spanish, Portuguese, Italian, Bengali, French, German, Ukrainian, Georgian, Arabic, Hindi, Japanese, Hebrew, Yiddish, Polish, Javanese, Korean, Bokmal, Danish, Swedish, Finnish, Turkish, Dutch, Hungarian, Czech, Greek, Bulgarian, Belarusian, Marathi, Kannada, Romanian, Slovene, Croatian, Serbian, Macedonian, Lithuanian, Latvian, Estonian, Tamil, Vietnamese, Urdu, Thai, Gujarati, Uzbek, Punjabi, Azerbaijani, Indonesian, Telugu, Persian, Malayalam, Hausa, Oriya, Burmese, Bhojpuri, Maithili, Oromo, Kurdish, Malagasy, Saraiki, Nepali, Sinhalese, Khmer, Turkmen, Somali, Akan, Zulu, Haitian Creole, Uyghur, Africaans

API Playground

API Documentation

detect language
POST
https://api.apyhub.com/detect/language

Request example

1
curl --location --request POST 'https://api.apyhub.com/detect/language' \
2
--header 'apy-token: {{token}}' \
3
--header 'Content-Type: application/json' \
4
--data '{
5
"text":"Não lemos e escrevemos poesia porque é fofo. Lemos e escrevemos poesia porque somos membros da raça humana."
6
}'
Method: POST
Content Type: application/json
Request Body
AttributeTypeMandatoryDescription
textstringYesThe text for which you want to detect the language, minimum 50 characters are required.
Supported Languages
1
Esperanto | English | Russian | Mandarin | Spanish | Portuguese | Italian | Bengali | French | German | Ukrainian | Georgian | Arabic | Hindi | Japanese | Hebrew | Yiddish |
2
Polish | Javanese | Korean | Bokmal | Danish | Swedish | Finnish | Turkish | Dutch | Hungarian | Czech | Greek | Bulgarian | Belarusian | Marathi | Kannada | Romanian | Slovene |
3
Croatian | Serbian | Macedonian | Lithuanian | Latvian | Estonian | Tamil | Vietnamese | Urdu | Thai | Gujarati | Uzbek | Punjabi | Azerbaijani | Indonesian | Telugu | Persian |
4
Malayalam | Hausa | Oriya | Burmese | Bhojpuri | Maithili | Oromo | Kurdish | Malagasy | Saraiki | Nepali | Sinhalese | Khmer | Turkmen | Somali | Akan | Zulu | Haitian Creole |
5
Uyghur | Africaans
Sample Response
A successful request returns the data object with below mentioned attributes if the language is supported as shared in the list given above.
1
{
2
"data": {
3
"code": "por",
4
"iso_code": "pt",
5
"language": "Portuguese",
6
"script": "Latin",
7
"confidence": 0.938
8
}
9
}

HTTP Response Codes

The method may return one of the following HTTP status codes:
Status CodeDescription
200The request was successful.
400Invalid input.
401Required authentication information is either missing or not valid for the resource.
500If any unexpected error occurs while processing the request.

Authentication

All API requests to ApyHub services need to be authenticated. Currently we support tokens or basic authentication mechanisms. You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".
Points to note:
  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error codes

1
{
2
"error": {
3
"code": 105,
4
"message": "Invalid URL"
5
}
6
}
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.
Table of contents
AboutAPI PlaygroundAPI DocumentationAuthenticationError codesRelated Utility APIsRelated Articles