Translation API

Professional multi-language translation service by Ashlynn Repository

v2.0 • Enhanced Dictionary & Translation

Live API Tester

API Documentation

POST Translation Endpoint

https://translationapi.pages.dev/ Content-Type: application/json { "word": "hello", "from": "en", "to": "es" }

GET Translation Endpoint

https://translationapi.pages.dev/?word=hello&from=en&to=es

JavaScript Example

// Using fetch API fetch('https://translationapi.pages.dev/', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ word: 'hello', from: 'en', to: 'es' }) }) .then(response => response.json()) .then(data => { console.log('Translation:', data); // Access translation data console.log('Main translation:', data.data); }) .catch(error => console.error('Error:', error));

cURL Example

curl -X POST "https://translationapi.pages.dev/" \ -H "Content-Type: application/json" \ -d '{ "word": "hello", "from": "en", "to": "es" }'

Supported Languages

Use standard ISO 639-1 language codes. Here are some commonly used ones:

en

English

es

Spanish

fr

French

de

German

it

Italian

pt

Portuguese

ru

Russian

ja

Japanese

ko

Korean

zh

Chinese

ar

Arabic

hi

Hindi

Many more language codes are supported beyond those shown above.