This document describes how to integrate Translation APIs into your service with a REST API.
You can test the features described in this document in [Tools] > [REST API Test].
The Text translation API translates the input text into various languages. This API supports not only translation between Korean and other languages but also between a language and another language (non-Korean).
Add your REST API key
to the request header, and send a GET
or POST
request. If the request is successful, the translated_text
object containing the translated text is returned in JSON format as a list.
GET /v2/translation/translate HTTP/1.1
Host: dapi.kakao.com
Authorization: KakaoAK ${REST_API_KEY}
POST /v2/translation/translate HTTP/1.1
Host: dapi.kakao.com
Authorization: KakaoAK ${REST_API_KEY}
Content-type: application/x-www-form-urlencoded
Name | Type | Description | Required |
---|---|---|---|
query | String |
Text to be translated. Up to 5,000 characters are allowed. |
O |
src_lang | String |
Source language that is the input text to be translated. | O |
target_lang | String |
Target language that the input text is translated into. | O |
Name | Type | Description |
---|---|---|
translated_text | List of String[] |
List of translation results. A paragraphs is separated into sentences. |
curl -v --get "https://dapi.kakao.com/v2/translation/translate" \
-H "Authorization: KakaoAK ${REST_API_KEY}" \
-d "src_lang=kr" \
-d "target_lang=en" \
--data-urlencode "query=지난해 3월 오픈한 카카오톡 주문하기는 현재까지 약 250만명의 회원을 확보했으며, 주문 가능한 프랜차이즈 브랜드는 38개, 가맹점수는 약 1만 5천여곳에 달한다. 전 국민에게 친숙한 카카오톡 UI를 활용하기 때문에 남녀노소 누구나 쉽게 이용할 수 있으며, 별도의 앱을 설치할 필요 없이 카카오톡 내에서 모든 과정이 이뤄지는 것이 특징이다. 지난해 9월 업계 최초로 날짜와 시간을 예약한 뒤 설정한 매장에서 주문 음식을 찾아가는 ‘픽업’ 기능을 도입했고, 올해 1월 스마트스피커 ‘카카오미니’에서 음성을 통해 주문 가능한 메뉴를 안내받을 수 있도록 서비스를 연동하며 차별화를 꾀했다. 중소사업자들이 카카오톡 주문하기에 입점하게 되면 4,300만 카카오톡 이용자들과의 접점을 확보하고, 간편한 주문 과정으로 만족도를 높일 수 있게 된다. 카카오톡 메시지를 통해 신메뉴 출시, 프로모션 등의 소식을 전달할 수 있고, 일대일 채팅 기능을 적용하면 고객과 직접 상담도 가능하다."
curl -v -X POST "https://dapi.kakao.com/v2/translation/translate" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: KakaoAK ${REST_API_KEY}" \
-d "src_lang=kr" \
-d "target_lang=en" \
--data-urlencode "query=지난해 3월 오픈한 카카오톡 주문하기는 현재까지 약 250만명의 회원을 확보했으며, 주문 가능한 프랜차이즈 브랜드는 38개, 가맹점수는 약 1만 5천여곳에 달한다. 전 국민에게 친숙한 카카오톡 UI를 활용하기 때문에 남녀노소 누구나 쉽게 이용할 수 있으며, 별도의 앱을 설치할 필요 없이 카카오톡 내에서 모든 과정이 이뤄지는 것이 특징이다. 지난해 9월 업계 최초로 날짜와 시간을 예약한 뒤 설정한 매장에서 주문 음식을 찾아가는 ‘픽업’ 기능을 도입했고, 올해 1월 스마트스피커 ‘카카오미니’에서 음성을 통해 주문 가능한 메뉴를 안내받을 수 있도록 서비스를 연동하며 차별화를 꾀했다. 중소사업자들이 카카오톡 주문하기에 입점하게 되면 4,300만 카카오톡 이용자들과의 접점을 확보하고, 간편한 주문 과정으로 만족도를 높일 수 있게 된다. 카카오톡 메시지를 통해 신메뉴 출시, 프로모션 등의 소식을 전달할 수 있고, 일대일 채팅 기능을 적용하면 고객과 직접 상담도 가능하다."
HTTP/1.1 200 OK
{
"translated_text": [
[
"KakaoTalk orders, which opened in March last year, have secured about 2.5 million members so far, 38 franchise brands that can be ordered, and about 15,000 franchisees.",
"Because it utilizes KakaoTalk UI, which is familiar to all citizens, it is easy to use by both men and women, and it is characterized by all the processes in KakaoTalk without having to install a separate app.",
"In September last year, the company introduced the 'pickup' function, which was the first in the industry to book dates and times, and set up a store to visit order food. In January of this year, Smart speaker 'Kakao Mini'",
"You can send news such as new menu release, promotion through KakaoTalk message, and you can consult with customers directly by applying one-on-one chat function."
]
]
}
This API detects the language of the given text.
Add your REST API key
to the the HTTP Authorization header, and send a GET
or POST
request. If the request is successful, the language_info
object containing the detected language and confidence is returned in JSON format.
GET /v3/translation/language/detect HTTP/1.1
Host: dapi.kakao.com
Authorization: KakaoAK ${REST_API_KEY}
POST /v3/translation/language/detect HTTP/1.1
Host: dapi.kakao.com
Authorization: KakaoAK ${REST_API_KEY}
Content-type: application/x-www-form-urlencoded
Name | Type | Description | Required |
---|---|---|---|
query | String |
Text used to detect a language. Up to 5,000 characters are allowed. |
O |
Name | Type | Description |
---|---|---|
language_info | List of LanguageInfo |
List of detected languages sorted by highest confidence. Up to three results are returned. |
Name | Type | Description |
---|---|---|
code | String |
Language code of the detected language. |
name | String |
Detected language. |
confidence | Float |
Confidence of the detected language. A value between 0 and 1.0. |
curl -v --get "https://dapi.kakao.com/v3/translation/language/detect" \
-H "Authorization: KakaoAK ${REST_API_KEY}" \
--data-urlencode "query=Kakao Enterprise provides the AI platform essentials to enterprises by evolving Kakao’s AI technology and service expertise into innovative, ready-to-deploy business services."
curl -v -X POST "https://dapi.kakao.com/v3/translation/language/detect" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: KakaoAK ${REST_API_KEY}" \
--data-urlencode "query=Kakao Enterprise provides the AI platform essentials to enterprises by evolving Kakao’s AI technology and service expertise into innovative, ready-to-deploy business services."
HTTP/1.1 200 OK
{
"language_info": [
{
"code": "en",
"name": "English",
"confidence": 0.99706
},
{
"code": "de",
"name": "German",
"confidence": 0.00253
},
{
"code": "es",
"name": "Spanish",
"confidence": 0.00019
}
]
}
HTTP/1.1 200 OK
{
"language_info": [
{
"code": "N/A",
"name": "Unsupported language detected.",
"confidence": 0
}
]
}