Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Translate
  • Getting started
    • Overview
    • API authentication
      • Overview
        • Overview
        • Translate
        • DetectLanguage
        • ListLanguages
  • Access management
  • Pricing policy

In this article:

  • HTTP request
  • Body parameters
  • Response
  1. API reference
  2. REST v2
  3. Translation
  4. DetectLanguage

Translate API v2, REST: Translation.DetectLanguage

Written by
Yandex Cloud
Updated at April 24, 2025
  • HTTP request
  • Body parameters
  • Response

Detects the language of the text.

HTTP requestHTTP request

POST https://translate.api.cloud.yandex.net/translate/v2/detect

Body parametersBody parameters

{
  "text": "string",
  "languageCodeHints": [
    "string"
  ],
  "folderId": "string"
}

Field

Description

text

string

Required field. The text to detect the language for.

languageCodeHints[]

string

List of the most likely languages. These languages will be given preference when detecting the text language.
Most languages are specified in ISO 639-1 format (for example, ru), but the field are not limited to it.

To get the list of supported languages, use a TranslationService.ListLanguages request.

folderId

string

ID of the folder to which you have access.

Required for authorization with a user account.

Don't specify this field if you make the request on behalf of a service account.

ResponseResponse

HTTP Code: 200 - OK

{
  "languageCode": "string"
}

Field

Description

languageCode

string

Most languages are specified in ISO 639-1 format (for example, ru), but the field are not limited to it.

To get the language name, use a TranslationService.ListLanguages request.

Was the article helpful?

Previous
Translate
Next
ListLanguages
Yandex project
© 2025 Yandex.Cloud LLC