Google translation unlimited

FREEMIUM
Durch Åndry RL | Aktualisiert לפני שעתיים | Translation
Popularität

9.4 / 10

Latenz

1,199ms

Service Level

100%

Health Check

100%

Zurück zu allen Tutorials (1)

How to use # Google Translation Unlimited ?

Google Translation Unlimited API Tutorial

Introduction

The Google Translation Unlimited API provides seamless translation capabilities, language detection, and supported language listing.

Routes

Translate

  • Endpoint: /translate
  • Description: Translates text from a source language to a target language.
  • HTTP Method: POST
  • Parameters:
    • source (optional, default “auto”): Source language of the text to translate.
    • target: Target language to translate the text into.
    • text: Text to translate.
  • Response: Translated text in the target language.

Detect

  • Endpoint: /detect
  • Description: Detects the language of the given text.
  • HTTP Method: POST
  • Parameters:
    • text: Text you want to detect the language of.
  • Response: Detected language of the text.

Support

  • Endpoint: /support
  • Description: Provides the list of languages supported by the API.
  • HTTP Method: GET
  • Response: List of supported languages with their language codes.

Usage

Here’s an example of using the translation API in Python:

import requests

url = "https://google-translation-unlimited.p.rapidapi.com/translate"

payload = {
    "texte": "Hello darling, what are you doing now? I'm happy to speak with you my love",
    "to_lang": "fr"
}
headers = {
    "content-type": "application/x-www-form-urlencoded",
    "X-RapidAPI-Key": "your RapidApi keys", # Add your RapidAPI key here
    "X-RapidAPI-Host": "google-translation-unlimited.p.rapidapi.com"
}

response = requests.post(url, data=payload, headers=headers)

if response.status_code == 200:
    translated_text = response.json()["translated_text"]
    print("Translated Text:", translated_text)
else:
    print("Error:", response.text)

If you have any problem, contact:

License

Apache License
Copyright © 2019 蓝色的秋风