What is a Barcode Image API?
A Barcode Image API, takes a raw barcode value and converts it into a barcode image that can printed, added to labels, and scanned using a barcode scanner. The free barcode image API makes it easy to add the ability to generate barcodes to your applications using a single URL.
What can I do with the Barcode Image API?
You can encode pretty much any data into a barcode, so there are many potential applications. Here are a few examples:
- Add the ability to generate barcodes to your apps
- Generate barcodes in Google Sheets
- Add a barcode generator to your website
How do I generate a QR code?
You can use the following steps to create a QR code:
- Visit barcode.orcascan.com/?
data=Hello World
- Replace
Hello World
with the value you wish to encode - Press enter to load the image
- Right click and save the image
How do I generate a Data Matrix barcode?
You can use the following steps to create a Data Matrix barcode:
- Visit barcode.orcascan.com/?
type=datamatrix
&data=Hello - Replace
Hello
in the URL with the value you wish to encode - Press enter to load the image
- Right click and save the image
How do I generate a Code 128 barcode?
You can use the following steps to create a Code 128 barcode:
- Visit barcode.orcascan.com/?
type=code128
&data=Hello World - Replace
Hello World
in the URL with the value you wish to encode - Press enter to load the image
- Right click and save the image
What types of barcodes can I generate?
You can generate the following barcode by setting the type
query string parameter of the Barcode Image URL. If no type
is specified qr
is assumed:
Type | Description |
---|---|
qr |
QR code |
datamatrix |
Data Matrix |
upca |
Universal Product Code-A |
code39 |
Code 39 |
upce |
Universal Product Code-E |
ean8 |
European Article Number 8 |
ean13 |
European Article Number 13 |
code93 |
Code 93 |
code128 |
Code 128 |
itf |
Interleaved 2 of 5 (ITF) |
pdf417 |
Portable Data File 417 |
aztec |
Aztec Code |
Note: some barcodes require a specific data structure. If you provide invalid data, the image returned will explain the issue, for example barcode.orcascan.com/?type=upca&data=hello
What images formats does the API support?
The Barcode Image API supports the following image formats:
Format | Description |
---|---|
svg |
SVG (Scalable Vector Graphics) ← default |
png |
PNG (Portable Network Graphics) |
jpg |
JPG (Joint Photographic Experts Group) |
tiff |
TIFF (Tagged Image File Format) |
pdf |
PDF (Portable Document Format) |
gif |
GIT (Graphics Interchange Format) |
webp |
WebP (Web Picture Format) |
You can change the format by appending format=png
to your URL, for example https://barcode.orcascan.com/?data=Hello World&format=png
Is it possible to add text to the Barcode Image?
Yes, add the text=Hello World
query string parameter with the value you would like to be appear below the barcode. For example barcode.orcascan.com/?data=Hello World&text=Hello World
produces:
Is it possible to change the font size?
Yes, you can change the font size using the fontsize=100
query string parameter with a value in pixels, for example barcode.orcascan.com/?data=Hello&text=World&fontsize=100
produces:
If no font size is provided fontsize=fit
is assumed, which automatically selects a font size that ensures the text does not breach the width of the barcode image.
How do I adjust the barcode whitespace?
You can adjust the amount of whitespace around the barcode using the padding=6
query string parameter with a value in pixels, for example https://barcode.orcascan.com/?data=Hello World&padding=6
How do I rotate the barcode to landscape?
You can generate a barcode in landscape mode using the layout=landscape
query string parameter, for example https://barcode.orcascan.com/?data=Hello&text=hello&layout=landscape
Do I need to provide an API key?
No, Orca Scans goal is to simplify barcode tracking and make the technology available to all, regardless of technical skill or budget. Because of that, you don’t need to provide an API key.
Is the Barcode Image API free to use?
Yes, the Barcode Image API is completely free to use! We kindly encourage users to credit Orca Scan by mentioning: “Barcodes provided by Orca Scan” or linking to orcascan.com. Attribution helps others discover and benefit from our free barcode tools.
What is the rate limit?
You can send a maximum of 15 requests per second, exceeding this limit will result in a HTTP 503 Service Unavailable response.
How do I detect a Barcode Image API error?
The Barcode Image API always returns an image. If there’s an error, the image includes an error message with guidance. Developers can detect errors by checking the HTTP status code:
Status | Message | Description |
---|---|---|
200 |
Ok | Request successful |
400 |
Bad request | Invalid parameter value |
500 |
Unexpected error | Something went wrong |
How do I generate barcode images from a spreadsheet?
Use the following steps to convert a spreadsheet of barcodes values into barcode images:
- Register for an Orca Scan account at cloud.orcascan.com
- Create a sheet using the Blank Canvas template
- Upload your spreadsheet of barcodes
- Select the range of barcodes you would like to print
- Open the barcode preview on the left of the screen
- Select the barcode type you would like to generate
- Click download images
You will then have a zip
file containing the barcode images.
Barcode Image API questions?
As with everything at Orca Scan, our Barcode Image API will evolve based on your feedback. So if you have any issues, or need help, chat with us live or drop us an email hello@orcascan.com