OCREngine 2 has different json response than OCREngine 1

when i try this code in python:

with open(filename, ‘rb’) as f:
r = requests.post(‘https://api.ocr.space/parse/image’,
files={filename: f},
data=payload,
)
result = json.loads(r.content.decode())

where the payload is a dictionary:

{‘apikey’: ‘XXXXXXXXXXXXXXX’,
‘language’: ‘ger’,
‘scale’: True,
‘OCREngine’: ‘1’,
‘isCreateSearchablePdf’: False}

then the result (dictionary type) includes the ‘SearchablePDFURL’ key with content ‘Searchable PDF not generated as it was not requested.’. When i use the OCREngine 2, the result does not contain the ‘SearchablePDFURL’ key. If ‘isCreateSearchablePdf’ is set to True, then the result does contain the ‘SearchablePDFURL’ key, with the content of it being the URL.

So i was wondering if the ‘SearchablePDFURL’ key missing in OCREngine 2 (‘isCreateSearchablePdf’ set to false) is intended or just a mistake

Indeed this a bug! Thanks for reporting it. I will update this post once the issue is fixed.