API Documentation & Interactive Playground
Lingva.ml provides developer interfaces over REST v1 and GraphQL with zero authentication requirements.
Live API Playground
Click 'Execute Request' to see live JSON output...
1. GraphQL API Endpoint
Endpoint: POST /api/graphql
query {
translation(source: "en", target: "sl", query: "Hello world") {
source { lang { code name } text }
target { lang { code name } text }
}
}
2. REST v1 Endpoint (GET & POST)
Endpoint: GET /api/v1/:source/:target/:query or POST /api/v1/:source/:target
GET Example:
curl -s "https://lingva.ml/api/v1/en/sl/Hello%20world"
POST Example (JSON Body):
curl -X POST "https://lingva.ml/api/v1/en/sl" -H "Content-Type: application/json" -d '{"query":"Hello world"}'