GoogleTranslate
FREE
By dimashirokov
Updated a year ago
GoogleTranslate Overview
Google Translate API translates a string in any language into another language dynamically. Google Translate API can be used for language detection as well. Test an API call in your browser and export the code snippet. The Google Translate API is priced monthly based on usage as of 3/1/2017. Read more here: https://cloud.google.com/translate/pricing
provider
rating
Followers on API
Follow this API
resourcesProvider WebsiteTerms of Service
More Details

GoogleTranslate

Google Translate Package

This package allows you to translates a string of text from one language to another.

How to get apiKey:

  1. Go to the projects page

  2. Select or create a Cloud Platform Console project.

  3. Enable billing for your project.

  4. Click Continue to enable the Translate API and any related services.

  5. On the Credentials page, get an API key (select Browser key when prompted). Note: If you have an existing API key, you can use that key.

  6. Go to the translate api overview and press the "Enable" button.

GoogleTranslate.translate

Translate string from sourceLanguage to targetLanguage

Field Type Description
apiKey string Required: The api key obtained from Google Cloud.
string string Required: The string to translate.
targetLanguage string Required: The ISO 639-1 language code to translate the input to. All supported languages
sourceLanguage string The ISO 639-1 language code the source input is written in. All supported languages

Request example

{
    "apiKey": "XXXXXXX",
    "string": "Hello",
    "sourceLanguage": "en",
    "targetLanguage": "es"
}

Response example

{
    "callback": "success",
    "contextWrites": {
        "#": {
            "to": "Hola"
        }
    }
}

GoogleTranslate.translateAutomatic

Translate string from sourceLanguage to target language automatically

Field Type Description
apiKey string Required: The api key obtained from Google Cloud.
string string Required: The string to translate.
targetLanguage string Required: The ISO 639-1 language code to translate the input to. All supported languages

Request example

{
    "apiKey": "XXXXXXX",
    "string": "Hello",
    "targetLanguage": "es"
}

Response example

{
    "callback": "success",
    "contextWrites": {
        "#": {
            "to": "Hola"
        }
    }
}

GoogleTranslate.detectLanguage

Detect language of string

Field Type Description
apiKey string Required: The api key obtained from Google Cloud.
string string Required: The string to translate.

Request example

{
    "apiKey": "XXXXXXX",
    "string": "Hello",
}

Response example

{
    "callback": "success",
    "contextWrites": {
        "#": {
            "to": "en"
        }
    }
}
Have a question about this API?Ask the API Provider.
More by dimashirokov

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication