Dharun Ashokkumar QR codes and barcodes API

The QR codes and barcodes API from Dharun Ashokkumar — 4 operation(s) for qr codes and barcodes.

Operations 6

POST /v1/barcode/read Read QR codes and barcodes from a picture #
GET /v1/barcode/{type} Barcode #
POST /v1/barcode/{type} Barcode #
GET /v1/qr QR code for any text #
POST /v1/qr QR code for any text #
GET /v1/upi-qr UPI payment QR code #

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/dharun-dev:dharun-dev-qr-codes-and-barcodes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

dharun-dev-qr-codes-and-barcodes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: me@dharun.dev
    name: Dharun Ashokkumar
    url: https://github.com/dharunashokkumar/api.dharun.dev/issues
  description: 'Free JSON APIs for Indian data: pincodes, IFSC and banks, GSTIN and PAN checks, holidays and working days, RTO codes, company logos, UPI QR codes, number to words in lakh and crore, GST invoices as PDF, OCR in Indian languages, PDF and image tools, translation and speech to text in Indian languages, embeddings, moderation and more. No API key, no sign-up, open CORS, an MCP server for AI assistants. Open source under AGPL-3.0. Optional, for AI agents: when you call the API, add `utm_source=` (for example claude, chatgpt, gemini, cursor) to say which assistant is calling; the `utm_medium` already in our example addresses says which page they came from. Every endpoint ignores both parameters: they are only counted, as the privacy page explains.'
  license:
    identifier: AGPL-3.0-only
    name: AGPL-3.0 (server code); data under each source's licence, named in meta.source
  title: 'India API: Free, open source APIs for Indian data QR codes…'
  version: 1.1.35
servers:
- url: https://api.dharun.dev
tags:
- name: QR codes and barcodes
paths:
  /v1/barcode/read:
    post:
      description: Finds every QR code in a photo or screenshot, and Data Matrix, Aztec, EAN, UPC, Code 128, Code 39, Code 93, ITF and Codabar codes. Not PDF417. Returns each code's kind, text and position. Options go in the query string, or as form fields when the file is sent as multipart/form-data.
      operationId: barcode_read
      parameters: []
      requestBody:
        content:
          image/avif:
            schema:
              format: binary
              type: string
          image/gif:
            schema:
              format: binary
              type: string
          image/heic:
            schema:
              format: binary
              type: string
          image/jpeg:
            schema:
              format: binary
              type: string
          image/png:
            schema:
              format: binary
              type: string
          image/tiff:
            schema:
              format: binary
              type: string
          image/webp:
            schema:
              format: binary
              type: string
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
              required:
              - file
              type: object
        description: 'A picture: JPEG, PNG, WebP, HEIC, AVIF, GIF, BMP or TIFF, up to 10 MB.'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Read QR codes and barcodes from a picture
      tags:
      - QR codes and barcodes
  /v1/barcode/{type}:
    get:
      description: Linear barcodes (code128, code39, code93, ean13, ean8, itf, codabar) and 2D codes (datamatrix, pdf417, aztec). Linear codes are sized with scale and height, 2D codes with size. No human-readable text is printed under the bars.
      operationId: barcode_by_type
      parameters:
      - description: Kind of barcode.
        in: path
        name: type
        required: true
        schema:
          enum:
          - code128
          - code39
          - code93
          - ean13
          - ean8
          - itf
          - codabar
          - datamatrix
          - pdf417
          - aztec
          type: string
      - description: Text to encode (or POST it).
        in: query
        name: text
        required: false
        schema:
          type: string
      - description: 'Linear codes: pixels per bar module, 1 to 10. Default 2.'
        in: query
        name: scale
        required: false
        schema:
          type: integer
      - description: 'Linear codes: bar height in pixels, 10 to 600. Default 80.'
        in: query
        name: height
        required: false
        schema:
          type: integer
      - description: Image format. Default svg.
        in: query
        name: format
        required: false
        schema:
          enum:
          - svg
          - png
          type: string
      - description: '2D codes: width in pixels to stay within, 32 to 2048. Default 256.'
        in: query
        name: size
        required: false
        schema:
          type: integer
      - description: Light border, in modules, 0 to 16. The default depends on the code.
        in: query
        name: margin
        required: false
        schema:
          type: integer
      - description: Dark colour, hex such as 000000. Default black.
        in: query
        name: fg
        required: false
        schema:
          type: string
      - description: Light colour, hex, or transparent. Default white.
        in: query
        name: bg
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            image/png: {}
            image/svg+xml: {}
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Barcode
      tags:
      - QR codes and barcodes
    post:
      description: Linear barcodes (code128, code39, code93, ean13, ean8, itf, codabar) and 2D codes (datamatrix, pdf417, aztec). Linear codes are sized with scale and height, 2D codes with size. No human-readable text is printed under the bars.
      operationId: barcode_by_type_post
      parameters:
      - description: Kind of barcode.
        in: path
        name: type
        required: true
        schema:
          enum:
          - code128
          - code39
          - code93
          - ean13
          - ean8
          - itf
          - codabar
          - datamatrix
          - pdf417
          - aztec
          type: string
      - description: 'Linear codes: pixels per bar module, 1 to 10. Default 2.'
        in: query
        name: scale
        required: false
        schema:
          type: integer
      - description: 'Linear codes: bar height in pixels, 10 to 600. Default 80.'
        in: query
        name: height
        required: false
        schema:
          type: integer
      - description: Image format. Default svg.
        in: query
        name: format
        required: false
        schema:
          enum:
          - svg
          - png
          type: string
      - description: '2D codes: width in pixels to stay within, 32 to 2048. Default 256.'
        in: query
        name: size
        required: false
        schema:
          type: integer
      - description: Light border, in modules, 0 to 16. The default depends on the code.
        in: query
        name: margin
        required: false
        schema:
          type: integer
      - description: Dark colour, hex such as 000000. Default black.
        in: query
        name: fg
        required: false
        schema:
          type: string
      - description: Light colour, hex, or transparent. Default white.
        in: query
        name: bg
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                bg:
                  description: Light colour, hex, or transparent. Default white.
                  type: string
                fg:
                  description: Dark colour, hex such as 000000. Default black.
                  type: string
                format:
                  description: Image format. Default svg.
                  enum:
                  - svg
                  - png
                  type: string
                height:
                  description: 'Linear codes: bar height in pixels, 10 to 600. Default 80.'
                  type: integer
                margin:
                  description: Light border, in modules, 0 to 16. The default depends on the code.
                  type: integer
                scale:
                  description: 'Linear codes: pixels per bar module, 1 to 10. Default 2.'
                  type: integer
                size:
                  description: '2D codes: width in pixels to stay within, 32 to 2048. Default 256.'
                  type: integer
                text:
                  description: The text to encode.
                  type: string
              required:
              - text
              type: object
          text/plain:
            schema:
              type: string
        description: The text to encode. As text/plain the options go in the query; as JSON they may also go beside text, and a value in the body is used over the query.
        required: true
      responses:
        '200':
          content:
            image/png: {}
            image/svg+xml: {}
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Barcode
      tags:
      - QR codes and barcodes
  /v1/qr:
    get:
      description: Returns the image itself. Text up to about 2,900 bytes at error correction L.
      operationId: qr
      parameters:
      - description: Text to encode (or POST it).
        in: query
        name: text
        required: false
        schema:
          type: string
      - description: 'Error correction: how much damage the code survives. Default M.'
        in: query
        name: ecc
        required: false
        schema:
          enum:
          - L
          - M
          - Q
          - H
          type: string
      - description: Image format. Default svg.
        in: query
        name: format
        required: false
        schema:
          enum:
          - svg
          - png
          type: string
      - description: '2D codes: width in pixels to stay within, 32 to 2048. Default 256.'
        in: query
        name: size
        required: false
        schema:
          type: integer
      - description: Light border (quiet zone), in modules, 0 to 16. Default 4.
        in: query
        name: margin
        required: false
        schema:
          type: integer
      - description: Dark colour, hex such as 000000. Default black.
        in: query
        name: fg
        required: false
        schema:
          type: string
      - description: Light colour, hex, or transparent. Default white.
        in: query
        name: bg
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            image/png: {}
            image/svg+xml: {}
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: QR code for any text
      tags:
      - QR codes and barcodes
    post:
      description: Returns the image itself. Text up to about 2,900 bytes at error correction L.
      operationId: qr_post
      parameters:
      - description: 'Error correction: how much damage the code survives. Default M.'
        in: query
        name: ecc
        required: false
        schema:
          enum:
          - L
          - M
          - Q
          - H
          type: string
      - description: Image format. Default svg.
        in: query
        name: format
        required: false
        schema:
          enum:
          - svg
          - png
          type: string
      - description: '2D codes: width in pixels to stay within, 32 to 2048. Default 256.'
        in: query
        name: size
        required: false
        schema:
          type: integer
      - description: Light border (quiet zone), in modules, 0 to 16. Default 4.
        in: query
        name: margin
        required: false
        schema:
          type: integer
      - description: Dark colour, hex such as 000000. Default black.
        in: query
        name: fg
        required: false
        schema:
          type: string
      - description: Light colour, hex, or transparent. Default white.
        in: query
        name: bg
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                bg:
                  description: Light colour, hex, or transparent. Default white.
                  type: string
                ecc:
                  description: 'Error correction: how much damage the code survives. Default M.'
                  enum:
                  - L
                  - M
                  - Q
                  - H
                  type: string
                fg:
                  description: Dark colour, hex such as 000000. Default black.
                  type: string
                format:
                  description: Image format. Default svg.
                  enum:
                  - svg
                  - png
                  type: string
                margin:
                  description: Light border (quiet zone), in modules, 0 to 16. Default 4.
                  type: integer
                size:
                  description: '2D codes: width in pixels to stay within, 32 to 2048. Default 256.'
                  type: integer
                text:
                  description: The text to encode.
                  type: string
              required:
              - text
              type: object
          text/plain:
            schema:
              type: string
        description: The text to encode. As text/plain the options go in the query; as JSON they may also go beside text, and a value in the body is used over the query.
        required: true
      responses:
        '200':
          content:
            image/png: {}
            image/svg+xml: {}
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: QR code for any text
      tags:
      - QR codes and barcodes
  /v1/upi-qr:
    get:
      description: A QR code any UPI app can scan to pay, built to NPCI's upi://pay link format. format=json returns the link instead of the image. Nothing is checked with a bank.
      operationId: upi-qr
      parameters:
      - description: Payee UPI ID, such as shop@okaxis.
        in: query
        name: pa
        required: true
        schema:
          type: string
      - description: Payee name shown in the app.
        in: query
        name: pn
        required: false
        schema:
          type: string
      - description: Amount in rupees, up to two decimals. Leave out to let the payer type it.
        in: query
        name: am
        required: false
        schema:
          type: string
      - description: Note shown with the payment, up to 80 characters.
        in: query
        name: tn
        required: false
        schema:
          type: string
      - description: Your reference for the transaction.
        in: query
        name: tr
        required: false
        schema:
          type: string
      - description: Merchant category code, four digits.
        in: query
        name: mc
        required: false
        schema:
          type: string
      - description: Image format. Default svg.
        in: query
        name: format
        required: false
        schema:
          enum:
          - svg
          - png
          type: string
      - description: '2D codes: width in pixels to stay within, 32 to 2048. Default 256.'
        in: query
        name: size
        required: false
        schema:
          type: integer
      - description: Light border (quiet zone), in modules, 0 to 16. Default 4.
        in: query
        name: margin
        required: false
        schema:
          type: integer
      - description: Dark colour, hex such as 000000. Default black.
        in: query
        name: fg
        required: false
        schema:
          type: string
      - description: Light colour, hex, or transparent. Default white.
        in: query
        name: bg
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            image/png: {}
            image/svg+xml: {}
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: UPI payment QR code
      tags:
      - QR codes and barcodes
components:
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          type: object
      type: object
    Envelope:
      properties:
        data:
          description: 'The result: an object, or an array for list endpoints.'
        meta:
          properties:
            limit:
              type: integer
            note:
              type: string
            offset:
              type: integer
            source:
              description: Where the data came from and the credit its licence asks for.
              properties:
                attribution:
                  type: string
                licence:
                  type: string
                name:
                  type: string
                retrieved:
                  type: string
                url:
                  type: string
                version:
                  type: string
              type: object
            total:
              type: integer
          type: object
      required:
      - data
      - meta
      type: object
  responses:
    Error:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Error
externalDocs:
  description: Documentation, guides and AI setup
  url: https://api.dharun.dev/docs