Detect language

Prev Next

Available in Classic and VPC

Automatically detect the language of the entered text. It recognizes a total of 15 languages.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /dect

Request headers

For information about the headers common to all Papago Translation APIs, see Common Papago Translation headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
query String Required Text to detect language for

Request example

The request example is as follows:

curl --location --request POST 'https://papago.apigw.ntruss.com/langs/v1/dect' \
--header 'X-NCP-APIGW-API-KEY-ID: {Client ID issued when registering the app}' \
--header 'X-NCP-APIGW-API-KEY: {Client secret issued when registering the app}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=Yo como manzana todos mananas.'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
langCode String - Language code
  • ko (Korean) | en (English) | ja (Japanese) | zh-CN (Chinese (Simplified)) | zh-TW (Chinese (Traditional)) | vi (Vietnamese) | th (Thai) | id (Indonesian) | fr (French) | es (Spanish) | ru (Russian) | de (German) | it (Italian) | pt (Portuguese) | hi (Hindi)

Response status codes

For information about the HTTP status codes common to all Papago Translation APIs, see Common Papago Translation response status codes.

Response example

The response example is as follows:

{
    "langCode": "es"
}