The Barcode Reader API can read all popular barcode types from QR Code, Code 128, EAN to Datamatrix, PDF417, GS1, and many more. It can decode barcodes from different formats such as JPG, PNG, TIFF, and PDF.
This 1D and 2D Barcode Reader API is also capable of decoding QR Codes with images at the center.
Web API engines work in any programming language: PHP, Javascript, C#, .NET and ASP.NET, Java, Visual Basic, and many others.
The PDF.co platform is secure. To learn more about Security, please refer to https://pdf.co/security
Barcode Reader API Benefits
Decode Different Barcode Types
The Barcode Reader API can read different types of barcodes in one call request. You can return all of the barcodes or narrow it down to your desired output by specifying the barcode type you want to capture.
Large File Support
The Barcode Reader API supports Asynchronous Mode which allows for processing large files and documents. It is considered a good practice to use the Asynchronous Mode when you are reading barcodes that take more than 25 seconds to process.
Web API Supports Multiple Languages
PDF.co platform can be used by software developers from programming languages such as PHP, Javascript, .NET and ASP.NET, C#, Java, Visual Basic, and many others. Find source code samples in our API documentation.
Business Automation Platforms Integrations
If you are not a developer, you can also easily automate your PDF operations via popular business automation platforms: Zapier, Make, Airtable, Salesforce, Google Apps Script, and 300+ more.
SIGN UP FOR FREE
Barcode Reader API Samples & Demo
In this demonstration, we will use the /v1/barcode/read/from/url endpoint to decode barcodes. We have a 1-page PDF that contains a mixture of different types of barcodes. The Web API will read all these barcodes and return the value as well as the type of the barcodes in the output.
Following are the images of the source PDF and the output.
Images of PDF with Barcodes and its Output
Let’s go over the /v1/barcode/read/from/url endpoint’s parameters and their corresponding functions real quick.
Endpoint
URL: | https://api.pdf.co/v1/barcode/read/from/url |
Method: | POST |
Parameter | Description |
url | required. Link to the source file. |
types | optional. Comma-separated list of barcode types to decode |
pages | optional. Comma-separated list of page indices (or ranges) to process. |
profiles | optional. Must be a String. Set custom configuration. See profiles examples here |
cURL Code Snippet
curl --location --request POST 'https://api.pdf.co/v1/barcode/read/from/url' \ --header 'x-api-key: {{x-api-key}}' \ --header 'Content-Type: application/json' \ --data-raw '{ "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf", "types": "Code128,Code39,Interleaved2of5,EAN13", "pages": "0", "encrypt": false, "async": false }'
The Barcode Reader API cURL source code samples are available here.
Let’s see the Barcode Reader API in action using the cURL code.
Images of Barcode Reader API in action
The Barcode Reader API JavaScript source code samples are available here.
The Barcode Reader API PHP source code samples are available here.
The Barcode Reader API Python source code samples are available here.
The Barcode Reader API Java source code samples are available here.
The Barcode Reader API C# source code samples are available here.