GEThttps://edge.harktranslate.com/api/v1/translator/support-languages
Request
Send JSON (Content-Type: application/json). Form-encoded bodies are also accepted. Authenticate with the x-hark-key header.
This endpoint takes no request body.
Response
Success is HTTP 200.
| Field | Type | Description |
|---|---|---|
| code | string | Language code to send as from or to. |
| language | string | English name of that code. |
[
{ "code": "en", "language": "English" },
{ "code": "auto", "language": "Detect language" }
]Samples
Replace YOUR_API_KEY or set HARK_API_KEY. The samples call https://edge.harktranslate.com/api/v1/translator.
List languages
curl "https://edge.harktranslate.com/api/v1/translator/support-languages" \
-H "x-hark-key: YOUR_API_KEY"const response = await fetch("https://edge.harktranslate.com/api/v1/translator/support-languages", {
headers: {
"x-hark-key": process.env.HARK_API_KEY,
"Content-Type": "application/json",
},
});
if (!response.ok) {
throw new Error(`Hark responded ${response.status}`);
}
console.log(await response.json());import os
import requests
response = requests.get(
"https://edge.harktranslate.com/api/v1/translator/support-languages",
headers={"x-hark-key": os.environ["HARK_API_KEY"]},
timeout=30,
)
response.raise_for_status()
print(response.json())Status codes and machine codes are listed on the error catalog, including 200, 202, 400, 401, 403, 404, 413, 429, and 503.