Your email address belongs to a school and you are eligible for a free educational premium account.
Learn more

Convert anything to TXT

The API for converting any file to TXT.
On the left you can see all available conversion options that you use as options section of the JSON.

Arguments

allow_multiple_outputs
Type: boolean
Default: False
If the conversion produces more than one output file, by default all of them are compressed in just one file. Set this option to true if you want a download link for each file.
download_password
Type: string
Pattern: ^[ -~]{0,1000}$
Example: secret_password
A password to protect the download. To download the file send the password in the x-oc-download-password header or set a cookie named x-oc-download-password. The value contains a comma separated list of passwords.
language
Type: string
Pattern: ^[a-zA-Z_,-]{3,128}$
Example: rus,eng,deu
Language for the source (using ISO 639-2/T standard). In case of multi language documents, a comma separated list of values without quotes or spaces can be used. Please note that both plain and script languages cannot be included at the same time. Supported values are: afr, amh, ara, asm, aze, aze_cyrl, bel, ben, bod, bos, bre, bul, cat, ceb, ces, chi_sim, chi_sim_vert, chi_tra, chi_tra_vert, chr, cos, cym, dan, deu, div, dzo, ell, eng, enm, epo, est, eus, fao, fas, fil, fin, fra, frk, frm, fry, gla, gle, glg, grc, guj, hat, heb, hin, hrv, hun, hye, iku, ind, isl, ita, ita_old, jav, jpn, jpn_vert, kan, kat, kat_old, kaz, khm, kir, kmr, kor, kor_vert, lao, lat, lav, lit, ltz, mal, mar, mkd, mlt, mon, mri, msa, mya, nep, nld, nor, oci, ori, pan, pol, por, pus, que, ron, rus, san, sin, slk, slv, snd, spa, spa_old, sqi, srp, srp_latn, sun, swa, swe, syr, tam, tat, tel, tgk, tgl, tha, tir, ton, tur, uig, ukr, urd, uzb, uzb_cyrl, vie, yid, yor, script-Arabic, script-Armenian, script-Bengali, script-Canadian_Aboriginal, script-Cherokee, script-Cyrillic, script-Devanagari, script-Ethiopic, script-Fraktur, script-Georgian, script-Greek, script-Gujarati, script-Gurmukhi, script-Hangul, script-Hangul_vert, script-HanS, script-HanS_vert, script-HanT, script-HanT_vert, script-Hebrew, script-Japanese, script-Japanese_vert, script-Kannada, script-Khmer, script-Lao, script-Latin, script-Malayalam, script-Myanmar, script-Oriya, script-Sinhala, script-Syriac, script-Tamil, script-Telugu, script-Thaana, script-Thai, script-Tibetan, script-Vietnamese
ocr
Type: boolean
Optical character recognition
ocr_filter
Type: string
Enum: gray
Apply a filter to the input file. It may improve text detection.
ocr_mode
Type: string
Enum: text layout
Default: layout
Optical character recognition optimization for text correctness or layout as close as possible to the original one
ocr_page_structure
Type: string
Enum: auto single_column uniform_block_vertical uniform_text single_line single_word single_char unstructured raw_line
Page structure description to the OCR engine. It may help to have a better result. If your first attempt with automatic page structure detection fails or if you know in advance the structure of your pages, you can try with a more specific one.
output_filename
Type: string
Pattern: ^[\w\W]{0,255}$
Example: my_base_filename_without_extension
The desired file name of the converted file WITHOUT the file extension.
preset
Type: string
Pattern: ^[\w\W]{1,255}$
Predefined options

Example Request

POST /v2/jobs HTTP/1.1
Host: https://api.api2convert.com
X-Oc-Api-Key: <your API key here>
Content-Type: application/json
{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/document/doc/example.doc"
    }],
    "conversion": [{
        "category": "document",
        "target": "txt",
        "options": {
            <conversion options here>
        }
    }]
}