{
  "openapi": "3.0.1",
  "info": {
    "title": "QR Code & Barcode Generator and Reader (EAN, Code128)",
    "description": "Generate QR codes and barcodes (EAN-13, EAN-8, UPC-A, Code 128, Code 39, ITF, Data Matrix) as PNG or SVG with public links, or read them from image URLs: text, type and position. Check digits, colors, bulk. Pure calculation, no external data source.",
    "version": "0.1",
    "x-build-id": "EVhV8AMh2LDslviLP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/br_data_hub~qr-barcode-toolkit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-br_data_hub-qr-barcode-toolkit",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/br_data_hub~qr-barcode-toolkit/runs": {
      "post": {
        "operationId": "runs-sync-br_data_hub-qr-barcode-toolkit",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/br_data_hub~qr-barcode-toolkit/run-sync": {
      "post": {
        "operationId": "run-sync-br_data_hub-qr-barcode-toolkit",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "generate",
              "decode"
            ],
            "type": "string",
            "description": "Choose generate to turn text into QR codes or barcodes saved as PNG/SVG files, or decode to read the codes inside images given by URL.",
            "default": "generate"
          },
          "texts": {
            "title": "Texts to encode",
            "type": "array",
            "description": "Generate mode: one text per line, up to 5,000 per run, e.g. a URL, a Wi-Fi string or a product number. Each one becomes a code of the type chosen below. Identical texts are generated once.",
            "default": [
              "https://apify.com",
              "WIFI:T:WPA;S:OfficeGuest;P:welcome2026;;"
            ],
            "items": {
              "type": "string"
            }
          },
          "barcodeType": {
            "title": "Code type for the texts",
            "enum": [
              "qr",
              "ean13",
              "ean8",
              "upca",
              "code128",
              "code39",
              "itf",
              "datamatrix"
            ],
            "type": "string",
            "description": "Type used for every line in Texts to encode. EAN-13, EAN-8 and UPC-A take digits only and get their check digit added when it is missing.",
            "default": "qr"
          },
          "codes": {
            "title": "Codes with their own type",
            "type": "array",
            "description": "Generate mode, optional: a list of objects like {\"text\": \"5901234123457\", \"type\": \"ean13\"} to mix types in one run. Types: qr, ean13, ean8, upca, code128, code39, itf, datamatrix.",
            "default": [
              {
                "text": "5901234123457",
                "type": "ean13"
              },
              {
                "text": "SKU-2026-001",
                "type": "code128"
              }
            ]
          },
          "imageFormats": {
            "title": "Image formats",
            "type": "array",
            "description": "Generate mode: files saved in the key-value store for each code. PNG suits web and print at a fixed size, SVG scales without loss. One code is one charge, whatever the formats.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "svg"
              ],
              "enumTitles": [
                "PNG",
                "SVG"
              ]
            },
            "default": [
              "png",
              "svg"
            ]
          },
          "errorCorrection": {
            "title": "QR error correction",
            "enum": [
              "L",
              "M",
              "Q",
              "H"
            ],
            "type": "string",
            "description": "QR codes only. Higher levels survive more damage or a logo on top but make the code denser: L 7%, M 15%, Q 25%, H 30%.",
            "default": "M"
          },
          "scale": {
            "title": "Size (pixels per module)",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Generate mode: how many pixels each square (or bar unit) takes, from 1 to 40, e.g. 6. A typical QR code is 25 to 45 modules wide.",
            "default": 6
          },
          "foregroundColor": {
            "title": "Foreground color",
            "type": "string",
            "description": "Hex color of the dark modules, e.g. #000000. Keep strong contrast with the background so scanners can read it.",
            "default": "#000000"
          },
          "backgroundColor": {
            "title": "Background color",
            "type": "string",
            "description": "Hex color of the background, e.g. #FFFFFF. Light backgrounds with dark modules scan best.",
            "default": "#FFFFFF"
          },
          "quietZone": {
            "title": "Add quiet zone (margin)",
            "type": "boolean",
            "description": "Keep on to add the blank margin that scanners need around the code. Turn off only if your layout already provides it.",
            "default": true
          },
          "humanReadableText": {
            "title": "Print text under barcodes",
            "type": "boolean",
            "description": "Linear barcodes only (EAN, UPC, Code 128, Code 39, ITF): print the encoded digits under the bars.",
            "default": true
          },
          "includeDataUri": {
            "title": "Include PNG as data URI",
            "type": "boolean",
            "description": "Add the PNG as a base64 data URI in every dataset item, handy for small images in a web page or API. Makes items bigger.",
            "default": false
          },
          "keyValueStoreName": {
            "title": "Store name for the files",
            "type": "string",
            "description": "Optional name of a named key-value store for the PNG and SVG files, e.g. my-qr-codes. Named stores are kept until you delete them; the default store of a run is deleted after your data-retention period."
          },
          "imageUrls": {
            "title": "Image URLs to decode",
            "type": "array",
            "description": "Decode mode: public links to PNG, JPEG, GIF, WebP, BMP or TIFF images, one per line, up to 2,000 per run. data:image base64 links also work. Each image can hold several codes.",
            "items": {
              "type": "string"
            }
          },
          "decodeFormats": {
            "title": "Only read these types",
            "type": "array",
            "description": "Decode mode: restrict reading to some code types, which is faster and avoids false hits. Leave empty to read all of them.",
            "items": {
              "type": "string",
              "enum": [
                "qr",
                "ean13",
                "ean8",
                "upca",
                "code128",
                "code39",
                "itf",
                "datamatrix"
              ],
              "enumTitles": [
                "QR Code",
                "EAN-13",
                "EAN-8",
                "UPC-A",
                "Code 128",
                "Code 39",
                "ITF (Interleaved 2 of 5)",
                "Data Matrix"
              ]
            }
          },
          "maxCodesPerImage": {
            "title": "Codes per image",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Decode mode: the most codes returned (and charged) for one image, e.g. 20. Useful for photos of shelves or sheets of labels.",
            "default": 20
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}