# Bulk QR Code & Barcode Reader: Decode from Image URLs (`bite-sized-insights/qr-code-barcode-reader`) Actor

Decode QR codes and barcodes from up to 1,000 image URLs per run. Get the text, code type, content type, error correction, orientation and four-corner position for every code found. Filter to QR codes or linear barcodes only.

- **URL**: https://apify.com/bite-sized-insights/qr-code-barcode-reader.md
- **Developed by:** [bite-sized-insights](https://apify.com/bite-sized-insights) (community)
- **Categories:** Developer tools, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

***Read QR codes and barcodes from image URLs in bulk - decoded text, code type and exact position, several codes per image, in any orientation.***

Give the actor a list of image URLs and get back one row per image with every code found in it. Decoding runs inside the run: no external recognition service is called and no account is needed. Pay-per-event pricing, charged only for images in which at least one code was decoded.

### Why Choose This Actor?

- **QR codes and barcodes**: QR (including Micro QR), Code128, Code39, Code93, EAN-13, EAN-8, UPC-A, UPC-E, ITF, Codabar, Data Matrix, Aztec, PDF417 and more
- **Several codes per image**: every code found is returned, with its type and position
- **Rotated, inverted or small codes**: rotated, mirrored-contrast and downscaled codes are tried automatically
- **Position data**: four corner points per code in image pixels, plus orientation
- **Safe downloads**: images are limited to 15 MB, 40 megapixels and 60 s total download time, redirects are limited, and private or internal addresses are refused
- **Per-image results**: a broken link never fails the run; the image gets its own row with the reason and is not charged
- **Cost-effective**: `$2.00 / 1,000 images read` on the Free plan, down to `$1.30` on Gold, plus a tiny start fee

### Quick Start

```json
{
  "urls": ["https://api.qrserver.com/v1/create-qr-code/?data=hello&size=200x200"],
  "codeFormat": "any"
}
```

### Usage Examples

#### Only product barcodes

```json
{
  "urls": ["https://example.com/shelf-photo.jpg", "https://example.com/label.png"],
  "codeFormat": "barcodes"
}
```

### Output Example

```json
{
  "url": "https://example.com/ticket.png",
  "status": "ok",
  "error": null,
  "width": 198,
  "height": 198,
  "codeCount": 1,
  "codes": [
    {
      "text": "https://example.com/ticket/42",
      "type": "QRCode",
      "contentType": "Text",
      "errorCorrection": "M",
      "orientation": 0,
      "position": [
        { "x": 24, "y": 24 },
        { "x": 174, "y": 24 },
        { "x": 174, "y": 174 },
        { "x": 24, "y": 174 }
      ]
    }
  ]
}
```

`status` is `ok` when a code was decoded, `no_code_found` for a readable image without a code, and `error` when the image could not be downloaded or opened (the reason is in `error`). Position corners are listed top left, top right, bottom right, bottom left.

### Input Options

| Option | Description |
|---|---|
| `urls` | Up to 1,000 public http(s) image URLs |
| `codeFormat` | `any` (default), `qr` or `barcodes` |

### Pricing

Pay-per-event. `image-read` is charged only for images with at least one decoded code; `no_code_found` and error rows are free. Images that could not be started because the run's time limit was close get an error row starting with `time_limit` and are never charged. The start fee ($0.0001) is charged once per GB of memory (minimum one), i.e. once for runs at or under 1 GB.

| Plan | `image-read` price |
|---|---|
| Free | $2.00 / 1,000 images |
| Bronze | $1.90 / 1,000 images |
| Silver | $1.70 / 1,000 images |
| Gold, Platinum, Diamond | $1.30 / 1,000 images |

### FAQ

**Which image formats work?** PNG, JPEG, GIF, WebP, BMP and TIFF. Only the first frame of animated images is read.

**Can it read an image behind a login?** No, URLs must be publicly reachable.

**Is the free plan limited?** Test and free-plan runs read the first 10 images of the list.

# Actor input Schema

## `urls` (type: `array`):

Public http(s) image URLs, each at most 15 MB and 40 megapixels.

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

`any` finds every supported type, `qr` only QR codes, `barcodes` only linear barcodes.

## Actor input object example

```json
{
  "urls": [
    "https://api.qrserver.com/v1/create-qr-code/?data=hello&size=200x200"
  ],
  "codeFormat": "any"
}
```

# Actor output Schema

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

One row per image with every decoded code: text, type and position

# 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 = {
    "urls": [
        "https://api.qrserver.com/v1/create-qr-code/?data=hello&size=200x200"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bite-sized-insights/qr-code-barcode-reader").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 = { "urls": ["https://api.qrserver.com/v1/create-qr-code/?data=hello&size=200x200"] }

# Run the Actor and wait for it to finish
run = client.actor("bite-sized-insights/qr-code-barcode-reader").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 '{
  "urls": [
    "https://api.qrserver.com/v1/create-qr-code/?data=hello&size=200x200"
  ]
}' |
apify call bite-sized-insights/qr-code-barcode-reader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bite-sized-insights/qr-code-barcode-reader"
        }
    }
}
```

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/yMjzyGnJtJz1I5y6L/builds/YxybQsfvIHRFQOgqa/openapi.json
