Read Barcode from Image
Image → Read Barcode from Image
The Read Barcode from Image API reads barcodes from an image. You send the image as Base64 (docContent), docName, and optionally imageType (jpg, png) and async. The API returns JSON with barcode type, content, position, and other properties. Use the tester below to try it; more details are in the sections that follow.
Try the Read Barcode from Image API
Endpoint: POST /api/v2/ReadBarcodesfromImage · Required: api-key, docContent, docName
Use the form below to send your API key and image (Base64). The response is JSON with barcode data. No code required—fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Read Barcode from Image?
This endpoint reads barcodes from an image. You provide the image (Base64), docName, and optionally imageType (jpg, png). The API returns JSON with barcode type, text/content, position, and other properties. Supports QR codes, UPC, Code128, EAN-13, EAN-8, Code39, DataMatrix, PDF417, and more.
Key features
- Multiple formats – QR, UPC, Code128, EAN-13/8, Code39, DataMatrix, PDF417, and others.
- Single request – Send docContent, docName; no extra configuration.
- Async – Use async for large images.
Use when you need to read barcodes or QR codes from images. For PDFs use Read Barcode from PDF.
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | Image file content (Base64). Supported: JPG, PNG. |
| docName | string | Yes | Image file name. |
| imageType | string | No | Image type: jpg or png. |
| async | boolean | No | Enable asynchronous processing. |
When to use Read Barcode from Image
- QR codes – Read QR codes from photos or screenshots.
- Product barcodes – Read UPC, EAN, Code128 from product images.
- Workflows – Use barcode content for lookup, inventory, or routing.
For request/response schemas and code samples, see Read Barcode from PDF in the PDF4me API docs (same endpoint supports images).
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- An image file (JPG, PNG) containing barcodes in Base64 format
Response Format
The API returns JSON with barcode type, text/content, position, and other barcode properties.