Quick Start

Get up and running with Barcode & QR Toolkit API in under a minute.

1. Get your API key

Sign up on RapidAPI to get your free API key. The Basic plan includes generous rate limits at no cost.

2. Generate your first QR code

Send a POST request with the data you want to encode. Customise colours, shape, and add a logo.

curl -X POST "https://barcode.toolkitapi.io/v1/qr/generate" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": "https://toolkitapi.io", "module_shape": "rounded", "fg_color": "#1a1a2e"}'
import httpx

resp = httpx.post(
    "https://barcode.toolkitapi.io/v1/qr/generate",
    headers={"X-API-Key": "YOUR_KEY"},
    json={
        "data": "https://toolkitapi.io",
        "module_shape": "rounded",
        "fg_color": "#1a1a2e",
    },
)
result = resp.json()
print(result["format"], result["width"], "x", result["height"])
const resp = await fetch("https://barcode.toolkitapi.io/v1/qr/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "YOUR_KEY",
  },
  body: JSON.stringify({
    data: "https://toolkitapi.io",
    module_shape: "rounded",
    fg_color: "#1a1a2e",
  }),
});
const data = await resp.json();
console.log(data.format, data.width, "x", data.height);

3. Generate a barcode

Specify the data and barcode type. The API supports EAN-13, UPC-A, Code128, Code39, ISBN, and more.

curl -X POST "https://barcode.toolkitapi.io/v1/barcode/generate" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": "5901234123457", "barcode_type": "ean13"}'
resp = httpx.post(
    "https://barcode.toolkitapi.io/v1/barcode/generate",
    headers={"X-API-Key": "YOUR_KEY"},
    json={"data": "5901234123457", "barcode_type": "ean13"},
)
result = resp.json()
print(result["barcode_type"])
const resp = await fetch("https://barcode.toolkitapi.io/v1/barcode/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "YOUR_KEY",
  },
  body: JSON.stringify({ data: "5901234123457", barcode_type: "ean13" }),
});
console.log(await resp.json());

4. Decode an image

Send a base64-encoded image to decode all QR codes or barcodes in the image.

curl -X POST "https://barcode.toolkitapi.io/v1/qr/decode" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://toolkitapi.io/qr.png"}'
resp = httpx.post(
    "https://barcode.toolkitapi.io/v1/qr/decode",
    headers={"X-API-Key": "YOUR_KEY"},
    json={"url": "https://toolkitapi.io/qr.png"},
)
for item in resp.json()["results"]:
    print(item["data"])
const resp = await fetch("https://barcode.toolkitapi.io/v1/qr/decode", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "YOUR_KEY",
  },
  body: JSON.stringify({ url: "https://toolkitapi.io/qr.png" }),
});
const data = await resp.json();
data.results.forEach(r => console.log(r.data));

5. Explore all endpoints

Browse the full tool listing to discover all 9 endpoints — including bulk generation, GET endpoints for direct embedding, and the barcode types reference.