Transliteratsiya API
Telegram bot, sayt yoki ilovangizga oʻgirish funksiyasini qoʻshing. Bepul, kalit talab qilinmaydi (daqiqasiga 60 soʻrov).
GET soʻrov
GET https://orfograf.uz/api/convert?to=lat&text=Ўзбекистон
POST soʻrov (JSON)
curl -X POST https://orfograf.uz/api/convert \
-H "Content-Type: application/json" \
-d '{"text":"Oʻzbekiston shahar","from":"lat","to":"new"}'
Javob
{ "from": "lat", "to": "new", "result": "Özbekiston şahar" }
Parametrlar
| Nomi | Qiymat |
|---|---|
text | Matn (100 000 belgigacha) |
from | auto (standart), cyr, lat, new |
to | cyr, lat, new |
apostrophe | official (oʻ) yoki simple (o') |
Imlo tekshirish
POST https://orfograf.uz/api/imlo {"text":"Xozir 2026 yil"}
→ { "issues": [ { "text": "Xozir", "fix": "Hozir", ... }, ... ], "fixed": "Hozir 2026-yil" }
JavaScript
const r = await fetch("https://orfograf.uz/api/convert", { method: "POST",
headers: { "Content-Type": "application/json" }, body: JSON.stringify({ text: "Салом дунё", to: "lat" }) });
console.log((await r.json()).result); // Salom dunyo
Python
import requests
print(requests.post("https://orfograf.uz/api/convert", json={"text": "Salom", "to": "cyr"}).json()["result"]) # Салом