How to get PDF info from URL for PDF information API in Python and Web API

Follow this simple tutorial to learn get PDF info from URL to have PDF information API in Python

These simple tutorials explain the code material for beginners and advanced programmers who are using Python. Web API was designed to assist PDF information API in Python. Web API is the Web API with a set of tools for documents manipulation, data conversion, data extraction, splitting and merging of documents. Includes image recognition, built-in OCR, barcode generation and barcode decoders to decode bar codes from scans, pictures and pdf.

The SDK samples displayed below below explain how to quickly make your application do PDF information API in Python with the help of Web API. This sample code in Python is all you need. Just copy-paste it to the code editor, then add a reference to Web API and you are ready to try it! You can use these Python sample examples in one or many applications.

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 # Prepare URL for 'PDF Info' API request url = "{}/pdf/info".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["info"]) 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: