# QR & Barcode Generator + Reader (no key) (`synthetic.ia/qr-barcode`) Actor

Generate QR codes and barcodes (EAN/UPC, Code128/39/93, ITF, Codabar, DataMatrix, PDF417, Aztec) as PNG/SVG/JPEG/WebP, and read codes from an image. Batch-capable. Clean HTTP API + MCP, no key. Pay per code.

- **URL**: https://apify.com/synthetic.ia/qr-barcode.md
- **Developed by:** [Synthetic](https://apify.com/synthetic.ia) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 codes

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## QR & Barcode — generator + reader (no key)

Generate **QR codes** and **barcodes** — and read them back — behind a clean HTTP API (and MCP tool). Encode any text/URL into a crisp PNG, SVG, JPEG or WebP, in a batch if you like, with colours, size and error-correction control; or point it at an image and get back every code it contains. Supports **QR, EAN-13/8, UPC-A/E, Code 128/39/93, ITF-14, Codabar, GS1-128, Data Matrix, PDF417 and Aztec**. **No API key.** Pay per code.

- 🔳 **Generate** — QR or barcode → PNG/SVG/JPEG/WebP. Set error-correction (L–H), size, quiet-zone margin, foreground/background colours, and a human-readable caption.
- 🧾 **Barcodes** — retail (EAN/UPC), logistics (Code 128, ITF-14, GS1-128), and 2D (Data Matrix, PDF417, Aztec).
- 📷 **Read** — decode QR + barcodes from a photo or screenshot; returns each code's **text + format**.
- 🧺 **Batch** — encode many values in one call; each returned as a URL.
- 💵 Pay per code · no key.

### The use case it was built for

Tickets, product labels, inventory, payment links, Wi-Fi cards, event passes — anything that needs a code generated at scale or scanned from an image. Drop this into a backend or an agent (over MCP): send a list of SKUs and get labelled barcodes, or send a scanned document and get the codes out. No design tools, no desktop software.

### Sample output (`generate`)

```json
{
  "ok": true, "type": "qr", "format": "png", "count": 1,
  "images": [
    { "id": "code-0", "data": "https://synthetic.com.ar", "type": "qr",
      "url": "https://api.apify.com/v2/key-value-stores/…/records/generate-….png" }
  ]
}
```

### Sample output (`read`)

```json
{ "ok": true, "count": 2, "codes": [
  { "text": "https://synthetic.com.ar", "format": "QR_CODE" },
  { "text": "5901234123457", "format": "EAN_13" }
] }
```

### How to use

- **HTTP API (Standby):** `POST /generate` or `/read`. `GET /` returns help.
- **Normal run:** pass `{ operation, ... }` as input; results land in the dataset + key-value store.
- **MCP tool:** expose it to your agent via Apify's MCP server.

### Input

- **operation** — `generate` or `read`.
- **data** — (generate) text/URL, or a list for a batch.
- **type** — `qr` (default) · `code128` · `ean13` · `ean8` · `upca` · `upce` · `code39` · `code93` · `itf14` · `codabar` · `datamatrix` · `pdf417` · `aztec` · `gs1128`.
- **format** — `png` (default) · `svg` (QR) · `jpeg` · `webp`. **ecc** — QR error correction L/M/Q/H.
- **width / scale / margin / color / background / includetext** — sizing, colours, and the barcode caption.
- **image** — (read) an image URL or base64 to decode.

### Pricing

**Per code** from **$0.004** (down to $0.0015 on higher tiers). Generating a batch of 10 = 10 codes; reading an image with 3 codes = 3 codes.

### Related Actors

- **[Image Converter & Optimizer](https://apify.com/synthetic.ia/image-converter)** — resize/convert the code images.

### FAQ

**Which barcode types can it read?** QR, EAN-13/8, UPC-A/E, Code 128/39/93, ITF, Codabar, Data Matrix, PDF417 and Aztec.

**Can I brand a QR with colours?** Yes — set `color` and `background` (hex), and use `ecc: "H"` if you'll drop a logo on top.

**Best input for reading?** A sharp, high-contrast image with a little blank margin around the code.

### Notes & limits

Up to 50 codes generated per call. Reading works best on clean images; very small, blurry or skewed codes may not decode.

# Changelog

This Actor's version history is a separate document: https://apify.com/synthetic.ia/qr-barcode/changelog.md

# Actor input Schema

## `operation` (type: `string`):

Generate a code image, or read codes from an image.

## `data` (type: `array`):

Text/URL to encode into a QR/barcode. Add several for a batch.

## `type` (type: `string`):

QR or a barcode symbology.

## `format` (type: `string`):

Output format. SVG is available for QR.

## `ecc` (type: `string`):

QR resilience: L=7% … H=30% (higher survives more damage/logos).

## `width` (type: `integer`):

QR image width in pixels.

## `scale` (type: `integer`):

Barcode module scale (bigger = larger/sharper).

## `margin` (type: `integer`):

Blank margin around the code.

## `color` (type: `string`):

Hex colour of the code, e.g. #000000.

## `background` (type: `string`):

Hex background colour, e.g. #ffffff.

## `includetext` (type: `boolean`):

Print the value under the barcode.

## `image` (type: `string`):

For operation=read: an image (URL or base64) containing QR/barcodes.

## Actor input object example

```json
{
  "operation": "generate",
  "data": [
    "https://synthetic.com.ar"
  ],
  "type": "qr",
  "format": "png",
  "ecc": "M",
  "width": 320,
  "scale": 3,
  "color": "#000000",
  "background": "#ffffff",
  "includetext": true
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `runs` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("synthetic.ia/qr-barcode").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("synthetic.ia/qr-barcode").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call synthetic.ia/qr-barcode --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,synthetic.ia/qr-barcode"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/jMM1PYFoN3rDZFjZc/builds/VfsIrqZQaRntqokYQ/openapi.json
