Legacy API (v1)

API dokumentazioa

API eskaera arrakastatsuak egiteko, egiaztatutako kontua behar duzu, egin klik hemen erregistratzeko , dagoeneko konturik ez baduzu.

Zure API gakoa sor dezakezu Word.to panelean Garatzaileen atalean.

DOCX fitxategietara

DOCX PDFra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: pdf
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCXetik JPGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: jpg
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX PNGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: png
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCXetik XLSra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: xls
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCXetik XLSXra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: xlsx
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX ICOra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: ico
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX BMPra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: bmp
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX SVGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: svg
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX WebP-ra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: webp
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX GIFra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: gif
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX TIFFera

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: tiff
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX PSDra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: psd
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCXetik JPEGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: jpeg
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCX-tik DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC fitxategietara

DOC PDFra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: pdf
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC JPGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: jpg
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC PNGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: png
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCetik XLSra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: xls
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCetik XLSXra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: xlsx
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC ICOra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: ico
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC BMPra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: bmp
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC SVGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: svg
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC WebP-ra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: webp
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC GIFra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: gif
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC TIFFera

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: tiff
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC PSDra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: psd
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOCetik JPEGra

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: jpeg
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

DOC-etik DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu zip: true

Fitxategiak DOCX-era

PDFa DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

JPG-tik DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

JPEG-tik DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

PNG-tik DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

ICO-tik DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

BMP-tik DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

SVG-ra DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

WebP-ra DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: docx
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

GIF-era DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: gif
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

TIFF-era DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: tiff
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

PSD-tik DOCX-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: psd
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

PDFa DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

JPG DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

JPEG-tik DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

PNG-tik DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

ICO DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

BMP-tik DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

SVG-ra DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

WebP-ra DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

GIF DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

TIFF-era DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

PSD-tik DOC-era

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)
# Bihurtu fitxategia eta eskuratu ZIP kodea
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'));
});
// Bihurtu fitxategia eta eskuratu ZIP kodea
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
// Bihurtu fitxategia eta eskuratu ZIP kodea
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);
?>
// Bihurtu fitxategia eta eskuratu ZIP kodea
<?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);
?>
Parametroa Deskribapena
file Bihurtu nahi duzun Word fitxategia igo behar duzu.
data
  • convert_to: doc
  • ZIP fitxategia lortzeko pasatu dezakezu:
    zip: true
  • OCR erabiliz bihurtzeko hau pasatu behar duzu::
    ocr: true

API tresnak

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);
?>

Edozein eskaeratan zure erantzun fitxategiak konprimitu ditzakezu datuen informazioan zip: egia pasatuz.

Parametroa Deskribapena
file
data

Parametro honek erabili beharreko tresnaren informazioa eta honela aldatu beharreko orriak izan beharko lituzke:

  • zip: true