API Documentation

OnlyBarcode exposes a simple REST API for generating barcodes in a wide range of 1D and 2D formats. Send a GET request to https://api.onlybarcode.com/api/barcode with text and format parameters and the endpoint responds with JSON containing a PNG data URL you can embed or save directly.

A POST request to the same endpoint accepts a JSON body with additional options such as width, height, backgroundColor and lineColor. Full parameter tables and response formats are documented below.

curl "https://api.onlybarcode.com/api/barcode?text=123456&format=CODE128&width=3&height=150"

API Pricing

The API is free to start. Paid tiers raise the daily quota — Pro 10,000 and Business 100,000 requests per day.

Plan Price Requests / day Batch API
Free $0 100 (anonymous, per IP) —
Pro $19 / month 10,000 —
Business $49 / month 100,000 Available

Business includes the Batch API (POST /api/barcode/batch): send up to 1,000 barcodes per request as JSON ({"items":[{"text":"...","format":"CODE128","settings":{...}}]} — format optional, settings per-item overrides). Quota is billed per item and deducted on admission before generation; failed items are not refunded; partial failures are tolerated with per-index errors while HTTP stays 200. Full request/response details and error codes: batch documentation below.

How it works

  1. Start free — no signup or key needed; anonymous usage is counted per IP address.
  2. Need more volume? Purchase Pro or Business through the checkout links below.
  3. Payment triggers a webhook that generates your API key and emails it to you automatically.
Pro — Coming online at launch Business — Coming online at launch