# Bulk Barcode Generator: EAN, UPC, Code 128 to PNG or SVG (`scrapemint/bulk-barcode-generator`) Actor

Generate hundreds of retail and logistics barcodes in one run: EAN-13, UPC-A, Code 128, ITF-14, Code 39, and ISBN as PNG or SVG with direct download links. Check digits validated before rendering, wrong numbers flagged free. Runs fully offline. Pay per barcode, first 2 free.

- **URL**: https://apify.com/scrapemint/bulk-barcode-generator.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$2.00 / 1,000 barcode generateds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Bulk Barcode Generator: EAN, UPC, Code 128 to PNG or SVG

Paste a list of product numbers, get a print-ready barcode image per line. Barcode web tools make you export one at a time or pay a subscription for batch mode; label software costs $100 and up. Here you pay per barcode.

### Supported types

| Type | Use |
| --- | --- |
| **EAN-13** | Retail products worldwide |
| **UPC-A** | Retail products in North America |
| **Code 128** | Logistics, internal SKUs, any text |
| **ITF-14** | Shipping cartons and outer cases |
| **Code 39** | Legacy warehouse and industrial systems |
| **ISBN** | Books (with the EAN-13 bookland rendering) |

### Check digits are validated, not just drawn

For EAN-13, UPC-A, and ITF-14 the actor verifies the GTIN check digit before rendering:

- Give it the number **without** the check digit and the correct one is computed and appended.
- Give it a number with a **wrong** check digit and you get a free note row telling you what the digit should have been, instead of a barcode that scans as the wrong product.

Catching a bad number before you print 5,000 labels is part of the product.

### What you get

One dataset row per barcode:

| Field | Description |
| --- | --- |
| `value` | Your input |
| `encodedText` | What was actually encoded (check digit appended if you omitted it) |
| `barcodeType`, `format` | Type and PNG/SVG |
| `imageUrl` | Direct download link to the image |
| `fileName` | File name in the run's storage |

All images are also visible in the run's key-value store in the Apify console.

### Typical uses

- **Ecommerce sellers**: EAN/UPC images for product packaging and marketplace listings.
- **Warehouses**: Code 128 labels for bins, shelves, and SKUs.
- **Distributors**: ITF-14 carton codes for outer cases.
- **Publishers and print shops**: ISBN barcodes for book covers, batch label orders.

### Pricing

You pay per barcode generated (`barcode`). The first 2 of every run are free. Invalid numbers cost nothing.

500 barcodes cost $1. No subscription, no watermark.

### Input example

```json
{
    "items": ["5901234123457", "590123412345", "4006381333931"],
    "barcodeType": "ean13",
    "format": "png",
    "scale": 3,
    "barHeight": 12,
    "showText": true
}
```

The second line has 12 digits: its check digit is computed automatically.

### Notes

- Runs fully offline. Your product numbers never touch an external service.
- One barcode type per run; run the actor once per type if you need several.
- PNG suits label printers directly; SVG scales to any size without blur.

# Actor input Schema

## `items` (type: `array`):

The numbers or text to encode, one barcode per line. GTIN types (EAN-13, UPC-A, ITF-14) accept the number with or without its check digit; when omitted, the check digit is computed for you.

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

Applied to all lines in the run. EAN-13 and UPC-A for retail products, ITF-14 for shipping cartons, Code 128 for logistics and internal SKUs, Code 39 for legacy systems, ISBN for books.

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

PNG for label printers and documents, SVG for infinite-resolution vector use.

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

Pixel width of the narrowest bar (PNG). 2-3 suits most label printers.

## `barHeight` (type: `integer`):

Height of the bars in millimeters.

## `showText` (type: `boolean`):

Include the human-readable digits below the barcode.

## Actor input object example

```json
{
  "items": [
    "5901234123457",
    "4006381333931",
    "9780306406157"
  ],
  "barcodeType": "ean13",
  "format": "png",
  "scale": 3,
  "barHeight": 12,
  "showText": true
}
```

# 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 = {
    "items": [
        "5901234123457",
        "4006381333931",
        "9780306406157"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/bulk-barcode-generator").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 = { "items": [
        "5901234123457",
        "4006381333931",
        "9780306406157",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/bulk-barcode-generator").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "items": [
    "5901234123457",
    "4006381333931",
    "9780306406157"
  ]
}' |
apify call scrapemint/bulk-barcode-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapemint/bulk-barcode-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/1UVgSM0wXsNoPVtFW/builds/AdfLpf7WYRfOD46aU/openapi.json
