PDF.co API

PDF.co Web REST API documentation

Download Postman Collection

Explore Source Code Samples
js, php, c#, vb.net, java, curl, powershell

Document Parser Templates Guide

return to www.PDF.co

PDF.co API v.1

back to top

Postman Collection

Explore Postman collection online on this page

Download Postman Collection (in JSON format) here

back to top

Key Benefits

back to top

How to use API with large files and with 100+ pages documents

We’ve designed special async that is available for almost all endpioints. With async mode you can process large files and documents with hundreds of pages.

Asynchronious mode and background jobs: step by step

  1. Request a temporary URL for upload using /file/upload/get-presigned-url. This will return presignedUrl to be used for uploading and url that must be used to access uploaded file.
  2. Upload your file using PUT to this presignedUrl generated on the previous step. Once finished, your file can be accessed using the url link from step 1
  3. Call API method wuth input set in url param. Set async param to true so API method will return immediately and will send you output URL (or set of URLs) along with jobId immediately. jobId is the unique identificator of the background job that will be running on the server.
  4. Now check status of this background job using /job/check API method with jobId param. It will return execution status.
  5. Once /job/check returns status param as success you may use the previously generated output URL (or set of URLs) to download generated data.

back to top

Source Code Samples

We have hundreds of ready to copy Explore Source Code Samples on Github available for Javascript, Node.js, PHP, Java, C# and Visual Basic NET.

back to top

Known Issues

back to top

Contact Customer Support for API users

Our dedicated API users support team is happy to help with integrations and with proof of concept projects! Please click here to send request (recommended) or send email to pdfco@bytescout.zendesk.com

back to top

Indices


back to top

Barcode Generator

Description: Generates high quality printable and scannable barcodes as images or PDF. All popular types are supported from Code 39, Code 128 to QR Code, Datamatrix and PDF417. GET or POST request.

Other supported values for type param to set other barcodes:

Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417Truncated, DataMatrix, QRCode, Aztec, Planet, EAN128, GS1_128, USPSSackLabel, USPSTrayLabel, DeutschePostIdentcode, DeutschePostLeitcode, Numly, PZN, OpticalProduct, SwissPostParcel, RoyalMail, DutchKix, SingaporePostalCode, EAN2, EAN5, EAN14, MacroPDF417, MicroPDF417, GS1_DataMatrix, Telepen, IntelligentMail, GS1_DataBar_Omnidirectional, GS1_DataBar_Truncated, GS1_DataBar_Stacked, GS1_DataBar_Stacked_Omnidirectional, GS1_DataBar_Limited, GS1_DataBar_Expanded, GS1_DataBar_Expanded_Stacked, MaxiCode, Plessey, MSI, ITF14, GTIN12, GTIN8, GTIN13, GTIN14.

Status Errors

Code Description
200 all is OK
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
"name" : "barcode.png",
"type" : "Code128",
"value" : "abcdef123456"
}

#back to top

1. /barcode/generate

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/barcode/generate

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
name barcode.png optional. Filename for the generated image. Must be a String
value abcdef123456 optional. Value to be encoded into barcode. Must be a String
type QRCode optional. Sets barcode type. QRCode is default. Available values: Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417Truncated, DataMatrix, QRCode, Aztec, Planet, EAN128, GS1_128, USPSSackLabel, USPSTrayLabel, DeutschePostIdentcode, DeutschePostLeitcode, Numly, PZN, OpticalProduct, SwissPostParcel, RoyalMail, DutchKix, SingaporePostalCode, EAN2, EAN5, EAN14, MacroPDF417, MicroPDF417, GS1_DataMatrix, Telepen, IntelligentMail, GS1_DataBar_Omnidirectional, GS1_DataBar_Truncated, GS1_DataBar_Stacked, GS1_DataBar_Stacked_Omnidirectional, GS1_DataBar_Limited, GS1_DataBar_Expanded, GS1_DataBar_Expanded_Stacked, MaxiCode, Plessey, MSI, ITF14, GTIN12, GTIN8, GTIN13, GTIN14.
decorationImage https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-generator/logo.png optional. works for QR Code only. Set this to the image that you want to be inserted logo inside QR Code barcode. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

Responses:

Status: /barcode/generate Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/8f8aaca421d64bc2a9bb9158c024db95/barcode.png",
    "error": false,
    "status": 200,
    "name": "barcode.png",
    "remainingCredits": 98161
}

#back to top

2. /barcode/generate

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/barcode/generate

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
name barcode.png optional. Filename for the generated image. Must be a String
value abcdef123456 optional. Value to be encoded into barcode. Must be a String
type QRCode optional. Sets barcode type. QRCode is default. Available values: Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417Truncated, DataMatrix, QRCode, Aztec, Planet, EAN128, GS1_128, USPSSackLabel, USPSTrayLabel, DeutschePostIdentcode, DeutschePostLeitcode, Numly, PZN, OpticalProduct, SwissPostParcel, RoyalMail, DutchKix, SingaporePostalCode, EAN2, EAN5, EAN14, MacroPDF417, MicroPDF417, GS1_DataMatrix, Telepen, IntelligentMail, GS1_DataBar_Omnidirectional, GS1_DataBar_Truncated, GS1_DataBar_Stacked, GS1_DataBar_Stacked_Omnidirectional, GS1_DataBar_Limited, GS1_DataBar_Expanded, GS1_DataBar_Expanded_Stacked, MaxiCode, Plessey, MSI, ITF14, GTIN12, GTIN8, GTIN13, GTIN14.
decorationImage https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-generator/logo.png optional. works for QR Code only. Set this to the image that you want to be inserted logo inside QR Code barcode. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

Responses:

Status: /barcode/generate Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/b867d6fcab2d4930845450752849e619/barcode.png",
    "error": false,
    "status": 200,
    "name": "barcode.png",
    "remainingCredits": 98160
}

back to top

Barcode Reader

Description: Read barcodes from images, tiff, pdf documents, scanned documents. All popular types of barcodes are supported from Code 39, Code 128 to QR Code, Datamatrix and PDF417. Supports noisy and damaged barcodes, scans, documents. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
	"types" : "Code128,Code39,Interleaved2of5,EAN13",
	"pages" : "",
	"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf"
}

#back to top

1. /barcode/read/from/url

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/barcode/read/from/url

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
types Code128,Code39,Interleaved2of5,EAN13 optional. Comma-separated list of barcode types to decode. Valid types: AustralianPostCode, Aztec, CircularI2of5, Codabar, CodablockF, Code128, Code16K, Code39, Code39Extended, Code39Mod43, Code39Mod43Extended, Code93, DataMatrix, EAN13, EAN2, EAN5, EAN8, GS1, GS1DataBarExpanded, GS1DataBarExpandedStacked, GS1DataBarLimited, GS1DataBarOmnidirectional, GS1DataBarStacked, GTIN12, GTIN13, GTIN14, GTIN8, IntelligentMail, Interleaved2of5, ITF14, MaxiCode, MICR, MicroPDF, MSI, PatchCode, PDF417, Pharmacode, PostNet, PZN, QRCode, RoyalMail, RoyalMailKIX, Trioptic, UPCA, UPCE, UPU. Must be a String.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /barcode/read/from/url Code: 200
{
    "barcodes": [
        {
            "Value": "test123",
            "RawData": null,
            "Type": 2,
            "Rect": "{X=111,Y=60,Width=255,Height=37}",
            "Page": 0,
            "File": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.90625155,
            "TypeName": "Code128"
        },
        {
            "Value": "123456",
            "RawData": null,
            "Type": 4,
            "Rect": "{X=111,Y=129,Width=306,Height=37}",
            "Page": 0,
            "File": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.7710818,
            "TypeName": "Code39"
        },
        {
            "Value": "<FNC1>0112345678901231",
            "RawData": null,
            "Type": 2,
            "Rect": "{X=111,Y=198,Width=305,Height=37}",
            "Page": 0,
            "File": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.9156459,
            "TypeName": "Code128"
        },
        {
            "Value": "12345670",
            "RawData": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                0
            ],
            "Type": 5,
            "Rect": "{X=111,Y=267,Width=182,Height=0}",
            "Page": 0,
            "File": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 1,
            "TypeName": "I2of5"
        },
        {
            "Value": "1234567890128",
            "RawData": null,
            "Type": 6,
            "Rect": "{X=102,Y=336,Width=71,Height=72}",
            "Page": 0,
            "File": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.895925164,
            "TypeName": "EAN13"
        }
    ],
    "pageCount": 1,
    "error": false,
    "status": 200,
    "remainingCredits": 98155
}

#back to top

2. /barcode/read/from/url

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/barcode/read/from/url

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
types Code128,Code39,Interleaved2of5,EAN13 optional. Comma-separated list of barcode types to decode. Valid types: AustralianPostCode, Aztec, CircularI2of5, Codabar, CodablockF, Code128, Code16K, Code39, Code39Extended, Code39Mod43, Code39Mod43Extended, Code93, DataMatrix, EAN13, EAN2, EAN5, EAN8, GS1, GS1DataBarExpanded, GS1DataBarExpandedStacked, GS1DataBarLimited, GS1DataBarOmnidirectional, GS1DataBarStacked, GTIN12, GTIN13, GTIN14, GTIN8, IntelligentMail, Interleaved2of5, ITF14, MaxiCode, MICR, MicroPDF, MSI, PatchCode, PDF417, Pharmacode, PostNet, PZN, QRCode, RoyalMail, RoyalMailKIX, Trioptic, UPCA, UPCE, UPU. Must be a String.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /barcode/read/from/url Code: 200
{
    "barcodes": [
        {
            "Value": "test123",
            "RawData": null,
            "Type": 2,
            "Rect": "{X=111,Y=60,Width=255,Height=37}",
            "Page": 0,
            "File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.90625155,
            "TypeName": "Code128"
        },
        {
            "Value": "123456",
            "RawData": null,
            "Type": 4,
            "Rect": "{X=111,Y=129,Width=306,Height=37}",
            "Page": 0,
            "File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.7710818,
            "TypeName": "Code39"
        },
        {
            "Value": "<FNC1>0112345678901231",
            "RawData": null,
            "Type": 2,
            "Rect": "{X=111,Y=198,Width=305,Height=37}",
            "Page": 0,
            "File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.9156459,
            "TypeName": "Code128"
        },
        {
            "Value": "12345670",
            "RawData": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                0
            ],
            "Type": 5,
            "Rect": "{X=111,Y=267,Width=182,Height=0}",
            "Page": 0,
            "File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 1,
            "TypeName": "I2of5"
        },
        {
            "Value": "1234567890128",
            "RawData": null,
            "Type": 6,
            "Rect": "{X=102,Y=336,Width=71,Height=72}",
            "Page": 0,
            "File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
            "Confidence": 0.895925164,
            "TypeName": "EAN13"
        }
    ],
    "pageCount": 1,
    "error": false,
    "status": 200,
    "remainingCredits": 98150
}

back to top

Document Parser (for complex documents)

Document Parser is the powerful parser that can read multiple values from documents. Supports extraction by coordinates, by patterns. Supports multiple languages inside the same document. Can extract tables (including multi-page tables)

#back to top

1. POST /pdf/documentparser

Description: Parses and gets data from documents using previously prepared custom data extraction template. With this API method you may extract data from custom areas, by search, form fields, tables, multiple pages and more! Please use GET or POST request.

To create and prepare new document parsing template, please download and use Document Parser Template Editor (for Windows)

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample PDF document with tables and multiple pages: https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf

SampleTemplate.yml:

---
# Template that demonstrates parsing of multi-page table using only
# regular expressions for the table start, end, and rows.
# If regular expression cannot be written for every table row (for example,
# if the table contains empty cells), try the second method demonstrated
# in `MultiPageTable-template2.yml` template.
templateVersion: 3
templatePriority: 0
sourceId: Multipage Table Test
detectionRules:
  keywords:
  - Sample document with multi-page table
fields:
  total:
    type: regex
    expression: TOTAL 
    dataType: decimal
tables:
- name: table1
  start:
    # regular expression to find the table start in document
    expression: Item\s+Description\s+Price\s+Qty\s+Extended Price
  end:
    # regular expression to find the table end in document
    expression: TOTAL\s+\d+\.\d\d
  row:
    # regular expression to find table rows
    expression: '^\s*(?<itemNo>\d+)\s+(?<description>.+?)\s+(?<price>\d+\.\d\d)\s+(?<qty>\d+)\s+(?<extPrice>\d+\.\d\d)'
  columns:
  - name: itemNo
    type: integer
  - name: description
    type: string
  - name: price
    type: decimal
  - name: qty
    type: integer
  - name: extPrice
    type: decimal
  multipage: true

NOTE: this template should be set as template param. Also you see Template Creation Guide and download Document Parser Template Editor for Windows Desktop for full experience.

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
"url" : "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf",
"inline": "true",
"template": "--- 
detectionRules: 
  keywords: 
    - "Sample document with multi-page table"
fields: 
  total: 
    dataType: decimal
    expression: "TOTAL "
    type: regex
sourceId: "Multipage Table Test"
tables: 
  - 
    columns: 
      - 
        name: itemNo
        type: integer
      - 
        name: description
        type: string
      - 
        name: price
        type: decimal
      - 
        name: qty
        type: integer
      - 
        name: extPrice
        type: decimal
    end: 
      expression: TOTAL\s+\d+\.\d\d
    multipage: true
    name: table1
    row: 
      expression: ^\s*(?<itemNo>\d+)\s+(?<description>.+?)\s+(?<price>\d+\.\d\d)\s+(?<qty>\d+)\s+(?<extPrice>\d+\.\d\d)
    start: 
      expression: "Item\\s+Description\\s+Price\\s+Qty\\s+Extended Price"
templatePriority: 0
templateVersion: 3
"

}

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/documentparser

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

| Key | Value | Description | | — | ——|————-| | async | | optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false. | | encrypt | | optional.Enable encryption for output file. Must be one of: true, false. | | inline | true | optional. Must be one of: true, false. | | url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf | required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. | | profiles | | optional. Must be a String. | | name | | optional. File name for generated output. Must be a String. | | password | | optional. Password of PDF file. Must be a String | | unwrap | | optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String. | | pages | | optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String. | | templateId | 1 | optional. ID of the template to be used. Add, manage templates at https://app.pdf.co/document-parser-templates | | template | — detectionRules: keywords: - “Sample document with multi-page table” fields: total: dataType: decimal expression: “TOTAL “ type: regex sourceId: “Multipage Table Test” tables:

Responses:

Status: POST /pdf/documentparser Code: 200
{
    "body": {
        "objects": [
            {
                "name": "companyName",
                "objectType": "field",
                "value": "Amazon Web Services, Inc",
                "rectangle": [
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "companyName2",
                "objectType": "field",
                "value": "Amazon Web Services, Inc",
                "rectangle": [
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "invoiceId",
                "objectType": "field",
                "value": "123456789",
                "pageIndex": 0,
                "rectangle": [
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "dateIssued",
                "objectType": "field",
                "value": "2018-04-03T00:00:00",
                "pageIndex": 0,
                "rectangle": [
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "dateDue",
                "objectType": "field",
                "value": "2018-04-03T00:00:00",
                "pageIndex": 0,
                "rectangle": [
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "total",
                "objectType": "field",
                "value": 6.58,
                "pageIndex": 0,
                "rectangle": [
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "subTotal",
                "objectType": "field",
                "value": ""
            },
            {
                "name": "tax",
                "objectType": "field",
                "value": 1.01,
                "pageIndex": 0,
                "rectangle": [
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "objectType": "table",
                "name": "table",
                "rows": []
            }
        ],
        "templateName": "Generic Invoice [en]",
        "templateVersion": "4",
        "timestamp": "2020-07-16T22:04:25"
    },
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "sample-invoice.json",
    "remainingCredits": 77731
}

#back to top

2. /pdf/documentparser Custom Template

Description: Parses and gets data from documents using previously prepared custom data extraction template. With this API method you may extract data from custom areas, by search, form fields, tables, multiple pages and more! Please use GET or POST request.

To create and prepare new document parsing template, please download and use Document Parser Template Editor (for Windows)

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample PDF document with tables and multiple pages: https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf

SampleTemplate.yml:

---
# Template that demonstrates parsing of multi-page table using only
# regular expressions for the table start, end, and rows.
# If regular expression cannot be written for every table row (for example,
# if the table contains empty cells), try the second method demonstrated
# in `MultiPageTable-template2.yml` template.
templateVersion: 3
templatePriority: 0
sourceId: Multipage Table Test
detectionRules:
  keywords:
  - Sample document with multi-page table
fields:
  total:
    type: regex
    expression: TOTAL 
    dataType: decimal
tables:
- name: table1
  start:
    # regular expression to find the table start in document
    expression: Item\s+Description\s+Price\s+Qty\s+Extended Price
  end:
    # regular expression to find the table end in document
    expression: TOTAL\s+\d+\.\d\d
  row:
    # regular expression to find table rows
    expression: '^\s*(?<itemNo>\d+)\s+(?<description>.+?)\s+(?<price>\d+\.\d\d)\s+(?<qty>\d+)\s+(?<extPrice>\d+\.\d\d)'
  columns:
  - name: itemNo
    type: integer
  - name: description
    type: string
  - name: price
    type: decimal
  - name: qty
    type: integer
  - name: extPrice
    type: decimal
  multipage: true

NOTE: this template should be set as template param. Also you see Template Creation Guide and download Document Parser Template Editor for Windows Desktop for full experience.

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
"url" : "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf",
"inline": "true",
"template": "--- 
detectionRules: 
  keywords: 
    - "Sample document with multi-page table"
fields: 
  total: 
    dataType: decimal
    expression: "TOTAL "
    type: regex
sourceId: "Multipage Table Test"
tables: 
  - 
    columns: 
      - 
        name: itemNo
        type: integer
      - 
        name: description
        type: string
      - 
        name: price
        type: decimal
      - 
        name: qty
        type: integer
      - 
        name: extPrice
        type: decimal
    end: 
      expression: TOTAL\s+\d+\.\d\d
    multipage: true
    name: table1
    row: 
      expression: ^\s*(?<itemNo>\d+)\s+(?<description>.+?)\s+(?<price>\d+\.\d\d)\s+(?<qty>\d+)\s+(?<extPrice>\d+\.\d\d)
    start: 
      expression: "Item\\s+Description\\s+Price\\s+Qty\\s+Extended Price"
templatePriority: 0
templateVersion: 3
"

}

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/documentparser

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

| Key | Value | Description | | — | ——|————-| | async | | optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false. | | encrypt | | optional.Enable encryption for output file. Must be one of: true, false. | | inline | true | optional. Must be one of: true, false. | | url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf | required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. | | profiles | | optional. Must be a String. | | name | | optional. File name for generated output. Must be a String. | | password | | optional. Password of PDF file. Must be a String | | unwrap | | optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String. | | pages | | optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String. | | templateId | | optional. ID of the template to be used. Add, manage templates at https://app.pdf.co/document-parser-templates | | template | — detectionRules: keywords: - “Sample document with multi-page table” fields: total: dataType: decimal expression: “TOTAL “ type: regex sourceId: “Multipage Table Test” tables:

Responses:

Status: /pdf/documentparser Code: 200
{
    "body": {
        "templateId": null,
        "templateVersion": "3",
        "sourceId": "Multipage Table Test",
        "fields": {
            "total": {
                "value": 450,
                "pageIndex": 1
            }
        },
        "tables": [
            {
                "name": "table1",
                "rows": [
                    {
                        "itemNo": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 1",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 2,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 2",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 3,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 3",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 4,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 4",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 5,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 5",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 6,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 6",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 7,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 7",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 8,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 8",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 9,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 9",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 10",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 11,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 11",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 12,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 12",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 13,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 13",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 14,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 14",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 15,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 15",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 16,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 16",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 17,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 17",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 18,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 18",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 19,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 19",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 20,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 20",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 21,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 21",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 22,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 22",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 23,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 23",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 24,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 24",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 25,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 25",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 26,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 26",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 27,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 27",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 28,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 28",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 29,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 29",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 30,
                            "pageIndex": 0
                        },
                        "description": {
                            "value": "Item 30",
                            "pageIndex": 0
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 0
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 0
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 0
                        }
                    },
                    {
                        "itemNo": {
                            "value": 31,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 31",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 32,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 32",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 33,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 33",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 34,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 34",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 35,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 35",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 36,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 36",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 37,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 37",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 38,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 38",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 39,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 39",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 40,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 40",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 41,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 41",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 42,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 42",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 43,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 43",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 44,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 44",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    },
                    {
                        "itemNo": {
                            "value": 45,
                            "pageIndex": 1
                        },
                        "description": {
                            "value": "Item 45",
                            "pageIndex": 1
                        },
                        "price": {
                            "value": 10,
                            "pageIndex": 1
                        },
                        "qty": {
                            "value": 1,
                            "pageIndex": 1
                        },
                        "extPrice": {
                            "value": 10,
                            "pageIndex": 1
                        }
                    }
                ]
            }
        ]
    },
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "MultiPageTable.json",
    "remainingCredits": 98587
}

#back to top

3. /pdf/documentparser/templates

Return all YAML formatted templates for document parser for this user. Please use GET request.

Endpoint:

Method: GET
Type: 
URL: https://api.pdf.co/v1/pdf/documentparser/templates

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Responses:

Status: pdf/documentparser/templates Code: 0
{
    "templates": [
        {
            "id": 40,
            "type": "user",
            "title": "Untitled",
            "description": "Untitled"
        },
        {
            "id": 1,
            "type": "system",
            "title": "Invoice Parser",
            "description": "Parses invoices and extracts invoice number, company name, due date, amount, tax"
        }
    ],
    "remainingCredits": 94229
}

#back to top

4. /pdf/documentparser/templates/:id

Return detailed information for document parser template by template’s id. Please use GET request.

Endpoint:

Method: GET
Type: 
URL: https://api.pdf.co/v1/pdf/documentparser/templates/:id

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Responses:

Status: pdf/documentparser/templates/:id Code: 200
{
    "id": 40,
    "type": "user",
    "title": "Untitled",
    "description": "Untitled",
    "body": "---\r\n  fields:\r\n    amount:\r\n      expression: ''\r\n    date:\r\n      expression: ''\r\n  ",
    "remainingCredits": 94228
}

#back to top

5. /pdf/documentparser/results

Return all document parser results for this user. Please use GET request.

Endpoint:

Method: GET
Type: 
URL: https://api.pdf.co/v1/pdf/documentparser/results

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Query params:

Key Value Description
templateId   optional. Return all results for this document parser template id. Must be a String.

Responses:

Status: pdf/documentparser/results Code: 200
{
    "results": [
        {
            "id": 74,
            "templateId": 40,
            "body": {
                "fields": {
                    "date": {
                        "value": ""
                    },
                    "amount": {
                        "value": "2",
                        "pageIndex": 0
                    }
                },
                "sourceId": null,
                "templateId": null,
                "templateVersion": "3"
            },
            "createdAt": "2020-03-23T11:17:30.152Z",
            "filename": "EINPresswire-Report-512260784-bytescout-announces-release-of-its-data-extraction-tools-for-on-cloud-deployments.pdf"
        }
    ],
    "remainingCredits": 94220
}

#back to top

6. /pdf/documentparser/results

Description Create document parser result for this user. Please use POST request.

Input Parameters

Param Description
templateId optional. Create document parser result with this template id. Must be a String.
result optional. JSONB storage for storing document parser result. Must be a String.
resultType optional. Result format. Valid values: JSON, YAML, XML, CSV. Must be a String.
fileUrl optional. URL to source PDF File. Must be a String.

Status Errors

Code Description
200 The request has succeeded
400 bad input parameters
401 unauthorized

Endpoint:

Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/documentparser/results

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

{
    "fileUrl": "https://github.com/bytescout/ByteScout-SDK-SourceCode/raw/master/Document%20Parser%20SDK/DigitalOcean.pdf",
    "templateId": 48,
    "formatType": "CSV",
    "result": "companyName,companyName2,invoiceId,dateIssued,dateDue,total,subTotal,tax\r\n,,,,,450.00,,\r\n\r\n"
}

#back to top

7. /pdf/documentparser/results/:id

DELETE document parser result with given id. Please use DELETE request.

Endpoint:

Method: DELETE
Type: 
URL: https://api.pdf.co/v1/pdf/documentparser/results/:id

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

back to top

Email Extractor

#back to top

1. /email/decode

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/email/decode

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml required. URL of the source EML or MSG file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

#back to top

2. /email/decode

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/email/decode

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml required. URL of the source EML or MSG file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

#back to top

3. /email/extract-attachments

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/email/extract-attachments

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml required. URL of the source EML or MSG file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

#back to top

4. /email/extract-attachments

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/email/extract-attachments

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml required. URL of the source EML or MSG file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

back to top

File Uploader/Calculate Hash

#back to top

1. POST /file/hash

Description: Calculate and return MD5 hash of file by url. Commonly used to control if source document has been changed or not because every little change will cause hash string to differ as well. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
	"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
	"file" : ""
}

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/file/hash

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

Responses:

Status: /file/hash Code: 200
{
    "hash": "d942e5becdcb0386598cce15e9e56deb1ca9d893b8578a88eca4a62f02c4000b",
    "remainingCredits": 98144
}
Status: POST /file/hash Code: 200
{
    "hash": "d942e5becdcb0386598cce15e9e56deb1ca9d893b8578a88eca4a62f02c4000b",
    "remainingCredits": 77776
}

#back to top

2. GET /file/hash

Description: Calculate and return MD5 hash of file by url. Commonly used to control if source document has been changed or not because every little change will cause hash string to differ as well. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
	"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
	"file" : ""
}

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/file/hash

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

Responses:

Status: /file/hash Code: 200
{
    "hash": "d942e5becdcb0386598cce15e9e56deb1ca9d893b8578a88eca4a62f02c4000b",
    "remainingCredits": 98143
}
Status: GET /file/hash Code: 200
{
    "hash": "d942e5becdcb0386598cce15e9e56deb1ca9d893b8578a88eca4a62f02c4000b",
    "remainingCredits": 77775
}

back to top

File Uploader/Delete Temp Files

#back to top

1. POST /file/delete

Description: Deletes temp file

IMPORTANT: All temp files are autoremoved after 1 hour. You may use /file/delete methods to explicitely force remove temp files once you don’t need them.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/file/delete

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
file https://pdf-temp-files.s3.amazonaws.com/b5c1e67d98ab438292ff1fea0c7cdc9d/sample.pdf required. URL of the file to delete. Must be a String.

Responses:

Status: /file/delete Code: 200
{
  "error": false,
  "status": 200,
  "remainingCredits": 9999986
}
Status: POST /file/delete Code: 200
{
    "error": false,
    "status": 200,
    "remainingCredits": 77778
}

#back to top

2. GET /file/delete

Description: Deletes temp file

IMPORTANT: All temp files are autoremoved after 1 hour. You may use /file/delete methods to explicitely force remove temp files once you don’t need them.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/file/delete

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
file https://pdf-temp-files.s3.amazonaws.com/cc380d488969497e80bd7e18ce5b5a3c/sample.pdf required. URL of the file to delete. Must be a String.

Responses:

Status: GET /file/delete Code: 200
{
    "error": false,
    "status": 200,
    "remainingCredits": 77777
}
Status: /file/delete Code: 404
{
  "error": false,
  "status": 200,
  "remainingCredits": 9999986
}

back to top

File Uploader/Upload Files

#back to top

1. GET generate secure URL for upload: /file/upload/get-presigned-url

Description: This method generates links to upload your local file to. Use this presignedUrl from the response to upload your file. Once you upload your file to this presignedUrl using PUT, you can use url link to access the uploaded file.

With this method you can upload files up to 2GB in size. Please note that to process these files you should use async=true mode with data extraction and tools endpoints along with /job/check to check status of background jobs you create.

Steps to Upload File:

Important: all uploaded files are considered to be temporary files and are automatically permanently removed after 1 hour.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

GET
https://api.pdf.co/v1/file/upload/get-presigned-url?name=test.pdf&encrypt=true

200
{
    "presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....",
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=....",
    "error": false,
    "status": 200,
    "name": "test.pdf",
    "remainingCredits": 93574
}

PUT
https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....
--form 'file=@/path/to/file'

200
{
}

Now you can access your file using link from "url" param to from the first step.

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/file/upload/get-presigned-url

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Query params:

Key Value Description
name test.pdf The name the file will be stored with. Must be a String.
encrypt true Enable encryption for output file. Must be one of: true, false.

Responses:

Status: /file/upload/get-presigned-url Code: 200
{
    "presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=900&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host&X-Amz-Signature=8650913644b6425ba8d52b78634698e5fc8970157d971a96f0279a64f4ba87fc",
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGgaDA9KaTOXRjkCdCqSTCKBAW9tReCLk1fVTZBH9exl9VIbP8Gfp1pE9hg6et94IBpNamOaBJ6%2B9Vsa5zxfiddlgA%2BxQ4tpd9gprFAxMzjN7UtjU%2B2gf%2FKbUKc2lfV18D2wXKd1FEhC6kkGJVL5UaoFONG%2Fw2jXfLxe3nCfquMEDo12XzcqIQtNFWXjKPWBkQEvmii4tfTyBTIot4Na%2BAUqkLshH0R7HVKlEBV8btqa0ctBjwzwpWkoU%2BF%2BCtnm8Lm4Eg%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHEGHTOA4W/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=243419ac4a9a315eebc2db72df0817de6a261a684482bbc897f0e7bb5d202bb9",
    "error": false,
    "status": 200,
    "name": "test.pdf",
    "remainingCredits": 98145
}
Status: Generate URL for upload: /file/upload/get-presigned-url Code: 200
{
    "presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/63f7f641a3144f84ac209b4f514bc0df/myFile.png?X-Amz-Expires=900&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20200716/us-west-2/s3/aws4_request&X-Amz-Date=20200716T091225Z&X-Amz-SignedHeaders=host&X-Amz-Signature=14d3eb91305d96804deccb6985cbbd4552705f5ddb2144b901a97c8e7abc1ac3",
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/63f7f641a3144f84ac209b4f514bc0df/myFile.png?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzECMaDC5PzTA618EQiHoskyKBAeYQcVKbK%2B0F5nnjBV6MKbPNvueaFlSBSPxPi31BdtFzw1jAIXjAvATkBwTPRx%2FVwhszDtYQRVkbhsZF6HLotVUedrcdGHOrsWV5DpN2xKgnX7xRcJrvUu0wieaJHDmHzFL1eNzFwj2927L%2BtadEfmz1a0SiEImJZujcLF78lJZ5mSj7s8D4BTIok4Xja8wyqnBBp2EOcZw8qrUxeR7Ufd0aw4bf7Z1Cur1f0PFg8hlrYQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHAPA4HUJS/20200716/us-west-2/s3/aws4_request&X-Amz-Date=20200716T091225Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=26e27b48c5284665914fdd981d7b0b5b6e70e64839f28621f3dc82256e492879",
    "error": false,
    "status": 200,
    "name": "myFile.png",
    "remainingCredits": 77779
}

#back to top

2. PUT Upload File PUT presignedUrl –formdata file=..

With this method you can upload files up to 2GB in size. Please note that to process these files you should use async=true mode with data extraction and tools endpoints along with /job/check to check status of background jobs you create.

Steps to Upload File:

Important: all uploaded files are considered to be temporary files and are automatically permanently removed after 1 hour.

Status Errors

Code Description
200 The request has succeeded
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

Workflow

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

Generate secure link where you will upload your file:
GET
https://api.pdf.co/v1/file/upload/get-presigned-url?name=test.pdf&encrypt=true

200
{
    "presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....",
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=....",
}

Now all PUT to upload file to "presignedUrl" you've got:
https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....
--form 'file=@/path/to/file'

200
{
}

Now your file is available via link from "url" param from the first step

Endpoint:

Method: PUT
Type: FORMDATA
URL: <insert presignedUrl generated by https://api.pdf.co/v1/file/upload/get-presigned-url >

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
file   Local file to upload.

Responses:

Status: /file/upload/get-presigned-url Code: 200
{
    "presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=900&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host&X-Amz-Signature=8650913644b6425ba8d52b78634698e5fc8970157d971a96f0279a64f4ba87fc",
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGgaDA9KaTOXRjkCdCqSTCKBAW9tReCLk1fVTZBH9exl9VIbP8Gfp1pE9hg6et94IBpNamOaBJ6%2B9Vsa5zxfiddlgA%2BxQ4tpd9gprFAxMzjN7UtjU%2B2gf%2FKbUKc2lfV18D2wXKd1FEhC6kkGJVL5UaoFONG%2Fw2jXfLxe3nCfquMEDo12XzcqIQtNFWXjKPWBkQEvmii4tfTyBTIot4Na%2BAUqkLshH0R7HVKlEBV8btqa0ctBjwzwpWkoU%2BF%2BCtnm8Lm4Eg%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHEGHTOA4W/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=243419ac4a9a315eebc2db72df0817de6a261a684482bbc897f0e7bb5d202bb9",
    "error": false,
    "status": 200,
    "name": "test.pdf",
    "remainingCredits": 98145
}
Status: PUT Upload File PUT presignedUrl –formdata file=.. Code: 200

back to top

File Uploader/Upload Very Small Files (up to 50KB)

#back to top

1. POST Upload small file: /file/upload

Description: Uploads a small (up to 100KB) local file as a temporary file in PDF.co storage. Note: temporary files are automatically permanently removed after 1 hour.

Status Errors

Code Description
200 The request has succeeded
400 bad input parameters
401 unauthorized
403 not enough credits
405 Timeout error. To upload large documents or files please use /file/upload/get-presigned-url instead to get url that you should upload into (see source code samples

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/file/upload

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
name   optional. The name the file will be stored with. Must be a String.
file   required. Local file should be selected

Responses:

Status: /file/upload/url Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/1a4a92ac805c41c28ef75a24e0f35ba5/sample.pdf",
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 98145
}
Status: POST Upload small file: /file/upload Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/28b6041bcfe34c469ed44f15f0594d5f/logo.dat",
    "error": false,
    "status": 200,
    "name": "logo",
    "remainingCredits": 77772
}

#back to top

2. POST Upload small file as Base64: /file/upload/base64

Description: Creates temporary file using base64 source data. You may use this temporary file URL with other API methods. Temporary files are automatically permanently removed after 1 hour. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
	"file" : "data:image/gif;base64,R0lGODlhEAAQAPUtACIiIScnJigoJywsLDIyMjMzMzU1NTc3Nzg4ODk5OTs7Ozw8PEJCQlBQUFRUVFVVVVhYWG1tbXt7fInDRYvESYzFSo/HT5LJVJPJVJTKV5XKWJbKWZbLWpfLW5jLXJrMYaLRbaTScKXScKXScafTdIGBgYODg6alprLYhbvekr3elr3el9Dotf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAsAAAAABAAEAAABpJAFGgkKhpFIRHpw2qBLJiLdCrNTFKt0wjD2Xi/G09l1ZIwRJeNZs3uUFQtEwCCVrM1bnhJYHDU73ktJQELBH5pbW+CAQoIhn94ioMKB46HaoGTB5WPaZmMm5wOIRcekqChliIZFXqoqYYkE2SaoZuWH1gmAgsIvr8ICQUPTRIABgTJyskFAw1ZDBAO09TUDw0RQQA7"
}

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/file/upload/base64

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
name custom name optional. The name the file will be stored with. Must be a String.
file data:image/gif;base64,R0lGODlhEAAQAPUtACIiIScnJigoJywsLDIyMjMzMzU1NTc3Nzg4ODk5OTs7Ozw8PEJCQlBQUFRUVFVVVVhYWG1tbXt7fInDRYvESYzFSo/HT5LJVJPJVJTKV5XKWJbKWZbLWpfLW5jLXJrMYaLRbaTScKXScKXScafTdIGBgYODg6alprLYhbvekr3elr3el9Dotf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAsAAAAABAAEAAABpJAFGgkKhpFIRHpw2qBLJiLdCrNTFKt0wjD2Xi/G09l1ZIwRJeNZs3uUFQtEwCCVrM1bnhJYHDU73ktJQELBH5pbW+CAQoIhn94ioMKB46HaoGTB5WPaZmMm5wOIRcekqChliIZFXqoqYYkE2SaoZuWH1gmAgsIvr8ICQUPTRIABgTJyskFAw1ZDBAO09TUDw0RQQA7 required. Base64-encoded file bytes. Must be a String.

Responses:

Status: https://api.pdf.co/v1/file/upload/base64 Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/a8ac8a3cec3344f08f556bfd2d678b2f/uploadfile.txt",
    "error": false,
    "status": 200,
    "remainingCredits": 98145
}
Status: POST Upload small file as Base64: /file/upload/base64 Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/7588d614c9ad41eb98ec317a02abda63/uploadfile.txt",
    "error": false,
    "status": 200,
    "remainingCredits": 77769
}

#back to top

3. POST Upload from URL: /file/upload/url

Description: Downloads file from a source url and uploads it as a temporary file. Temporary files are automatically permanently removed after 1 hour.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf"
}

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/file/upload/url

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
name sample.pdf optional. The name the file will be stored with. Must be a String.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the file to upload. Must be a String.

Responses:

Status: POST Upload from URL: /file/upload/url Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/4e36f2962b7f4248b7167f4389d534d5/sample.pdf",
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 77767
}
Status: /file/upload/url Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/1a4a92ac805c41c28ef75a24e0f35ba5/sample.pdf",
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 98145
}

#back to top

4. GET Upload from URL: /file/upload/url

Description: Downloads file from a source url and uploads it as a temporary file. Temporary files are automatically permanently removed after 1 hour.

Status Errors

Code Description
200 The request has succeeded
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf"
}

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/file/upload/url

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Query params:

Key Value Description
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf  

Responses:

Status: GET Upload from URL: /file/upload/url Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/97415d1c45a04b29ac42c8dc01883316/sample.pdf",
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 77765
}
Status: /file/upload/url Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/703aa298cfe745baa3449fbdaba4d1d7/sample.pdf",
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 98145
}

back to top

Manage Background Jobs

Description: This method checks status of backgroud job by their jobId. You may create background job by calling API methods with async parameter set to true. Checks and returns status of a job that is running in background.

Available statuses are:

Please use GET or POST request.

Status Errors

Code Description
200 The request has succeeded
400 bad input parameters
401 unauthorized
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

Example

Sample Request:

! Don’t forget to set x-api-key url param or http header param (preferred) to API key, get yours here

POST

{
	"jobid" : "123"
}

#back to top

1. /job/check

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/job/check

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
jobid 123 required. Id of processing that was started asynchronously. Must be a String.

Responses:

Status: /job/check Code: 200
{
    "status": "unknown",
    "message": "Job doesn't exist",
    "remainingCredits": 98142
}

#back to top

2. /job/check

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/job/check

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
jobid 123 required. Id of processing that was started asynchronously. Must be a String.

Responses:

Status: /job/check Code: 200
{
    "status": "unknown",
    "message": "Job doesn't exist",
    "remainingCredits": 98142
}

back to top

PDF Generator/PDF from CSV

#back to top

1. /pdf/convert/from/csv

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/csv

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description  
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.  
encrypt   optional. Enable encryption for output file. Must be one of: true, false.  
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/csv-to-pdf/sample.csv required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.  
name result.pdf optional. File name for generated output. Must be a String.  
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.  

Responses:

Status: /pdf/convert/from/csv Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/4b13a7cef51047edb68dde6cab0b4050/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98509
}

#back to top

2. /pdf/convert/from/csv

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/csv

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description  
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.  
encrypt true optional. Enable encryption for output file. Must be one of: true, false.  
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/csv-to-pdf/sample.csv required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.  
name result.pdf optional. File name for generated output. Must be a String.  
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.  

Responses:

Status: /pdf/convert/from/csv Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/01ede81738a44b4fa5a6b909115ae0a3/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98506
}

back to top

PDF Generator/PDF from Doc, DocX, RTF, TXT, XPS

#back to top

1. /pdf/convert/from/doc

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/doc

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/doc-to-pdf/sample.docx required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.

Responses:

Status: /pdf/convert/from/doc Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/f6cc6b12f4d841f2a4cf5e432a7a57e9/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98503
}

#back to top

2. /pdf/convert/from/doc

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/doc

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/doc-to-pdf/sample.docx required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.

Responses:

Status: /pdf/convert/from/doc Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/0181a7ebda5c438e893fa62cce9d0c8f/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98497
}

back to top

PDF Generator/PDF from HTML

#back to top

1. GET /pdf/convert/from/html

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/html

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
html <h1>Hello World!</h1> optional. HTML code. Must be a String.
templatedata   optional. JSON model which will be used for processing HTML template. Must be a String.
name result.pdf optional. File name for generated output. Must be a String.
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.

Responses:

Status: GET /pdf/convert/from/html Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/5dd8b1743fdb46a8b32df67614cb6f64/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 62000
}

#back to top

2. POST /pdf/convert/from/html

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/html

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
templatedata   optional. JSON model which will be used for processing HTML template. Must be a String.
html <h1>Hello World!</h1> optional. HTML code. Must be a String.
name result.pdf optional. File name for generated output. Must be a String.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.html optional. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.

Responses:

Status: POST /pdf/convert/from/html Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/50460f73e9e6438894314a031a97c7ef/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 62003
}

back to top

PDF Generator/PDF from Images

#back to top

1. /pdf/convert/from/image

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/image

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.

Responses:

Status: /pdf/convert/from/image Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/15a3dfc7eabb493cbf82100632b7dd05/result.pdf",
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98479
}

#back to top

2. /pdf/convert/from/image

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/image

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.

Responses:

Status: /pdf/convert/from/image Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/ac2082a8cb734c6184645d85b15a0d50/result.pdf",
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98473
}

back to top

PDF Generator/PDF from URL

#back to top

1. GET /pdf/convert/from/url

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/from/url

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async true optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
templatedata   optional. JSON model which will be used for processing HTML template. Must be a String.
url https://wikipedia.org/wiki/Wikipedia:Contact_us required. URL of the source. Must be a String.
name result.pdf optional. File name for generated output. Must be a String.

Responses:

Status: GET /pdf/convert/from/url Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/c2a25171cdf2417e82e2fd51dbd87261/result.pdf",
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 62006
}

back to top

PDF Generator/PDF from XLS or XLSX

#back to top

1. /xls/convert/to/pdf

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/pdf

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional.Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/pdf Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/a831faf7fac24f83ac5493a27f0302e0/Input.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGgaDJ%2FEYZpwshwOnrsqnCKBAeLonQsVRzI4LxRm36U%2FC%2FiDP7iamfb2ZEM81cAZHq2hLikFOnejAdNXQiidjQSuMwSMCbnsds7Ywo1XB33tlziWhJqD%2FyavFUdu6oCmUfpBzyK9Dbm%2F3O9SG3rkOIfnYEgPhTZioZ5elCP6Hj%2B22dCmqw7V%2Bpm5bYHkwMTiVqmO0CidpvTyBTIouazv7Iaj1DceXgMVdWQR3kIr49%2FyXx8FEG7waFuf0uL2GbvOoICgRA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHEWRKLYXJ/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T140723Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=08d6b9cf65ddb25016ebdee028fdafd677c2f426b8909708388764b740e49604",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "Input.pdf",
    "remainingCredits": 98470
}

#back to top

2. /xls/convert/to/pdf

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/pdf

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional.Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/pdf Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/25533bda87b3465e8e8d489d6e23403b/Input.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGgaDHksDAqw%2FKcvC2zJ4iKBAXCElPxYDMJDksV4mvBcFV4LRCYlZyx933mtf4jvOXh7E4ajPzJB8KjRcdngotG97e1fKUnw2VFIfLV3Bnd47pIL%2F2QMZLBDy3N6ZAAA5Max2DU2QNTi3t5TpEy%2BTTpm1IX2sMtDT9IbKaCGfBfn%2B9fP4hvejyFgEVUGaQHibxgR5iiopvTyBTIo9tVd2zglZtZwYE09DybJipdUk7GW4q5ZKHLy7m87KNpLFFNh0%2BjvFQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHIIIV5B6J/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T140735Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=49b33fec607f3bf298d24876712a936ffc5de03d7b3e54b6c3b2f0755cbe9b18",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "Input.pdf",
    "remainingCredits": 98467
}

back to top

PDF Info Reader

#back to top

1. GET /pdf/info

Description: Gets PDF document information. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/info

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Query params:

Key Value Description
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-info/sample.pdf  
password    

Responses:

Status: GET /pdf/info Code: 200
{
    "info": {
        "PageCount": 1,
        "Author": "Alice V. Knox",
        "Title": "Kid's News 1",
        "Producer": "Acrobat Distiller 4.0 for Windows",
        "Subject": "Kid's News 1",
        "CreationDate": "8/15/2001 2:50:36 PM",
        "Bookmarks": "",
        "Keywords": "",
        "Creator": "Adobe PageMaker 6.52",
        "Encrypted": false,
        "PageRectangle": {
            "Location": {
                "IsEmpty": true,
                "X": 0,
                "Y": 0
            },
            "Size": "612, 792",
            "X": 0,
            "Y": 0,
            "Width": 612,
            "Height": 792,
            "Left": 0,
            "Top": 0,
            "Right": 612,
            "Bottom": 792,
            "IsEmpty": false
        },
        "ModificationDate": "9/20/2001 6:23:02 PM",
        "EncryptionAlgorithm": 0,
        "PermissionPrinting": true,
        "PermissionModifyDocument": true,
        "PermissionContentExtraction": true,
        "PermissionModifyAnnotations": true,
        "PermissionFillForms": true,
        "PermissionAccessibility": true,
        "PermissionAssemble": true,
        "PermissionHighQualityPrint": true
    },
    "error": false,
    "status": 200,
    "remainingCredits": 77734
}

#back to top

2. POST /pdf/info

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/info

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-info/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
password   optional. Password of PDF file. Must be a String.

Responses:

Status: POST /pdf/info Code: 200
{
    "info": {
        "PageCount": 1,
        "Author": "Alice V. Knox",
        "Title": "Kid's News 1",
        "Producer": "Acrobat Distiller 4.0 for Windows",
        "Subject": "Kid's News 1",
        "CreationDate": "8/15/2001 2:50:36 PM",
        "Bookmarks": "",
        "Keywords": "",
        "Creator": "Adobe PageMaker 6.52",
        "Encrypted": false,
        "PageRectangle": {
            "Location": {
                "IsEmpty": true,
                "X": 0,
                "Y": 0
            },
            "Size": "612, 792",
            "X": 0,
            "Y": 0,
            "Width": 612,
            "Height": 792,
            "Left": 0,
            "Top": 0,
            "Right": 612,
            "Bottom": 792,
            "IsEmpty": false
        },
        "ModificationDate": "9/20/2001 6:23:02 PM",
        "EncryptionAlgorithm": 0,
        "PermissionPrinting": true,
        "PermissionModifyDocument": true,
        "PermissionContentExtraction": true,
        "PermissionModifyAnnotations": true,
        "PermissionFillForms": true,
        "PermissionAccessibility": true,
        "PermissionAssemble": true,
        "PermissionHighQualityPrint": true
    },
    "error": false,
    "status": 200,
    "remainingCredits": 77732
}

back to top

PDF Splitter And Merger/Merge and Split PDF/Delete Pages

#back to top

1. /pdf/edit/delete-pages

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/delete-pages

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.
pages 1-2 optional. Comma-separated list of page indices (or ranges) to remove. IMPORTANT: the very first page starts at 1 (one). To set a range use the dash -, for example: 1,2-5,7-. To set a range from index to the last page use range like this: 2-. For ALL pages just leave this param empty. Must be a String.

Responses:

Status: /pdf/edit/delete-pages Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/d000e39dad7b4cf9a3098132465f1bd6/result.pdf",
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98437
}

#back to top

2. /pdf/edit/delete-pages

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/delete-pages

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.
pages 1-2 optional. Comma-separated list of page indices (or ranges) to remove. IMPORTANT: the very first page starts at 1 (one). To set a range use the dash -, for example: 1,2-5,7-. To set a range from index to the last page use range like this: 2-. For ALL pages just leave this param empty. Must be a String.

Responses:

Status: /pdf/edit/delete-pages Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/e9efe4c9dbcb48148705c967aa6ebfd5/result.pdf",
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98433
}

back to top

PDF Splitter And Merger/Merge and Split PDF/Merge

#back to top

1. /pdf/merge

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/merge

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample1.pdf,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample2.pdf required. URLs of the source PDF files separated by comma. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.

Responses:

Status: /pdf/merge Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/cee96f2b039543ffa7e61e059860a721/result.pdf",
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98466
}

#back to top

2. /pdf/merge

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/merge

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample1.pdf,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample2.pdf required. URLs of the source PDF files separated by comma. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.

Responses:

Status: /pdf/merge Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/result.pdf",
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98465
}

back to top

PDF Splitter And Merger/Merge and Split PDF/Split

#back to top

1. /pdf/split

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/split

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.
pages 1-2,3- Define comma-separated indices of pages (or ranges) that you want to split from the document. The first page indice is always 1. For example, if you have a 7 page document that you want split into 3 separate PDFs but different number of pages it would go like this: 1, 2, 3- or 1, 2, 3-7 which will result in 1 PDF with page one, 1 PDF with page two and one PDF with the rest of the pages. Must be a String.

Responses:

Status: /pdf/split Code: 200
{
    "urls": [
        "https://pdf-temp-files.s3.amazonaws.com/c651ababa85c423aa7b134d0e17ca269/result_page1-2.pdf",
        "https://pdf-temp-files.s3.amazonaws.com/245405c93e764dcbaffa37a38af8219a/result_page3-4.pdf"
    ],
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98453
}

#back to top

2. /pdf/split

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/split

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.
pages 1-2,3- Define comma-separated indices of pages (or ranges) that you want to split from the document. The first page indice is always 1. For example, if you have a 7 page document that you want split into 3 separate PDFs but different number of pages it would go like this: 1, 2, 3- or 1, 2, 3-7 which will result in 1 PDF with page one, 1 PDF with page two and one PDF with the rest of the pages. SPECIAL CASES: You can use a single asterisk * symbol to split the document into separate pages. Parameter must be a String.

Responses:

Status: /pdf/split Code: 200
{
    "urls": [
        "https://pdf-temp-files.s3.amazonaws.com/1e9a7f2c46834160903276716424382b/result_page1-2.pdf",
        "https://pdf-temp-files.s3.amazonaws.com/c976b9f89a2e460786a3d5c0deeeef67/result_page3-4.pdf"
    ],
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98441
}

back to top

PDF Splitter And Merger/Optimize PDF

#back to top

1. /pdf/optimize

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/optimize

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-optimize/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.

Responses:

Status: /pdf/optimize Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/798592f9d35047af92cf9e4d05c1ba41/result-compressed.pdf",
    "fileSize": 798621,
    "pageCount": 5,
    "error": false,
    "status": 200,
    "name": "result-compressed.pdf",
    "remainingCredits": 98398
}

#back to top

2. /pdf/optimize

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/optimize

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional.Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-optimize/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.pdf optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.

Responses:

Status: /pdf/optimize Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/beba64cbc2984830b9fd974f3b834528/result-compressed.pdf",
    "fileSize": 798621,
    "pageCount": 5,
    "error": false,
    "status": 200,
    "name": "result-compressed.pdf",
    "remainingCredits": 98373
}

back to top

PDF Text Tools/Add Text, Images and Fields to PDF

#back to top

1. POST /pdf/edit/add

adds text, images, text fields, unchecked checkbox, checked checkbox to existing PDF file. You can fill out out existing PDF forms and documents and create new fillable PDF forms using this method.

Endpoint:

Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/add

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

{
    "async": false,
    "encrypt": true,
    "name": "newDocument",
    "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf",
    "annotations":[
        {
            "text":"Testing, one, two, three.",
            "x": 10,
            "y": 10,
            "size": 12,
            "pages": "0-"
        },
        {
            "text":"Testing Clickable Links \r\n(CLICK ME!)",
            "x": 200,
            "y": 200,
            "size": 24,
            "pages": "0-",
            "color": "CCBBAA",
            "link": "https://bytescout.com/"
        },
      {
            "text":"Simple text label (default type)",
            "x": 100,
            "y": 100,
            "size": 12,
            "pages": "0-",
            "type": "Text"
        },
       {
            "text":"sample prefilled text",
            "x": 10,
            "y": 30,
            "size": 12,
            "pages": "0-",
            "type": "TextField",
            "id": "textfield1"
        },
              {
            "x": 100,
            "y": 150,
            "size": 12,
            "pages": "0-",
            "type": "Checkbox",
            "id": "checkbox2"
        },
              {
            "x": 100,
            "y": 170,
            "size": 12,
            "pages": "0-",
            "link": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
            "type": "CheckboxChecked",
            "id":"checkbox3"
        }          
        
    ],
    
    "images": [
        {
            "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
            "x": 450,
            "y": 10,
            "pages": "0"
        },
        {
            "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
            "x": 450,
            "y": 100,
            "width": 50,
            "height": 50,
            "pages": "0"
        },
        {
            "url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
            "x": 200,
            "y": 250,
            "pages": "0",
            "link": "www.pdf.co"
        }
        
    ]
}

Responses:

Status: POST /pdf/edit/add Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/d5c6efa549194ffaacb2eedd318e0320/newDocument.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzECMaDJJV7qKrpnGUrZHrwSKBATR5rxVlQoU0zj3r4jyHPt7yj4HoCIBi65IbMRWVX8qZZtKL9YGUzP%2FcemlqVd4Vi5%2B80Sg%2BymqQtaQ8qSFqKA82JnV%2BNBDatIigZIZha%2BrQM3jSC%2FZhX1zxsfLLsaH3K5nBnkjT3gi%2FZnx%2FgqrlIhf3m2xRFaTlgHrBADlK9KKPIijSusD4BTIo%2FQ433xx%2FQEaGWdX0nu4NuiByyXNPsBCAI3im9LMUCujjqF79ocyLHA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHCSWKUQ4T/20200716/us-west-2/s3/aws4_request&X-Amz-Date=20200716T092641Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=2aa88d39aaf4b5891e4cb42d5675a64486098558d7159b37b75252209bdd6a95",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "newDocument",
    "remainingCredits": 77762
}

#back to top

2. GET /pdf/edit/add

adds text, images, text fields, unchecked checkbox, checked checkbox to existing PDF file. You can fill out out existing PDF forms and documents and create new fillable PDF forms using this method.

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/add

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async false optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
width 159 optional. Width of the image in PDF Points (1/72 in.). Must be a Integer.
height 43 optional. Height of the image in PDF Points (1/72 in.). Must be a Integer. Works in in “type” = “image” mode only.
y 50 optional. Y coordinate of the image or text in PDF Points (1/72 in.). Must be a Integer.
x 400 optional. X coordinate of the image or text in PDF Points (1/72 in.). Must be a Integer.
transparent   optional. Enables transparency. Must be one of: true, false.
color   optional. Sets color in HTML format. Must be a String.
urlimage https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png optional. URL of the image file to be added (should be PNG, PNG with transparency or JPG). Must be a String.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name newDocument optional. File name for generated output. Must be a String.
text test test1 test2 optional. Text to be added. Set “type” to “annotation” to enable text annotation mode. Must be a String.
type annotation optional. Switches the mode, should be “annotation” (for text to be added) or “image” (for image to be added). For image and text or multiple text and images please use POST /pdf/edit/add
fontname   optional. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: GET /pdf/edit/add Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/6ae295cd293346128224522d200773a8/newDocument-edited.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "newDocument-edited",
    "remainingCredits": 77756
}

back to top

PDF Text Tools/Delete Text from PDF

#back to top

1. /pdf/edit/delete-text (multiple replacements)

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/delete-text

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name pdfWithTextDeleted optional. File name for generated output. Must be a String.
caseSensitive false optional. true or false. Set to false by default
searchStrings[] conspicuous feature required. Array of words to delete. Must contain at least 1 word. Example: ['Hello', 'World']
password   optional. Password of PDF file. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/edit/delete-text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/9e531aa9da3e49a0b16b4b7d69d27e01/pdfWithTextDeleted.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "pdfWithTextDeleted",
    "remainingCredits": 98358
}

#back to top

2. /pdf/edit/delete-text (single replacement)

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/delete-text

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name pdfWithTextDeleted optional. File name for generated output. Must be a String.
caseSensitive false optional. true or false. Set to false by default
searchString conspicuous feature required. Array of words to delete. Must contain at least 1 word. Example: ['Hello', 'World']
password   optional. Password of PDF file. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/edit/delete-text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/d2bd21eb324e4215a79cf6ef0aa8e9c5/pdfWithTextDeleted.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "pdfWithTextDeleted",
    "remainingCredits": 98346
}

#back to top

3. /pdf/edit/delete-text

Endpoint:

Method: GET
Type: 
URL: https://api.pdf.co/v1/pdf/edit/delete-text

Headers:

Key Value Description
Content-Type application/json  

Query params:

Key Value Description
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
searchString conspicuous required. Text to delete
x-api-key    

Responses:

Status: /pdf/edit/delete-text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/826c6485449748268552ad1b46e2f905/sample.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 98334
}

back to top

PDF Text Tools/Make Text Searchable PDF

#back to top

1. /pdf/makesearchable

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/makesearchable

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-make-searchable/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
lang eng optional. Language of PDF file (eng, fra, spa, deu). Must be a String.
name result.pdf optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra and many others. You can also specify 2 languages to be used, for example: eng+deu.

Responses:

Status: /pdf/makesearchable Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/6e6174a7bc1a4bf99e7be78755a4cf24/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98428
}

#back to top

2. /pdf/makesearchable

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/makesearchable

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-make-searchable/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
lang eng optional. Language of PDF file (eng, fra, spa, deu). Must be a String.
name result.pdf optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lang eng optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra and many others. You can also specify 2 languages to be used, for example: eng+deu.

Responses:

Status: /pdf/makesearchable Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/4df96050d809442cb7909094d2892849/result.pdf",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.pdf",
    "remainingCredits": 98423
}

back to top

PDF Text Tools/Replace Text with Image

#back to top

1. /pdf/edit/replace-text-with-image

Endpoint:

Method: GET
Type: 
URL: https://api.pdf.co/v1/pdf/edit/replace-text-with-image

Headers:

Key Value Description
     

Query params:

Key Value Description
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
searchString Hypothesis  
replaceImage https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png  
x-api-key    

Responses:

Status: /pdf/edit/replace-text-with-image Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/79abf7b75a584939879992cc9c4d0967/sample.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 98254
}

#back to top

2. /pdf/edit/replace-text-with-image

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/replace-text-with-image

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
caseSensitive true optional. true or false. Set to false by default
searchString Hypothesis required. Word to be replaced. Must contain at least 1 word. Example: 'Hello'
replaceImage https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png required. Image url to be inserted in doc: http://www.xyz.com/image.png
password   optional. Password of PDF file. Must be a String.
pages 0 optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/edit/replace-text-with-image Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/6f61a5e6af8a48baae5df4a1c1842be4/sample.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 98210
}

back to top

PDF Text Tools/Search Text

#back to top

1. GET /pdf/find

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/find

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
searchString Invoice Date \d+/\d+/\d+ text to search.
name   optional. File name for generated output. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
inline   optional. Must be one of: true, false.
wordMatchingMode   optional. Must be a String.
password   optional. Password of PDF file. Must be a String
regexSearch true optional. Must be one of: true, false.

Responses:

Status: GET /pdf/find Code: 200
{
    "body": [
        {
            "text": "Invoice Date 01/01/2016",
            "left": 436.5400085449219,
            "top": 130.4599995137751,
            "width": 122.85311957550027,
            "height": 11.040000486224898,
            "pageIndex": 0,
            "bounds": {
                "location": {
                    "isEmpty": false,
                    "x": 436.54,
                    "y": 130.46
                },
                "size": "122.853119, 11.0400009",
                "x": 436.54,
                "y": 130.46,
                "width": 122.853119,
                "height": 11.0400009,
                "left": 436.54,
                "top": 130.46,
                "right": 559.3931,
                "bottom": 141.5,
                "isEmpty": false
            },
            "elementCount": 1,
            "elements": [
                {
                    "index": 0,
                    "left": 436.5400085449219,
                    "top": 130.4599995137751,
                    "width": 122.85311957550027,
                    "height": 11.040000486224898,
                    "angle": 0,
                    "text": "Invoice Date 01/01/2016",
                    "isNewLine": true,
                    "fontIsBold": true,
                    "fontIsItalic": false,
                    "fontName": "Helvetica-Bold",
                    "fontSize": 11,
                    "fontColor": "0, 0, 0",
                    "fontColorAsOleColor": 0,
                    "fontColorAsHtmlColor": "#000000",
                    "bounds": {
                        "location": {
                            "isEmpty": false,
                            "x": 436.54,
                            "y": 130.46
                        },
                        "size": "122.853119, 11.0400009",
                        "x": 436.54,
                        "y": 130.46,
                        "width": 122.853119,
                        "height": 11.0400009,
                        "left": 436.54,
                        "top": 130.46,
                        "right": 559.3931,
                        "bottom": 141.5,
                        "isEmpty": false
                    }
                }
            ]
        }
    ],
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "sample.json",
    "remainingCredits": 77789
}

#back to top

2. POST /pdf/find

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/find

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
searchString Invoice Date \d+/\d+/\d+ text to search
name   optional. File name for generated output. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
inline   optional. Must be one of: true, false.
wordMatchingMode   optional. Must be a String.
password   optional. Password of PDF file. Must be a String
regexSearch true optional. Must be one of: true, false.

Responses:

Status: POST /pdf/find Code: 200
{
    "body": [
        {
            "text": "Invoice Date 01/01/2016",
            "left": 436.5400085449219,
            "top": 130.4599995137751,
            "width": 122.85311957550027,
            "height": 11.040000486224898,
            "pageIndex": 0,
            "bounds": {
                "location": {
                    "isEmpty": false,
                    "x": 436.54,
                    "y": 130.46
                },
                "size": "122.853119, 11.0400009",
                "x": 436.54,
                "y": 130.46,
                "width": 122.853119,
                "height": 11.0400009,
                "left": 436.54,
                "top": 130.46,
                "right": 559.3931,
                "bottom": 141.5,
                "isEmpty": false
            },
            "elementCount": 1,
            "elements": [
                {
                    "index": 0,
                    "left": 436.5400085449219,
                    "top": 130.4599995137751,
                    "width": 122.85311957550027,
                    "height": 11.040000486224898,
                    "angle": 0,
                    "text": "Invoice Date 01/01/2016",
                    "isNewLine": true,
                    "fontIsBold": true,
                    "fontIsItalic": false,
                    "fontName": "Helvetica-Bold",
                    "fontSize": 11,
                    "fontColor": "0, 0, 0",
                    "fontColorAsOleColor": 0,
                    "fontColorAsHtmlColor": "#000000",
                    "bounds": {
                        "location": {
                            "isEmpty": false,
                            "x": 436.54,
                            "y": 130.46
                        },
                        "size": "122.853119, 11.0400009",
                        "x": 436.54,
                        "y": 130.46,
                        "width": 122.853119,
                        "height": 11.0400009,
                        "left": 436.54,
                        "top": 130.46,
                        "right": 559.3931,
                        "bottom": 141.5,
                        "isEmpty": false
                    }
                }
            ]
        }
    ],
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "sample.json",
    "remainingCredits": 77736
}

back to top

PDF Text Tools/Search and Replace Text

#back to top

1. /pdf/edit/replace-text

Endpoint:

Method: GET
Type: 
URL: https://api.pdf.co/v1/pdf/edit/replace-text

Headers:

Key Value Description
Content-Type application/json  

Query params:

Key Value Description
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
searchString conspicuous  
replaceString replaced  
x-api-key    

Responses:

Status: /pdf/edit/replace-text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/ab8f4b9e230d45e5a6dde379992c9f1d/sample.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "sample.pdf",
    "remainingCredits": 98322
}

#back to top

2. /pdf/edit/replace-text (single replacement)

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/replace-text

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name finalFile optional. File name for generated output. Must be a String.
caseSensitive true optional. true or false. Set to false by default
searchString onspicuous feature required for single text replacement. Word to be replaced. Must be a String
replaceString Replaced1 required for single text replacement. Word to be replaced with. Must be a String
searchStrings   required for batch text replacements. Array of words to be replaced. Must contain at least 1 word. Example: ['Hello', 'World']
replaceStrings   required for batch text replacements. Array of words to be replaced with. Must contain at least 1 word. Example: ['Hello', 'World']
password   optional. Password of PDF file. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/edit/replace-text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/1a0e9a51e2d04fe4bcce0a6a31c365a8/finalFile.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "finalFile",
    "remainingCredits": 98310
}

#back to top

3. /pdf/edit/replace-text (mutliple replacements)

Endpoint:

Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/replace-text

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

{
  "url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
  "searchStrings": [
    "conspicuous feature",
    "Martian"
  ],
  "replaceStrings": [
    "Replaced1",
    "Replaced2"
  ],
  "caseSensitive": true,
  "name": "finalFile"
}

Responses:

Status: /pdf/edit/replace-text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/5e02856782ea4f90b0c47c052565ae01/finalFile.pdf",
    "pageCount": 4,
    "error": false,
    "status": 200,
    "name": "finalFile",
    "remainingCredits": 98298
}

back to top

PDF Text and Tables Extraction/PDF To CSV

#back to top

1. /pdf/convert/to/csv

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/csv

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline   optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-csv/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.csv optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/csv Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/db4decf740cf4c3fbd8ba9d66a31728e/result.csv",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.csv",
    "remainingCredits": 98573
}

#back to top

2. /pdf/convert/to/csv

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/csv

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline   optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-csv/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.csv optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
profiles { ‘profiles’: [ { ‘profile1’: { ‘CSVSeparatorSymbol’: ‘;’ } } ] } optional. Custom profiles for custom properties.
lang s optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/csv Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/07b3698e5ff2441aa03d788664bb0a00/result.csv",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.csv",
    "remainingCredits": 98569
}

#back to top

3. /pdf/convert/to/csv (CSV separator customization)

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/csv

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline   optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-csv/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.csv optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
profiles { ‘profiles’: [ { ‘profile1’: { ‘CSVSeparatorSymbol’: ‘;’ } } ] } optional. Custom profiles with custom settings as JSON
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/csv Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/07b3698e5ff2441aa03d788664bb0a00/result.csv",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.csv",
    "remainingCredits": 98569
}

back to top

PDF Text and Tables Extraction/PDF To JSON

#back to top

1. /pdf/convert/to/json

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/json

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.csv optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/json Code: 200
{
    "body": {
        "document": {
            "page": {
                "@index": "0",
                "row": [
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "24.0",
                                    "@fontStyle": "Bold",
                                    "@color": "#538DD3",
                                    "@x": "36.00",
                                    "@y": "34.44",
                                    "@width": "242.81",
                                    "@height": "24.00",
                                    "#text": "Your Company Name"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "76.94",
                                    "@width": "66.62",
                                    "@height": "11.04",
                                    "#text": "Your Address"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "91.46",
                                    "@width": "69.14",
                                    "@height": "11.04",
                                    "#text": "City, State Zip"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "461.02",
                                    "@y": "115.94",
                                    "@width": "98.42",
                                    "@height": "11.04",
                                    "#text": "Invoice No. 123456"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "436.54",
                                    "@y": "130.46",
                                    "@width": "122.90",
                                    "@height": "11.04",
                                    "#text": "Invoice Date 01/01/2016"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "36.00",
                                    "@y": "154.94",
                                    "@width": "63.62",
                                    "@height": "11.04",
                                    "#text": "Client Name"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "169.70",
                                    "@width": "40.34",
                                    "@height": "11.04",
                                    "#text": "Address"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "184.22",
                                    "@width": "69.14",
                                    "@height": "11.04",
                                    "#text": "City, State Zip"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "233.30",
                                    "@width": "28.70",
                                    "@height": "11.04",
                                    "#text": "Notes"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "36.00",
                                    "@y": "316.25",
                                    "@width": "22.58",
                                    "@height": "11.04",
                                    "#text": "Item"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "247.61",
                                    "@y": "316.25",
                                    "@width": "44.64",
                                    "@height": "11.04",
                                    "#text": "Quantity"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "398.95",
                                    "@y": "316.25",
                                    "@width": "26.91",
                                    "@height": "11.04",
                                    "#text": "Price"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "533.14",
                                    "@y": "316.25",
                                    "@width": "26.30",
                                    "@height": "11.04",
                                    "#text": "Total"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "341.33",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 1"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "341.33",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "1"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "341.33",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "341.33",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "362.45",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 2"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "362.45",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "2"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "362.45",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "30.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "362.45",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "60.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "383.57",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 3"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "383.57",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "3"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "383.57",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "20.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "383.57",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "60.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "404.93",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 4"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "404.93",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "4"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "404.93",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "10.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "404.93",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "389.11",
                                    "@y": "425.83",
                                    "@width": "36.75",
                                    "@height": "11.04",
                                    "#text": "TOTAL"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "525.82",
                                    "@y": "425.83",
                                    "@width": "33.62",
                                    "@height": "11.04",
                                    "#text": "200.00"
                                }
                            }
                        ]
                    }
                ]
            }
        }
    },
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "sample.json",
    "remainingCredits": 98565
}

#back to top

2. /pdf/convert/to/json

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/json

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Source file. For large files please upload files using file uploading endpoints in this API first and use “url” field
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.csv optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/json Code: 200
{
    "body": {
        "document": {
            "page": {
                "@index": "0",
                "row": [
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "24.0",
                                    "@fontStyle": "Bold",
                                    "@color": "#538DD3",
                                    "@x": "36.00",
                                    "@y": "34.44",
                                    "@width": "242.81",
                                    "@height": "24.00",
                                    "#text": "Your Company Name"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "76.94",
                                    "@width": "66.62",
                                    "@height": "11.04",
                                    "#text": "Your Address"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "91.46",
                                    "@width": "69.14",
                                    "@height": "11.04",
                                    "#text": "City, State Zip"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "461.02",
                                    "@y": "115.94",
                                    "@width": "98.42",
                                    "@height": "11.04",
                                    "#text": "Invoice No. 123456"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "436.54",
                                    "@y": "130.46",
                                    "@width": "122.90",
                                    "@height": "11.04",
                                    "#text": "Invoice Date 01/01/2016"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "36.00",
                                    "@y": "154.94",
                                    "@width": "63.62",
                                    "@height": "11.04",
                                    "#text": "Client Name"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "169.70",
                                    "@width": "40.34",
                                    "@height": "11.04",
                                    "#text": "Address"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "184.22",
                                    "@width": "69.14",
                                    "@height": "11.04",
                                    "#text": "City, State Zip"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "233.30",
                                    "@width": "28.70",
                                    "@height": "11.04",
                                    "#text": "Notes"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "36.00",
                                    "@y": "316.25",
                                    "@width": "22.58",
                                    "@height": "11.04",
                                    "#text": "Item"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "247.61",
                                    "@y": "316.25",
                                    "@width": "44.64",
                                    "@height": "11.04",
                                    "#text": "Quantity"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "398.95",
                                    "@y": "316.25",
                                    "@width": "26.91",
                                    "@height": "11.04",
                                    "#text": "Price"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "533.14",
                                    "@y": "316.25",
                                    "@width": "26.30",
                                    "@height": "11.04",
                                    "#text": "Total"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "341.33",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 1"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "341.33",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "1"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "341.33",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "341.33",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "362.45",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 2"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "362.45",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "2"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "362.45",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "30.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "362.45",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "60.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "383.57",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 3"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "383.57",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "3"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "383.57",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "20.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "383.57",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "60.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "404.93",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 4"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "404.93",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "4"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "404.93",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "10.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "404.93",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "389.11",
                                    "@y": "425.83",
                                    "@width": "36.75",
                                    "@height": "11.04",
                                    "#text": "TOTAL"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "525.82",
                                    "@y": "425.83",
                                    "@width": "33.62",
                                    "@height": "11.04",
                                    "#text": "200.00"
                                }
                            }
                        ]
                    }
                ]
            }
        }
    },
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "sample.json",
    "remainingCredits": 98561
}

#back to top

3. /pdf/convert/to/json with OCR for Japanese and Koren

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/json

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Source file. For large files please upload files using file uploading endpoints in this API first and use “url” field
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.csv optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/json Code: 200
{
    "body": {
        "document": {
            "page": {
                "@index": "0",
                "row": [
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "24.0",
                                    "@fontStyle": "Bold",
                                    "@color": "#538DD3",
                                    "@x": "36.00",
                                    "@y": "34.44",
                                    "@width": "242.81",
                                    "@height": "24.00",
                                    "#text": "Your Company Name"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "76.94",
                                    "@width": "66.62",
                                    "@height": "11.04",
                                    "#text": "Your Address"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "91.46",
                                    "@width": "69.14",
                                    "@height": "11.04",
                                    "#text": "City, State Zip"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "461.02",
                                    "@y": "115.94",
                                    "@width": "98.42",
                                    "@height": "11.04",
                                    "#text": "Invoice No. 123456"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "436.54",
                                    "@y": "130.46",
                                    "@width": "122.90",
                                    "@height": "11.04",
                                    "#text": "Invoice Date 01/01/2016"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "36.00",
                                    "@y": "154.94",
                                    "@width": "63.62",
                                    "@height": "11.04",
                                    "#text": "Client Name"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "169.70",
                                    "@width": "40.34",
                                    "@height": "11.04",
                                    "#text": "Address"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "184.22",
                                    "@width": "69.14",
                                    "@height": "11.04",
                                    "#text": "City, State Zip"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "233.30",
                                    "@width": "28.70",
                                    "@height": "11.04",
                                    "#text": "Notes"
                                }
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "36.00",
                                    "@y": "316.25",
                                    "@width": "22.58",
                                    "@height": "11.04",
                                    "#text": "Item"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "247.61",
                                    "@y": "316.25",
                                    "@width": "44.64",
                                    "@height": "11.04",
                                    "#text": "Quantity"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "398.95",
                                    "@y": "316.25",
                                    "@width": "26.91",
                                    "@height": "11.04",
                                    "#text": "Price"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "533.14",
                                    "@y": "316.25",
                                    "@width": "26.30",
                                    "@height": "11.04",
                                    "#text": "Total"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "341.33",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 1"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "341.33",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "1"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "341.33",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "341.33",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "362.45",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 2"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "362.45",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "2"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "362.45",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "30.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "362.45",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "60.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "383.57",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 3"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "383.57",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "3"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "383.57",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "20.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "383.57",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "60.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "36.00",
                                    "@y": "404.93",
                                    "@width": "30.62",
                                    "@height": "11.04",
                                    "#text": "Item 4"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "286.13",
                                    "@y": "404.93",
                                    "@width": "6.12",
                                    "@height": "11.04",
                                    "#text": "4"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "398.35",
                                    "@y": "404.93",
                                    "@width": "27.51",
                                    "@height": "11.04",
                                    "#text": "10.00"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@x": "531.94",
                                    "@y": "404.93",
                                    "@width": "27.50",
                                    "@height": "11.04",
                                    "#text": "40.00"
                                }
                            }
                        ]
                    },
                    {
                        "column": [
                            {
                                "text": ""
                            },
                            {
                                "text": ""
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "389.11",
                                    "@y": "425.83",
                                    "@width": "36.75",
                                    "@height": "11.04",
                                    "#text": "TOTAL"
                                }
                            },
                            {
                                "text": {
                                    "@fontName": "Arial",
                                    "@fontSize": "11.0",
                                    "@fontStyle": "Bold",
                                    "@x": "525.82",
                                    "@y": "425.83",
                                    "@width": "33.62",
                                    "@height": "11.04",
                                    "#text": "200.00"
                                }
                            }
                        ]
                    }
                ]
            }
        }
    },
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "sample.json",
    "remainingCredits": 98561
}

back to top

PDF Text and Tables Extraction/PDF To TEXT

#back to top

1. /pdf/convert/to/text

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/text

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.txt optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/df4a91ecbf804d368cfb9aa38b1cf578/result.txt",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.txt",
    "remainingCredits": 98558
}

#back to top

2. /pdf/convert/to/text

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/text

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.txt optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/9e317660f461448495cea1fae85cb9a7/result.txt",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.txt",
    "remainingCredits": 98555
}

#back to top

3. /pdf/convert/to/text with OCR for Japanese and Korean languages

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/text

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Must be one of: true, false.
url https://upload.wikimedia.org/wikipedia/commons/4/48/Japanese_and_Korean_braille_sample_text.png required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.txt optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang jpn+kor optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/text Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/9e317660f461448495cea1fae85cb9a7/result.txt",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.txt",
    "remainingCredits": 98555
}

back to top

PDF Text and Tables Extraction/PDF To XLS

#back to top

1. /pdf/convert/to/xls

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/xls

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.xls optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/xls Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/4547dc38647644cd851669d9fb28a354/result.xls",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.xls",
    "remainingCredits": 98550
}

#back to top

2. /pdf/convert/to/xls

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/xls

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.xls optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/xls Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/56b4223532734247897f7da82a7a6a47/result.xls",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.xls",
    "remainingCredits": 98545
}

back to top

PDF Text and Tables Extraction/PDF To XLSX

#back to top

1. /pdf/convert/to/xls

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/xlsx

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Query params:

Key Value Description
     

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.xlsx optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/xls Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/199ceb67bab24efea8e2174fd78df0e3/result.xlsx",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.xlsx",
    "remainingCredits": 98541
}

#back to top

2. /pdf/convert/to/xls

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/xlsx

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Query params:

Key Value Description
     

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.xlsx optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/xls Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/8417db54c9e74962bbb8099b2a1630b7/result.xlsx",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.xlsx",
    "remainingCredits": 98537
}

back to top

PDF Text and Tables Extraction/PDF To XML

#back to top

1. /pdf/convert/to/xml

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/xml

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline true optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-xml/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.xml optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/xml Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/be1ff3296d0c4f06bfa66f3241604fe2/result.xml",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.xml",
    "remainingCredits": 98532
}

#back to top

2. /pdf/convert/to/xml

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/xml

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
inline   optional. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-xml/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
profiles   optional. Must be a String.
name result.xml optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
unwrap   optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
lineGrouping   optional. Line grouping within table cells. Add Use lineGrouping=1 to enable the grouping. Must be a String.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/xml Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/b8c60b5adb214fd08dcb6ba9e326cbcb/result.xml",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.xml",
    "remainingCredits": 98527
}

back to top

PDF Text and Tables Extraction/PDF to HTML

#back to top

1. /pdf/convert/to/html

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/html

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.html optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
simple false optional. Set true to convert to a plain HTML format. Default is the rich HTML & CSS format keeping the document design. Must be one of: true, false.
columns false optional. Set true if the PDF document is arranged in columns like a newspaper. Default is false. Must be one of: true, false.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/html Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/ff03dd4ebbd742f083fbe87c96d55349/index.html",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.html",
    "remainingCredits": 98524
}

#back to top

2. /pdf/convert/to/html

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/html

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.html optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
simple false optional. Set true to convert to a plain HTML format. Default is the rich HTML & CSS format keeping the document design. Must be one of: true, false.
columns false optional. Set true if the PDF document is arranged in columns like a newspaper. Default is false. Must be one of: true, false.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/html Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/cabfe6f23ca541d39f277e502d886410/index.html",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.html",
    "remainingCredits": 98518
}

#back to top

3. /pdf/convert/to/html with OCR for Japanese and Koren

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/html

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.html optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
simple false optional. Set true to convert to a plain HTML format. Default is the rich HTML & CSS format keeping the document design. Must be one of: true, false.
columns false optional. Set true if the PDF document is arranged in columns like a newspaper. Default is false. Must be one of: true, false.
lang   optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra, jpn, chi_sim,
chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.    

Responses:

Status: /pdf/convert/to/html Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/cabfe6f23ca541d39f277e502d886410/index.html",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "result.html",
    "remainingCredits": 98518
}

back to top

PDF to Image Renderer/PDF to JPG

#back to top

1. /pdf/convert/to/jpg

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/jpg

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/convert/to/jpg Code: 200
{
    "urls": [
        "https://pdf-temp-files.s3.amazonaws.com/b3460e17d7724ddeaf721e4f974c9a8b/sample.jpg",
        "https://pdf-temp-files.s3.amazonaws.com/e713e84bacd342c9b26f5eb56a6a9ff4/sample.jpg"
    ],
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "sample.jpg",
    "remainingCredits": 98202
}

#back to top

2. /pdf/convert/to/jpg

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/jpg

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/convert/to/jpg Code: 200
{
    "urls": [
        "https://pdf-temp-files.s3.amazonaws.com/f6e660b095ea417aa132a3264a69fdf9/sample.jpg",
        "https://pdf-temp-files.s3.amazonaws.com/de8b95b2e4484bdd8414f5f51b5d5aac/sample.jpg"
    ],
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "sample.jpg",
    "remainingCredits": 98194
}

back to top

PDF to Image Renderer/PDF to PNG

#back to top

1. /pdf/convert/to/png

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/png

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/convert/to/png Code: 200
{
    "urls": [
        "https://pdf-temp-files.s3.amazonaws.com/556535729d3c4d3bad262972b3fa5950/sample.png",
        "https://pdf-temp-files.s3.amazonaws.com/adb49c67f1cf4c9ca8a129a19511418e/sample.png"
    ],
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "sample.png",
    "remainingCredits": 98186
}

#back to top

2. /pdf/convert/to/png

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/png

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/convert/to/png Code: 200
{
    "urls": [
        "https://pdf-temp-files.s3.amazonaws.com/e6512bf7a5d745f08a33c6f501af3b7f/sample.png",
        "https://pdf-temp-files.s3.amazonaws.com/18c9dbff950842a3b8e201f70c50932d/sample.png"
    ],
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "sample.png",
    "remainingCredits": 98178
}

back to top

PDF to Image Renderer/PDF to TIFF

#back to top

1. /pdf/convert/to/tiff

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/tiff

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.tiff optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/convert/to/tiff Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/a24a3a4f81c84859b34992f87b1e14bc/result.tiff",
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "result.tiff",
    "remainingCredits": 98170
}

#back to top

2. /pdf/convert/to/tiff

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/tiff

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name result.tiff optional. File name for generated output. Must be a String.
password   optional. Password of PDF file. Must be a String.
rect   optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use our PDF Multitool to easily select and copy coordinates. Must be a String.
pages   optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.

Responses:

Status: /pdf/convert/to/tiff Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/e6fb9be16cd14a8c94e94cdcef2afb45/result.tiff",
    "pageCount": 2,
    "error": false,
    "status": 200,
    "name": "result.tiff",
    "remainingCredits": 98162
}

back to top

PDF to Image Renderer/URL to JPG

#back to top

1. /url/convert/to/jpg

Description: Create high-quality JPEG screenshot of web page using its URL. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/url/convert/to/jpg

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://www.wikipedia.org required. URL of the source web page. Must be a String.
name   optional. File name for generated output. Must be a String.
width   optional. Must be a Integer.
height   optional. Must be a Integer.

Responses:

Status: /url/convert/to/jpg Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/f663e271632447bf9e1ae151e8866bf7/www-wikipedia-org.png",
    "error": false,
    "status": 200,
    "name": "www-wikipedia-org.png",
    "remainingCredits": 98149
}

#back to top

2. /url/convert/to/jpg

Description: Create high-quality JPEG screenshot of web page using its URL. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/url/convert/to/jpg

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://www.wikipedia.org required. URL of the source web page. Must be a String.
name   optional. File name for generated output. Must be a String.
width   optional. Must be a Integer.
height   optional. Must be a Integer.

Responses:

Status: /url/convert/to/jpg Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/f63c6d5de65a4036b920aa8a482c8e1a/www-wikipedia-org.png",
    "error": false,
    "status": 200,
    "name": "www-wikipedia-org.png",
    "remainingCredits": 98148
}

back to top

PDF to Image Renderer/URL to PNG

#back to top

1. /url/convert/to/png

Description: Create high-quality PNG screenshot of web page using its URL. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/url/convert/to/png

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://www.wikipedia.org optional. URL of the source web page. Must be a String.
name   optional. File name for generated output. Must be a String.
width   optional. Must be a Integer.
height   optional. Must be a Integer.

Responses:

Status: /url/convert/to/png Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/c6c2e7ebce564fd098b0f1121010c409/www-wikipedia-org.png",
    "error": false,
    "status": 200,
    "name": "www-wikipedia-org.png",
    "remainingCredits": 98147
}

#back to top

2. /url/convert/to/png

Description: Create high-quality PNG screenshot of web page using its URL. GET or POST request.

Status Errors

Code Description
200 The request has succeeded
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

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/url/convert/to/png

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt   optional. Enable encryption for output file. Must be one of: true, false.
url https://www.wikipedia.org optional. URL of the source web page. Must be a String.
name   optional. File name for generated output. Must be a String.
width   optional. Must be a Integer.
height   optional. Must be a Integer.

Responses:

Status: /url/convert/to/png Code: 200
{
    "url": "https://pdf-temp-files.s3.amazonaws.com/f8ce9eb29b234f33bb2753786f832b52/www-wikipedia-org.png",
    "error": false,
    "status": 200,
    "name": "www-wikipedia-org.png",
    "remainingCredits": 98146
}

back to top

Spreadsheet Extractor/XLS / XLSX to CSV

#back to top

1. /xls/convert/to/csv

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/csv

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
quotationSymbol   optional. Must be a String.
separatorSymbol   optional. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/csv Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/a078b91ed5d744939a6af5e53052e158/Input.csv?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDEe60q1agcli%2Ff2A9iKBAb3Qjy8tzVw7R3ErbNKGZE6aQU0Avc%2B008akXmk6CZDPdGu78HywnNss9O29FLGR9WnvoC7yYxLTYr7n1DSzRzDd4K0eTENiYo4bXa1GmO%2FzexdhKAFce6FmLAq8kC%2B3v24JdgdpdcBo15evu8tgqylTd07j2byk6v1%2BSlaFUClP3yi7ovTyBTIoW3f4K2nDeIbS%2BjQUq8s4jIdk8YZdhnc3TRSA9BwBmquHYKM6pNYaag%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHBN55YVQF/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135922Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=0061e96b89c9429b0436c24706918fd03eca92107f49e7e73e1450033a0cf386",
    "error": false,
    "status": 200,
    "name": "Input.csv",
    "remainingCredits": 98515
}

#back to top

2. /xls/convert/to/csv

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/csv

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
quotationSymbol   optional. Must be a String.
separatorSymbol   optional. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/csv Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/4d478a265f0246369d79a9453fd71ca4/Input.csv?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDFBsw5A7XqASdLuJ0SKBASsTrRVmRNNB3W34v1fIytXgG%2F5elTI8m3whGMzQvxp0z0jicD7Yov%2BD%2FWcnJbEBf0mLpwxCK3HblbVyKYSD2k92v37BgFbdarcKkIBhFcBmKv2nzPaiGIfLAhZ0qc9pblouX0FbGKv2l%2BTnuTU1zH9%2B1MYxrot%2F1bnENhA8sARpQyjHovTyBTIolzmsH7YJaPten76GJRk8KgKLPZTYvQo78ObjkTowYEgqu%2F4WUgywSw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHOXVR4OGA/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135934Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=9500370d9413b9553b48ff59c45d5c4f0662bb52fd8ce7421d3b33cad8a2fe7f",
    "error": false,
    "status": 200,
    "name": "Input.csv",
    "remainingCredits": 98514
}

back to top

Spreadsheet Extractor/XLS/XLSX to HTML

#back to top

1. /xls/convert/to/html

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/html

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/html Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/8406acd541b0447592d7d8558f997cf6/Input.html?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDO3yJcYzYEWEd%2BoC0SKBAXDCz0E4AB5tI8zUVPS9O72Y0GHFnpMenQZ4PAcQjgSe%2Bthz%2FfjjpxjsUp5cd7wh2DxIBOq%2FlAE74tdd16bWDsAmImY1fO0MjQ9PaDRo7qd57RRw1WwBATIutP7otKkkUtfhdZfINEbEBRKyxNE7Zh%2FjOsJcgOwE4Ahnr%2FoPml500Ci5o%2FTyBTIoe%2FLQx0ZdvqIQ1Ms8p%2BamqldOY09iyFXAu4AeLBcjC64KRmTttaMNOw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHCKKGFCNE/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T140127Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=97d913ae3561257b4e522f9069a912ce9cbade1035f42efe7bc3ee3955019183",
    "error": false,
    "status": 200,
    "name": "Input.html",
    "remainingCredits": 98513
}

#back to top

2. /xls/convert/to/html

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/html

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/html Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/2edb166da555455690315ae71e63c15c/Input.html?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDMcfu4ocoAKzyo3y7iKBAYimtjz7mYR6kSOZh4UjUpgmC9oO2Bcb2PNUpbDPd7GtU18I4JNRZYblzG6JrNXq%2FiYgy8OuQuBE5uOZLMFjQ%2B6TUIM%2F3bQSJCOI9F29CjY8tE0h6UZfAwi7d%2BgHs%2Fe7KPeKc8AdF%2FXhSDas3Kwuj6u4d%2Bi%2FIrHaefrS1kVYAIFacijFo%2FTyBTIouRL0Ilias0R%2Bn7ISFzx5l1G7O%2FXxEMGCLjvF4fEHyPHjMD3gm2S29w%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHOHNXRBHS/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T140139Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=c921e574385f1f0a0a5bd7265af5fc75ef8ea971516491941f7b0c735c3b2fe1",
    "error": false,
    "status": 200,
    "name": "Input.html",
    "remainingCredits": 98512
}

back to top

Spreadsheet Extractor/XLS/XLSX to JSON

#back to top

1. /xls/convert/to/json

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/json

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/json Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/30a5694fee5640939b203d6a4434909b/Input.json?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDKfddzW%2FdNC49OENSSKBAZNTa8%2BPbUI3bpnHgoobJ%2BvYZbFzMw3YWaWWftprTe68CtkWTidk8myYaX9%2BvF8f4gmOd6nEvlq5SEuGphs5oIJNkvVPi5H2SVGlPqziTxyOA1jrq%2BQz1R5Qvc6FjSC3kafHqLisjNjCjYtE6lYKBGREXHjcpERewAg4U6coDVfsgCj3ofTyBTIoXnze1%2BCdl6gs9mHWqkS%2FAtJfqwHXQnebOrMRbzxb5g3YP%2Boo4pXlAA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHA24DGFMR/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135814Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=943c02e5291d287c40a6d1760979c61b30069bb47c1a415c3d188d65f1758057",
    "error": false,
    "status": 200,
    "name": "Input.json",
    "remainingCredits": 98517
}

#back to top

2. /xls/convert/to/json

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/json

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/json Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/18009bcb2d414cb794fa41032cbd7d0b/Input.json?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDPYo6i5PK8497%2BllZiKBAYbQsgUq76LLLL265cy6QB5rJhrQEQBVlw2XdYpfNuBogitkFJE7ZdUKvIuP4h3%2BxJ861WpOUhheZSE5P4GpCoac6gUYJB5Qv8IEXBIDNjevMwI4ZYaHjUIqhRSjenDuMDCd406CXFDlqKrJM%2BzYmWnL%2FC2YNyN0CVr6snsvnaS7ySiFovTyBTIoG8X6teTW6Niw6yZIjR2QfkLQ20P720ku%2BsZwtImqLuxxxyzUJwLdBQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHFZBBM6NT/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135827Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=59606ca78a0de19115f3981b3bef3e8ca12649fa0612e90171bb0edc4c63f909",
    "error": false,
    "status": 200,
    "name": "Input.json",
    "remainingCredits": 98516
}

back to top

Spreadsheet Extractor/XLS/XLSX to TXT

#back to top

1. /xls/convert/to/txt

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/txt

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
file   optional. Source PDF file.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/json Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/30a5694fee5640939b203d6a4434909b/Input.json?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDKfddzW%2FdNC49OENSSKBAZNTa8%2BPbUI3bpnHgoobJ%2BvYZbFzMw3YWaWWftprTe68CtkWTidk8myYaX9%2BvF8f4gmOd6nEvlq5SEuGphs5oIJNkvVPi5H2SVGlPqziTxyOA1jrq%2BQz1R5Qvc6FjSC3kafHqLisjNjCjYtE6lYKBGREXHjcpERewAg4U6coDVfsgCj3ofTyBTIoXnze1%2BCdl6gs9mHWqkS%2FAtJfqwHXQnebOrMRbzxb5g3YP%2Boo4pXlAA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHA24DGFMR/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135814Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=943c02e5291d287c40a6d1760979c61b30069bb47c1a415c3d188d65f1758057",
    "error": false,
    "status": 200,
    "name": "Input.json",
    "remainingCredits": 98517
}

#back to top

2. /xls/convert/to/txt

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/txt

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/json Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/18009bcb2d414cb794fa41032cbd7d0b/Input.json?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDPYo6i5PK8497%2BllZiKBAYbQsgUq76LLLL265cy6QB5rJhrQEQBVlw2XdYpfNuBogitkFJE7ZdUKvIuP4h3%2BxJ861WpOUhheZSE5P4GpCoac6gUYJB5Qv8IEXBIDNjevMwI4ZYaHjUIqhRSjenDuMDCd406CXFDlqKrJM%2BzYmWnL%2FC2YNyN0CVr6snsvnaS7ySiFovTyBTIoG8X6teTW6Niw6yZIjR2QfkLQ20P720ku%2BsZwtImqLuxxxyzUJwLdBQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHFZBBM6NT/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135827Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=59606ca78a0de19115f3981b3bef3e8ca12649fa0612e90171bb0edc4c63f909",
    "error": false,
    "status": 200,
    "name": "Input.json",
    "remainingCredits": 98516
}

back to top

Spreadsheet Extractor/XLS/XLSX to XML

#back to top

1. /xls/convert/to/xml

Endpoint:

Method: GET
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/xml

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/json Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/30a5694fee5640939b203d6a4434909b/Input.json?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDKfddzW%2FdNC49OENSSKBAZNTa8%2BPbUI3bpnHgoobJ%2BvYZbFzMw3YWaWWftprTe68CtkWTidk8myYaX9%2BvF8f4gmOd6nEvlq5SEuGphs5oIJNkvVPi5H2SVGlPqziTxyOA1jrq%2BQz1R5Qvc6FjSC3kafHqLisjNjCjYtE6lYKBGREXHjcpERewAg4U6coDVfsgCj3ofTyBTIoXnze1%2BCdl6gs9mHWqkS%2FAtJfqwHXQnebOrMRbzxb5g3YP%2Boo4pXlAA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHA24DGFMR/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135814Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=943c02e5291d287c40a6d1760979c61b30069bb47c1a415c3d188d65f1758057",
    "error": false,
    "status": 200,
    "name": "Input.json",
    "remainingCredits": 98517
}

#back to top

2. /xls/convert/to/xml

Endpoint:

Method: POST
Type: FORMDATA
URL: https://api.pdf.co/v1/xls/convert/to/xml

Headers:

Key Value Description
Content-Type application/json  
x-api-key    

Body:

Key Value Description
async   optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
encrypt true optional. Enable encryption for output file. Must be one of: true, false.
url https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it.
name   optional. File name for generated output. Must be a String.
worksheetIndex   optional. Must be a String.
inline true optional. Must be one of: true, false.

Responses:

Status: /xls/convert/to/json Code: 200
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/18009bcb2d414cb794fa41032cbd7d0b/Input.json?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDPYo6i5PK8497%2BllZiKBAYbQsgUq76LLLL265cy6QB5rJhrQEQBVlw2XdYpfNuBogitkFJE7ZdUKvIuP4h3%2BxJ861WpOUhheZSE5P4GpCoac6gUYJB5Qv8IEXBIDNjevMwI4ZYaHjUIqhRSjenDuMDCd406CXFDlqKrJM%2BzYmWnL%2FC2YNyN0CVr6snsvnaS7ySiFovTyBTIoG8X6teTW6Niw6yZIjR2QfkLQ20P720ku%2BsZwtImqLuxxxyzUJwLdBQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHFZBBM6NT/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135827Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=59606ca78a0de19115f3981b3bef3e8ca12649fa0612e90171bb0edc4c63f909",
    "error": false,
    "status": 200,
    "name": "Input.json",
    "remainingCredits": 98516
}

Back to top

generated on Thu Jul 23 17:43:41 UTC 2020