OCR (Optical Character Recognition)

Optical Character Recognition (OCR) is the mechanical or electronic conversion of images of typed, handwritten or printed text into machine-encoded text, whether from a scanned document, a photo of a document, a scene-photo or from subtitle text superimposed on an image.

Widely used as a form of information entry from printed paper data records – whether passport documents, invoices, bank statements, computerized receipts, business cards, mail, printouts of static-data, or any suitable documentation – it is a common method of digitizing printed texts so that they can be electronically edited, searched, stored more compactly.


Supported Languages

API Den's OCR service supports more than 120 languages. The codes and descriptions of the available languages ​​are as follows.

afr: Afrikaans
amh: Amharic
ara: Arabic
asm: Assamese
aze: Azerbaijani
aze-cyrl: Azerbaijani (Cyrillic)
bel: Belarusian
ben: Bengali
bod: Tibetan Standard
bos: Bosnian
bre: Breton
bul: Bulgarian
cat: Catalan
ceb: Cebuano
ces: Czech
chi-sim: Chinese - Simplified
chi-sim-vert: Chinese - Simplified (vertical)
chi-tra: Chinese - Traditional
chi-tra-vert: Chinese - Traditional (vertical)
chr: Cherokee
cos: Corsican
cym: Welsh
dan: Danish
deu: German
div: Divehi
dzo: Dzongkha
ell: Greek
eng: English
enm: English, Middle (1100-1500)
epo: Esperanto
est: Estonian
eus: Basque
fao: Faroese
fas: Persian
fil: Filipino
fin: Finnish
fra: French
frk: German (Fraktur)
frm: French, Middle (ca.1400-1600)
fry: Frisian (Western)
gla: Gaelic (Scots)
gle: Irish
glg: Galician
grc: Greek, Ancient (to 1453)
guj: Gujarati
hat: Haitian
heb: Hebrew
hin: Hindi
hrv: Croatian
hun: Hungarian
hye: Armenian
iku: Inuktitut
ind: Indonesian
isl: Icelandic
ita: Italian
ita-old: Italian - Old
jav: Javanese
jpn: Japanese
jpn-vert: Japanese (vertical)
kan: Kannada
kat: Georgian
kat-old: Old Georgian
kaz: Kazakh
khm: Khmer
kir: Kyrgyz
kmr: Kurmanji (Latin)
kor: Korean
kor-vert: Korean (vertical)
lao: Lao
lat: Latin
lav: Latvian
lit: Lithuanian
ltz: Luxembourgish
mal: Malayalam
mar: Marathi
mkd: Macedonian
mlt: Maltese
mon: Mongolian
mri: Maori
msa: Malay
mya: Burmese
nep: Nepali
nld: Dutch
nor: Norwegian
oci: Occitan (post 1500)
ori: Oriya
pan: Punjabi
pol: Polish
por: Portuguese
pus: Pashto
que: Quechua
ron: Romanian
rus: Russian
san: Sanskrit
sin: Sinhala
slk: Slovakian
slv: Slovenian
snd: Sindhi
spa: Spanish
spa-old: Spanish, Castilian - Old
sqi: Albanian
srp: Serbian
srp-latn: Serbian (Latin)
sun: Sundanese
swa: Swahili
swe: Swedish
syr: Syriac
tam: Tamil
tat: Tatar
tel: Telugu
tgk: Tajik
tha: Thai
tir: Tigrinya
ton: Tonga
tur: Turkish
uig: Uyghur
ukr: Ukrainian
urd: Urdu
uzb: Uzbek
uzb-cyrl: Uzbek (Cyrillic)
vie: Vietnamese
yid: Yiddish
yor: Yoruba

Supported File Types

We currently support JPG, PNG and TIF. Multi-page PDF support is on the way!

Output Formats

OCR output can be displayed in plain text or XHTML format. The XHTML output contains the coordinates and various information of the words on the page.

Below is a part of XHTML output of a document.

Using With REST API

Let's use this sample file. - JPG, 822K [POST] https://api.apiden.com/ocr
Content-Type: application/json
  "apiKey": "3a3e7ea82f",
  "language": "eng",
  "outputFormat": "xhtml",
  "fileBase64" : "..."

apiKey: Your API key.
language: Language of the document. [Default: eng]
outputFormat: Accepted values: "text", "xhtml". [Default: "text"]
fileBase64: Base64 encoded output of file contents.

Expected response for XHTML output format:

If we choose "text" for the output format, the output would look like this.

Using With PHP Client

* Composer package will be available in few days.