curl --request GET \
--url 'https://{RAPIDAPI HOST}/v1/qrcode?data=http://candybar.pw' \
--header 'X-RapidAPI-Host: {RAPIDAPI HOST}' \
--header 'X-RapidAPI-Key: {YOUR RAPIDAPI KEY}' \
--output qr.png

Create and translate barcodes with ease: Candybar provides an easy-to-use API for generating and decoding barcodes. Supports Code39, Code128, PDF417 and QR Code.

Easily integrate candybar into your application

Simple API requests return barcodes to your app. Support for the most popular code formats.

Code128

Code39

PDF417

import requests

headers = {
      "X-RapidAPI-Key": "YOUR RAPIDAPI KEY",
      "X-RapidAPI-Host": "candybar-barcode-api.p.rapidapi.com"
      }

response = requests.get(
    url="https://candybar-barcode-api.p.rapidapi.com/v1/code128", 
    params={"data":"Great Barcodes!"}, headers=headers)

if response.status_code == 200:
    with open("code128.png", "wb") as f:
        f.write(response.content)

Decode barcodes from images. Receive a list of all barcode values in an image.

import requests

headers = {
  "X-RapidAPI-Key": "YOUR RAPIDAPI KEY",
  "X-RapidAPI-Host": "candybar-barcode-api.p.rapidapi.com"
}

files = {
  "file": open("./usps.jpg", "rb")
}

response = requests.post(url, headers=headers, files=files)

if response.status_code == 200:
  print(response.json())
[
  {
    'code_type': 'QRCODE', 
    'contents': 'https://qr.usps.com/rl?s=m&t=6'
  }, 
  {
    'code_type': 'CODE128', 
    'contents': '420200440100\x1d9259812345678000000199'
  }
]