Detect the language of the given text. The API returns a list of languages and their confidence scores. The confidence score is a value between 0 and 1, where 1 means the language was detected with 100% confidence. The API supports text in 22 languages.
[
{
"language": "de",
"confidence": 0.34
},
{
"language": "et",
"confidence": 0.22
},
{
"language": "fi",
"confidence": 0.13
},
{
"language": "sv",
"confidence": 0.11
},
{
"language": "it",
"confidence": 0.11
},
{
"language": "es",
"confidence": 0.05
},
{
"language": "pt",
"confidence": 0.03
},
{
"language": "lt",
"confidence": 0.01
}
] {{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
The API supports detection for 22 different languages, covering the most widely spoken languages globally.
The confidence score is a value between 0 and 1 indicating how certain the API is about the detected language. A score of 1 represents 100% confidence.
The API returns a list of potential languages with their confidence scores. If a text contains mixed languages, the API will likely return the dominant language with the highest score.
The Detect Language API identifies the language of the text, while the Detect Sentiment API analyzes the emotional tone (positive or negative) of the text.