Legacy API (v1)

Imibhalo ye-API

Ukuze wenze izicelo ze-API eziphumelelayo, udinga i-akhawunti eqinisekisiwe chofoza lapha ukuze ubhalise uma ungenayo i-akhawunti.

Ungakhipha ukhiye wakho we-API kudeshibhodi yakho ye-Word.to ngaphansi kwesigaba Sonjiniyela.

DOCX kumafayela

I-DOCX ibe yi-PDF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'pdf'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.pdf', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'pdf',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "pdf"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.pdf
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "pdf", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.pdf", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: pdf
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX iye ku-JPG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpg', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpg
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.jpg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: jpg
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX kuya ku-PNG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'png'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.png', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'png',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "png"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.png
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "png", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.png", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: png
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX kuya ku-XLS

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xls'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xls', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xls',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xls"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xls
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xls", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.xls", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: xls
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX kuya ku-XLSX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xlsx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xlsx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xlsx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xlsx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xlsx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xlsx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.xlsx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: xlsx
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX iya ku-ICO

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'ico'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.ico', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'ico',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "ico"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.ico
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "ico", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.ico", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: ico
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX kuya ku-BMP

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'bmp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.bmp', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'bmp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "bmp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.bmp
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "bmp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.bmp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: bmp
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX kuya ku-SVG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'svg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.svg', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'svg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "svg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.svg
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "svg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.svg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: svg
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX ku-WebP

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'webp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.webp', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'webp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "webp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.webp
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "webp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.webp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: webp
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX ku-GIF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'gif'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.gif', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'gif',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "gif"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.gif
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "gif", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.gif", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: gif
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOCX kuya ku-TIFF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'tiff'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.tiff', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'tiff',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "tiff"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.tiff
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "tiff", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.tiff", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: tiff
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX kuya ku-PSD

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'psd'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.psd', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'psd',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "psd"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.psd
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "psd", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.psd", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: psd
  • Ukuthola ifayela le-ZIP ungadlula zip: true

I-DOCX ku-JPEG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpeg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpeg', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpeg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpeg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpeg
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpeg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.jpeg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: jpeg
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOCX kuya ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC kumafayela

DOC ku-PDF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'pdf'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.pdf', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'pdf',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "pdf"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.pdf
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "pdf", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.pdf", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: pdf
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-JPG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpg', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpg
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.jpg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: jpg
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC kuya ku-PNG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'png'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.png', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'png',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "png"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.png
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "png", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.png", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: png
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC kuya ku-XLS

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xls'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xls', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xls',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xls"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xls
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xls", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.xls", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: xls
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-XLSX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xlsx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xlsx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xlsx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xlsx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xlsx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xlsx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.xlsx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: xlsx
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-ICO

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'ico'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.ico', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'ico',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "ico"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.ico
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "ico", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.ico", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: ico
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-BMP

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'bmp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.bmp', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'bmp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "bmp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.bmp
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "bmp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.bmp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: bmp
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC kuya ku-SVG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'svg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.svg', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'svg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "svg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.svg
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "svg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.svg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: svg
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-WebP

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'webp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.webp', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'webp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "webp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.webp
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "webp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.webp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: webp
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-GIF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'gif'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.gif', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'gif',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "gif"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.gif
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "gif", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.gif", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: gif
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-TIFF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'tiff'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.tiff', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'tiff',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "tiff"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.tiff
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "tiff", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.tiff", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: tiff
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-PSD

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'psd'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.psd', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'psd',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "psd"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.psd
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "psd", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.psd", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: psd
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-JPEG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpeg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpeg', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpeg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpeg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpeg
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpeg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.jpeg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: jpeg
  • Ukuthola ifayela le-ZIP ungadlula zip: true

DOC ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula zip: true

Amafayela aya ku-DOCX

I-PDF iye ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-JPG iye ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-JPEG ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-PNG iye ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-ICO iya ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-BMP iye ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-SVG iye ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-WebP iya ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: docx
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-GIF eya ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: gif
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

TIFF kuya ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: tiff
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-PSD iye ku-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: psd
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-PDF ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-JPG iye ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-JPEG ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-PNG iye ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-ICO iya ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-BMP iya ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

SVG ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-WebP iya ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-GIF ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

TIFF ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

I-PSD iya ku-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayela bese uthola i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayela bese uthola i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayela bese uthola i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayela bese uthola i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Incazelo
file Kufanele ulayishe ifayela le-Word ofuna ukuguqula.
data
  • convert_to: doc
  • Ukuthola ifayela le-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufanele uphase::
    ocr: true

Amathuluzi we-API

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {'tool': 'organize'}
data = {
    'data': json.dumps(params)
}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"tool": "organize"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.pdf

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'tool': 'organize', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

PHP :

<?php
    $post_data = array(
        "data" => "{\"tool\": \"organize\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

Ungafaka amafayili akho okuphendula kunoma yisiphi isicelo ngokudlulisa i-zip: true kulwazi lwedatha.

Ipharamitha Incazelo
file
data

Le parameter kufanele iqukathe imininingwane yethuluzi elizosetshenziswa namakhasi azowashintsha njengoku:

  • zip: true