api-ninjas-com Barcode API

The Barcode API generates custom barcodes for any text. It supports multiple barcode types, custom dimensions, and several image formats.

Operations 1

GET /v1/barcodegenerate Generate a barcode #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-ninjas-com:api-ninjas-com-barcode-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-ninjas-com-barcode-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ninjas Barcode API
  description: 'Combined OpenAPI specification for every API Ninjas endpoint. Requests go to https://api.api-ninjas.com with an `X-Api-Key` header; get a free key at https://api-ninjas.com/register. Human-readable docs: https://api-ninjas.com/api. Index for LLMs: https://api-ninjas.com/llms.txt.'
  version: 1.0.0
  contact:
    name: API Ninjas
    url: https://api-ninjas.com
  license:
    name: Proprietary
servers:
- url: https://api.api-ninjas.com
  description: API Ninjas Production
security:
- ApiKeyAuth: []
tags:
- name: Barcode
  description: The Barcode API generates custom barcodes for any text. It supports multiple barcode types, custom dimensions, and several image formats.
paths:
  /v1/barcodegenerate:
    get:
      summary: Generate a barcode
      description: Generates a barcode image encoding `text`. Optional `type`, `format` and `include_text` control the symbology and output. Requires `text`.
      operationId: generateBarcode
      security:
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/text'
      - $ref: '#/components/parameters/type'
      - $ref: '#/components/parameters/format'
      - $ref: '#/components/parameters/include_text'
      responses:
        '200':
          $ref: '#/components/responses/BarcodeOpenapi_200'
        '400':
          $ref: '#/components/responses/BarcodeOpenapi_400'
        '401':
          $ref: '#/components/responses/BarcodeOpenapi_401'
        '500':
          $ref: '#/components/responses/BarcodeOpenapi_500'
      tags:
      - Barcode
components:
  responses:
    BarcodeOpenapi_401:
      description: Unauthorized - API key missing or invalid.
    BarcodeOpenapi_500:
      description: Internal Server Error
    BarcodeOpenapi_200:
      description: Successful response with barcode image binary.
      content:
        image/png:
          schema:
            type: string
            format: binary
        image/svg+xml:
          schema:
            type: string
            format: binary
    BarcodeOpenapi_400:
      description: Bad Request - Invalid parameters or request format.
  parameters:
    format:
      in: query
      name: format
      description: Image format to return.
      schema:
        type: string
        enum:
        - png
        - svg
        default: png
    type:
      in: query
      name: type
      description: Type of barcode to generate.
      schema:
        type: string
        enum:
        - code39
        - code128
        - ean
        - ean13
        - ean8
        - gs1
        - gtin
        - isbn
        - isbn10
        - isbn13
        - issn
        - jan
        - pzn
        - upc
        - upca
        default: upc
    text:
      in: query
      name: text
      description: Text to encode in the barcode.
      required: true
      schema:
        type: string
    include_text:
      in: query
      name: include_text
      description: Whether to include the text below the barcode.
      schema:
        type: boolean
        default: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
externalDocs:
  description: API Ninjas documentation
  url: https://api-ninjas.com/api