PDF.co Web API (Application Programming Interface)

Get Your Free API Key

Supported Formats

json

Supported Formats

json

Errors

Code Description
400 bad input parameters
401 unauthorized
403 not enough credits
405 Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info

Params

Param name Description
file
optional

Source file to calculate hash.

url
optional

URL of the file to calculate hash.

  • Must be a String

POST - https://api.pdf.co/v1/file/upload/base64
Upload a file to the cloud to use in other API methods. Uploaded files are automatically deleted after 1 hour.

Supported Formats

json

Errors

Code Description
400 bad input parameters
401 unauthorized
403 not enough credits
405 Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info

Params

Param name Description
name
optional

The name the file will be stored with.

  • Must be a String

file
required

Base64-encoded file bytes.

  • Must be a String

GET - https://api.pdf.co/v1/file/upload/get-presigned-url
Gets preassigned URL for binary file upload to the cloud to use in other API methods. Uploaded files are automatically deleted after 1 hour.

Supported Formats

json

Errors

Code Description
400 bad input parameters
401 unauthorized
403 not enough credits
405 Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info

Params

Param name Description
name
optional

The name the file will be stored with.

  • Must be a String

contenttype
optional

Content-Type describing the data contained in the request body, Use 'binary/octet-stream'.

  • Must be a String

encrypt
optional

Enable encryption for output file.

  • Must be one of: true, false.

Supported Formats

json

Errors

Code Description
400 bad input parameters
401 unauthorized
403 not enough credits
405 Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info

Params

Param name Description
name
optional

The name the file will be stored with.

  • Must be a String

url
required

URL of the file to upload.

  • Must be a String

Supported Formats

json

Errors

Code Description
400 bad input parameters
401 unauthorized
403 not enough credits
405 Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info

Params

Param name Description
name
optional

The name the file will be stored with.

  • Must be a String

file
required

Source File.

  • Must be a String