Currently undergoing maintenance - Some pages may not work as expected

Simple Translation Api

Introduction

This is a simple translation api that translates the given text to the given language using google translate.

Usage

To use this api, just send a GET request to the following endpoint:

https://api.jm26.net/translate/

For example, if you want to translate the text Hello World to German, you can send a GET request to the following url:

curl -X GET "https://api.jm26.net/translate/?q=Hello%20World&lang=de"

The response will be:

{
  "status": "success",
  "message": "Translation successful.",
  "lang": "de",
  "translation": "Hallo Welt"
}

Parameters

The following parameters are available:

Parameter Description Default Required
q The text to translate - ✔️
lang The language to translate to en
from The language to translate from auto
format The format of the response (json/text) json

More Examples

Translate to English

curl -X GET "https://api.jm26.net/translate/?q=Hallo%20Welt"
{
  "status": "success",
  "message": "Translation successful.",
  "lang": "en",
  "translation": "Hello world"
}

Translate from French to Italian with text format

curl -X GET "https://api.jm26.net/translate/?q=Bonjour%20le%20monde&lang=it&from=fr&format=text"
Ciao mondo