QRCode, BarCode API

Decode and generate QRCodes and BarCodes.

  • Generate QRCodes
    • Raw text QRCode
    • URL QRCode
    • vCARD QRCode
    • WiFi QRCode
    • Phone / Tel QRCode
  • Generate BarCodes
    • Type code39
    • Type code93
    • Type code128
    • Type ean / ean13
    • Type Two of Five
  • Decode QRCodes and BarCodes (EAN, UPC, Code 128, Code 39, Code 93, ITF, Codabar, Data Matrix, Aztec) from an image or pdf

If you have found this API useful but feel that a feature is missing, please share your suggestions with us via email.


Generate raw text QRCode

curl -H 'Accept:image/png' 'https://qrbar-code.intami.pl/generate/qr/text' --output qrCode.png --data '{"text":"your text here", "withBorder":true, "foregroundColor":"#ff0000", "backgroundColor":"#00fafa", "errorRecovery":"high"}'
FieldDescriptionHints
textText to be encoded into the QRCodeRequired
withBorderIf QRCode should have a border in a "backgroundColor" color.Default: false
backgroundColorQRCode background color.Format: #RRGGBBAA or #RRGGBB - Red,Green,Blue,Alpha, Default: #FFFFFFFF (white)
foregroundColorQRCode foreground color.Format: #RRGGBBAA or #RRGGBB - Red,Green,Blue,Alpha, Default: #000000FF (black)
errorRecoveryError correction information.Possible values: low, medium, high, highest, Default: medium

Example:

curl -H 'Accept:image/png' 'https://qrbar-code.intami.pl/generate/qr/text' --output qrCode.png --data '{"text":"your text here", "withBorder":true, "foregroundColor":"#ff0000", "backgroundColor":"#00fafa", "errorRecovery":"high"}'

For all generations you can specify requested output format. The default one is image/png. All supported output formats.


Generate BarCode

curl -H 'Accept:image/png' "https://qrbar-code.intami.pl/generate/bar/_TYPE_" --output barCode.png --data '{"data":"123456789012", "width":350, "height":100 }'
Field / URL parameterDescriptionHints
_TYPE_One of supported bar code typesRequired. One of supported bar code types: code39, code93, code128, twooffive, ean, aztec, pdf417, codabar, datamatrix
widthWidth of the BarCode in pixelsDefault: 300
heightHeight of the BarCode in pixelsDefault: 100

You can read more about different BarCode types.

Example (EAN type):

curl -H 'Accept:image/png' "https://qrbar-code.intami.pl/generate/bar/ean" --output barCode.png --data '{"data":"123456789012", "width":350, "height":100 }'

For all generations you can specify requested output format. The default one is image/png. All supported output formats.


Decode QRCodes and BarCodes from an image or PDF

Decode PDF example:

curl -H 'Accept:application/json' -H 'Content-Type:application/pdf' 'https://qrbar-code.intami.pl/decode' --data-binary @your-document.pdf

PNG image example:

curl -H 'Accept:application/json' -H 'Content-Type:image/png' 'https://qrbar-code.intami.pl/decode' --data-binary @your-image.png

It is important to set proper Content-Type header that corresponds to your input. All supported input formats.


Supported output formats:

  • image/png
  • image/gif
  • image/webp
  • image/jpeg
  • image/tiff
  • image/bmp
  • application/pdf

Supported input formats:

  • image/png
  • image/gif
  • image/webp
  • image/jpeg
  • image/tiff
  • image/bmp
  • application/pdf

MCP — Model Context Protocol

The API also has an MCP (Model Context Protocol) endpoint, so AI agents and language models can generate and decode QR codes and bar codes themselves.

MCP server address:

https://qrbar-code.intami.pl/mcp

The endpoint uses the streamable HTTP transport and needs no authentication.

Tools:

  • generate_qr_code – a QR code (text, url, phone number, WiFi network or vCard contact) as a PNG image
  • generate_bar_code – a bar code (code128, code39, code93, ean, twooffive, codabar, pdf417, datamatrix, aztec) as a PNG image
  • decode_codes – QR codes and bar codes from a base64 encoded image or pdf
  • buy_package – buys a request package with an x402 payment (for agents that can sign payments)

MCP client configuration:

{
  "mcpServers": {
    "qrbar-code": {
      "type": "http",
      "url": "https://qrbar-code.intami.pl/mcp"
    }
  }
}

Claude Code:

claude mcp add --transport http qrbar-code https://qrbar-code.intami.pl/mcp

Limits:

The MCP endpoint shares the limits of the API: 20 requests per day per IP address, used by REST and MCP together. Tool calls use the limit; initialization and the tool list do not, and neither does a tool call that ends with an error (e.g. invalid arguments). A decoding that finds no code uses one request. With an API key of a request package, send it in the X-API-Key header (client configuration) or in the api_key argument of the tools.


API Limits

This API has a free limit of 20 API requests per day. If you need more subscribe to one of our paid plans.
Paid plans are provided by RapidAPI. Over the limit the API answers with HTTP 402 – "Payment Required" and the paid options. Answers with a result count, and so does a decoding that finds no code; an invalid request (4xx) or a server error (5xx) does not.

Request packages without a daily limit and without expiry, paid with x402 in USDC on Base: pro 1 000 requests for 1 USD, ultra 150 000 requests for 9 USD, mega 500 000 requests for 29 USD. Buy one with a browser wallet on the wallet page, or with POST /x402/packages/{id} (current packages and network: GET /x402/packages). The answer contains an API key for the X-API-Key header; a purchase with this header tops up the same key. Generating a code uses one request of a package, decoding one request for every decoded code (at least one). The X-Requests-Remaining header of every answer gives the requests left.

A technical limit of 120 requests per minute per IP address applies as well (also with an API key); over it the API answers with HTTP 429 – "Too Many Requests" and Retry-After: 60.


Explore the API