How to get invoice info from URL for invoice parser API in Python and Web API

How to get invoice info from URL for invoice parser API in Python: Step By Step Instructions

This page displays the code samples for programming in Python. Web API was designed to assist invoice parser API in Python. Web API is the Rest API that provides set of data extraction functions, tools for documents manipulation, splitting and merging of pdf files. Includes built-in OCR, images recognition, can generate and read barcodes from images, scans and pdf.

This simple and easy to understand sample source code in Python for Web API contains different functions and options you should do calling the API to implement invoice parser API. This Python sample code can be used by copying and pasting into your project. Once done,just compile your project and click Run. Enjoy writing a code with ready-to-use sample Python codes to add invoice parser API functions using Web API in Python.

Our website provides free trial version of Web API that gives source code samples to assist with your Python project.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

import os import requests # pip install requests # The authentication key (API Key). # Get your own by registering at API_KEY = "******************************************" # Base URL for Web API requests BASE_URL = "" # Direct URL of PDF file to get information SourceFileURL = "" def main(args=None): getInfoFromUrl(SourceFileURL) def getInfoFromUrl(uploadedFileUrl): """Get Information using Web API""" # Prepare requests params as JSON # See documentation: parameters = {} parameters["url"] = uploadedFileUrl parameters["inline"] = True # Prepare URL for 'invoice info' API request url = "{}/pdf/invoiceparser".format(BASE_URL) # Execute request and get response as JSON response =, data=parameters, headers={ "x-api-key": API_KEY }) if (response.status_code == 200): json = response.json() if json["error"] == False: # Display information print(json["body"]) else: # Show service reported error print(json["message"]) else: print(f"Request error: {response.status_code} {response.reason}") if __name__ == '__main__': main()



Get 60 Day Free Trial

See also:


Get Your API Key

See also: