Google Translation API Documentation

A Google Cloud Translation Basic v2 compatible API for translating text, detecting its language, and listing supported languages.

Debug the Translation API

Translate text

In an existing Google Cloud Translation Basic v2 integration, replace translation.googleapis.com with gmapapi.jsonutil.online and use a key issued by this service with the translate permission. You can run the examples below with the public test key DEBUG_KEY_FOR_TESTING.

Translation and detection count toward character quotas. The language list has a separate request quota.

Example request

curl 'https://gmapapi.jsonutil.online/language/translate/v2' \
  -H 'Content-Type: application/json' \
  --data '{"key":"DEBUG_KEY_FOR_TESTING","q":["Hello"],"target":"zh-CN","format":"text"}'

Request parameters

q
An array of one or more strings to translate.
source
Source language, such as en. Omit it to detect the language automatically.
target
Required target language, such as zh-CN for Simplified Chinese or ja for Japanese.
format
Use text for plain text or html to preserve HTML markup.

Example response

{
  "data": {
    "translations": [
      {"translatedText": "你好", "detectedSourceLanguage": "en"}
    ]
  }
}

Read the first translation from data.translations[0].translatedText.

Cloud Translation Basic v2 reference

Detect language

Send the input text in q. Read the first result from data.detections[0][0].language.

curl 'https://gmapapi.jsonutil.online/language/translate/v2/detect' \
  -H 'Content-Type: application/json' \
  --data '{"key":"DEBUG_KEY_FOR_TESTING","q":["Hello"]}'
Debug language detection

Supported languages

Read available language codes from data.languages. Set the optional target parameter to localize the returned language names.

curl 'https://gmapapi.jsonutil.online/language/translate/v2/languages?key=DEBUG_KEY_FOR_TESTING&target=en'
Debug the language list

Set up translation in SaleSmartly

Add an External Request action to your workflow and pass the translated text to the Send Message action.

Read the SaleSmartly setup guide

API key usage

Enter the API key you use for requests. Dates follow Beijing time.

Enter an API key to see usage.