Natural Language processingfjsdlafjsdfjaslkdjfsdljfsdjflksdjflasdjfldsjflksdjflas;djfl;sdkjflasd;jflasdkjflksdjfklsdajfiejflksdjfklasdjflksdjfkl;asdfdsfsdfha jsdlfiae fijsdklafja siofjiosdfjkldasfjosdiahflasdhnfoh sdflkk;ajdslfkjlsdfjasjfkljdf;lsjdfaisjelfasfjdksfhdsfalksdafjlsdafjlsdnfkljasdlfjk.zjdfoisjdflaksdjflasdj;flksdajfl;sdajfldsjflas;jflsa;djflsdajf.djflZSJDflksadjflkjl;zsjdfoiasdjflkejlseafnlksjafijslkfajkl;asd;f
Python
Node.js
Shell
import requests
import base64
url = "https://app.nanonets.com/api/v2/OCR/FullText"
payload={'urls': ['MY_IMAGE_URL']}
files=[
('file',('FILE_NAME',open('FILE_PATH','rb'),'application/pdf'))
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files, auth=requests.auth.HTTPBasicAuth('REPLACE_API_KEY', ''))
print(response.text)
var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');
var data = new FormData();
data.apend('urls','FILE_URL')
data.append('file', fs.createReadStream('FILE_PATH'));
var config = {
method: 'post',
url: 'https://app.nanonets.com/api/v2/OCR/FullText',
headers: {
'Authorization': 'Basic ' + Buffer.from("REPLACE_API_KEY" + ":").toString('base64'),
...data.getHeaders()
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request POST 'https://app.nanonets.com/api/v2/OCR/FullText' \
-u 'REPLACE_API_KEY:' \
--form 'file=@"FILE_PATH"'