new: every yearly plan now includes a free .link domain

LEARN MORE

  • new: every yearly plan now includes a free .link domain

  • LEARN MORE

QR Code API 2026: Free and Paid APIs Compared, With Code

Last updated:

API and automation

Illustration of a QR code API: a large QR icon sits beside a dark code panel showing a POST request, on a green grid background. The tone is clean and technical.
Illustration of a QR code API: a large QR icon sits beside a dark code panel showing a POST request, on a green grid background. The tone is clean and technical.

LucaG

Author

LucaG is the co-founder of ShortPen. Before that, he built Guadagnissimo from scratch, a personal finance blog that reached hundreds of thousands of readers per year and was later acquired. That experience is where he learned SEO and marketing attribution hands-on. He also runs NTSOT, a newsletter on tools for work and life. His background spans product design, growth, and building online businesses.

Show more

A QR code API turns a URL into a QR code image with one HTTP request, and GoQR.me or QuickChart need no API key. To edit codes after printing and track scans, you need a dynamic API: ShortPen (our product) includes 200 free API calls a month.

Most QR code APIs fall into two groups. The free ones take your data in a URL and send back an image. The paid ones create a short link behind the code, so you can change where it points and see who scans it.

Below you'll find working code for both, a comparison of 7 QR code APIs, and the limits that matter once you go to production. We checked every price and limit on each provider's own pricing page and API docs in November 2026.

Create dynamic QR codes from your code

ShortPen's API makes link and QR codes with scan tracking. 200 API calls a month on the free plan.

Create a QR code with one API call

Here's the full flow with the ShortPen API. You need an API key: in the app, go to Settings, then Organization, then API Keys, and create one. The key is shown once, so store it somewhere safe and keep it on your server, never in browser code.

Dynamic QR codes sit on a short link, so the API needs to know which domain to use. Get your domain IDs first:

curl -X POST https://api.shortpen.com/v1/get \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ "resource": "domain" }'
curl -X POST https://api.shortpen.com/v1/get \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ "resource": "domain" }'
curl -X POST https://api.shortpen.com/v1/get \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ "resource": "domain" }'

Then create the QR code. This one points to a landing page, with dotted modules and a dark blue color:

curl -X POST https://api.shortpen.com/v1/qr \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "type": "link",
    "url": "https://acme.com/spring-sale",
    "domain_id": 3,
    "title": "Spring sale poster",
    "design": {
      "module_style": "dots",
      "foreground_color": "#163044"
    }
  }'
curl -X POST https://api.shortpen.com/v1/qr \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "type": "link",
    "url": "https://acme.com/spring-sale",
    "domain_id": 3,
    "title": "Spring sale poster",
    "design": {
      "module_style": "dots",
      "foreground_color": "#163044"
    }
  }'
curl -X POST https://api.shortpen.com/v1/qr \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "type": "link",
    "url": "https://acme.com/spring-sale",
    "domain_id": 3,
    "title": "Spring sale poster",
    "design": {
      "module_style": "dots",
      "foreground_color": "#163044"
    }
  }'

The response holds the QR code ID, the short link behind it and the image itself as a 1024 px PNG data URI:

{
  "success": true,
  "status_code": 200,
  "message": "",
  "data": {
    "id": 18342,
    "type": "link",
    "link": "https://go.acme.com/spring-sale",
    "qr": "data:image/png;base64,iVBORw0KGgo...",
    "created": true
  }
}
{
  "success": true,
  "status_code": 200,
  "message": "",
  "data": {
    "id": 18342,
    "type": "link",
    "link": "https://go.acme.com/spring-sale",
    "qr": "data:image/png;base64,iVBORw0KGgo...",
    "created": true
  }
}
{
  "success": true,
  "status_code": 200,
  "message": "",
  "data": {
    "id": 18342,
    "type": "link",
    "link": "https://go.acme.com/spring-sale",
    "qr": "data:image/png;base64,iVBORw0KGgo...",
    "created": true
  }
}

The same request in JavaScript (Node 18 or later) and Python:

// Node 18+
import { writeFile } from "node:fs/promises";

const res = await fetch("https://api.shortpen.com/v1/qr", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SHORTPEN_API_KEY}`,
    "Content-Type": "application/json",
    Accept: "application/json",
  },
  body: JSON.stringify({
    type: "link",
    url: "https://acme.com/spring-sale",
    domain_id: 3,
  }),
});

const { data } = await res.json();
const png = Buffer.from(data.qr.split(",")[1], "base64");
await writeFile("qr.png", png);
console.log(data.id, data.link);
// Node 18+
import { writeFile } from "node:fs/promises";

const res = await fetch("https://api.shortpen.com/v1/qr", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SHORTPEN_API_KEY}`,
    "Content-Type": "application/json",
    Accept: "application/json",
  },
  body: JSON.stringify({
    type: "link",
    url: "https://acme.com/spring-sale",
    domain_id: 3,
  }),
});

const { data } = await res.json();
const png = Buffer.from(data.qr.split(",")[1], "base64");
await writeFile("qr.png", png);
console.log(data.id, data.link);
// Node 18+
import { writeFile } from "node:fs/promises";

const res = await fetch("https://api.shortpen.com/v1/qr", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SHORTPEN_API_KEY}`,
    "Content-Type": "application/json",
    Accept: "application/json",
  },
  body: JSON.stringify({
    type: "link",
    url: "https://acme.com/spring-sale",
    domain_id: 3,
  }),
});

const { data } = await res.json();
const png = Buffer.from(data.qr.split(",")[1], "base64");
await writeFile("qr.png", png);
console.log(data.id, data.link);
import base64, os, requests

res = requests.post(
    "https://api.shortpen.com/v1/qr",
    headers={
        "Authorization": f"Bearer {os.environ['SHORTPEN_API_KEY']}",
        "Accept": "application/json",
    },
    json={
        "type": "link",
        "url": "https://acme.com/spring-sale",
        "domain_id": 3,
    },
)
res.raise_for_status()
data = res.json()["data"]

with open("qr.png", "wb") as f:
    f.write(base64.b64decode(data["qr"].split(",")[1]))
print(data["id"], data["link"])
import base64, os, requests

res = requests.post(
    "https://api.shortpen.com/v1/qr",
    headers={
        "Authorization": f"Bearer {os.environ['SHORTPEN_API_KEY']}",
        "Accept": "application/json",
    },
    json={
        "type": "link",
        "url": "https://acme.com/spring-sale",
        "domain_id": 3,
    },
)
res.raise_for_status()
data = res.json()["data"]

with open("qr.png", "wb") as f:
    f.write(base64.b64decode(data["qr"].split(",")[1]))
print(data["id"], data["link"])
import base64, os, requests

res = requests.post(
    "https://api.shortpen.com/v1/qr",
    headers={
        "Authorization": f"Bearer {os.environ['SHORTPEN_API_KEY']}",
        "Accept": "application/json",
    },
    json={
        "type": "link",
        "url": "https://acme.com/spring-sale",
        "domain_id": 3,
    },
)
res.raise_for_status()
data = res.json()["data"]

with open("qr.png", "wb") as f:
    f.write(base64.b64decode(data["qr"].split(",")[1]))
print(data["id"], data["link"])

To send people somewhere else later, update the QR code with its ID. The printed code doesn't change, because it holds the short link, not the destination:

curl -X PUT https://api.shortpen.com/v1/qr \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "url_id": 18342,
    "url": "https://acme.com/summer-sale"
  }'
curl -X PUT https://api.shortpen.com/v1/qr \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "url_id": 18342,
    "url": "https://acme.com/summer-sale"
  }'
curl -X PUT https://api.shortpen.com/v1/qr \
  -H "Authorization: Bearer $SHORTPEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "url_id": 18342,
    "url": "https://acme.com/summer-sale"
  }'

The endpoint also makes Wi-Fi, vCard, PDF, text, email, SMS, WhatsApp, phone, location and Bitcoin codes. Set type and pass the fields in content. The full field list is in the Create QR Code reference.

Free QR code APIs that need no key

If you only need a static image, three services return a QR code from a plain GET request. Put the URL in an <img> tag or fetch it from your backend. Here are the three calls with curl:

# GoQR.me: 300 px PNG, error correction M
curl -G https://api.qrserver.com/v1/create-qr-code/ \
  --data-urlencode "data=https://acme.com" \
  -d size=300x300 -d ecc=M -o goqr.png

# QuickChart: 300 px SVG
curl -G https://quickchart.io/qr \
  --data-urlencode "text=https://acme.com" \
  -d size=300 -d format=svg -o quickchart.svg

# Dub: 600 px PNG by default
curl -G https://api.dub.co/qr \
  --data-urlencode "url=https://acme.com" -o

# GoQR.me: 300 px PNG, error correction M
curl -G https://api.qrserver.com/v1/create-qr-code/ \
  --data-urlencode "data=https://acme.com" \
  -d size=300x300 -d ecc=M -o goqr.png

# QuickChart: 300 px SVG
curl -G https://quickchart.io/qr \
  --data-urlencode "text=https://acme.com" \
  -d size=300 -d format=svg -o quickchart.svg

# Dub: 600 px PNG by default
curl -G https://api.dub.co/qr \
  --data-urlencode "url=https://acme.com" -o

# GoQR.me: 300 px PNG, error correction M
curl -G https://api.qrserver.com/v1/create-qr-code/ \
  --data-urlencode "data=https://acme.com" \
  -d size=300x300 -d ecc=M -o goqr.png

# QuickChart: 300 px SVG
curl -G https://quickchart.io/qr \
  --data-urlencode "text=https://acme.com" \
  -d size=300 -d format=svg -o quickchart.svg

# Dub: 600 px PNG by default
curl -G https://api.dub.co/qr \
  --data-urlencode "url=https://acme.com" -o

These codes are static. The data is written into the pattern itself, so you can't change it after printing and nobody counts the scans. That's fine for a Wi-Fi password, a fixed product page or a ticket number.

Static vs dynamic QR code APIs

A static QR code API encodes your data straight into the image. A dynamic QR code API encodes a short link instead.

When someone scans, the provider’s server logs the scan and redirects them to the destination you set. That extra hop is what lets you edit the destination and see scans by date, country and device.

Static vs dynamic QR codes: a static code holds the full destination URL, can't change after printing and isn't counted; a dynamic code holds a short link that counts the scan and redirects to a destination you can change

The trade-off is dependence on the provider. If a dynamic code's short link stops working, every printed copy stops working. So check what happens to your codes on the free plan and if you cancel. We explain the difference in more depth in static vs dynamic QR codes.

QR code APIs compared

API

Free tier

Dynamic codes

Scan tracking

Paid API from

ShortPen

200 API calls a month

Yes, free plan too

Yes

$23/mo, yearly

GoQR.me

No key, no stated cap

No

No

Free only

QuickChart

No key, rate limited

Paid plans

Paid plans

$40/mo

Dub

Free QR endpoint, links API at 60 requests a minute

Through links

Yes, as link clicks

$30/mo

Hovercode

No API on Free

Yes

Yes

$39/mo

QR TIGER

No API on Free

Yes

Yes

$7/mo

Uniqode

14-day trial

Yes

Yes

$49/mo, yearly

The 7 QR code APIs in detail

1. ShortPen: best for dynamic codes with a free tier

ShortPen Create QR Code API reference

ShortPen is a link and QR code platform, and its API creates the same codes you'd make in the dashboard. One endpoint, POST /v1/qr, handles 12 code types.

Link and PDF codes are dynamic, so you can change the destination or swap the PDF later. Scans show up in the dashboard by country, device, browser and referrer, and the analytics endpoint returns raw click events per link.

Design options cover module and eye styles, frames, colors and a logo. The free plan gets the basic styles (square and dots modules, square and circle eyes); the rest are on paid plans.

Limits:

  • Free: 200 API calls a month, unlimited links and dynamic QR codes, basic QR design.

  • The paid Plus plan: $29 a month, or $23 billed yearly. Unlimited API calls, all QR styles and design templates.

  • All plans: 60 requests a minute per API key.

Good to know: the API returns PNG only. For large prints, download the SVG from the dashboard.

Try the ShortPen API

Create an API key on the free plan and make your first dynamic QR code. 200 API calls a month included.

2. GoQR.me: best free static API

GoQR.me QR code API page

GoQR.me runs its free API at api.qrserver.com. No sign-up, no key. You choose the size, colors, margin, error correction and format, including SVG and EPS for print. It also has a read-qr-code endpoint that decodes an uploaded QR image, which few other APIs offer.

Limits: no request limit, but GoQR.me asks services that regularly go over 10,000 requests a day to contact them. PNG output stops at 1000 x 1000 px.

Good to know: the default error correction is L (about 7%). Set ecc=M or higher for printed codes.

3. QuickChart: best for styled static codes

QuickChart QR code API page

QuickChart is an open-source chart and QR code API that you can also host yourself. Its /qr endpoint goes further than GoQR.me on design: a center logo through centerImageUrl, dot and finder styles, captions and sizes up to 3000 px.

Limits:

  • Free: no key needed, with a rate limit QuickChart doesn't publish.

  • The paid Professional plan: $40 a month. 10,000 images a month, no rate limits, dynamic QR codes.

Good to know: adding a logo switches error correction to H automatically. Logos don't work with SVG output.

4. Dub: best for developers already on Dub

Dub free QR code API page

Dub has two ways in. GET api.dub.co/qr returns a static PNG or SVG with no key. For a tracked code, you create a short link with Dub's links API and generate the QR code from that link, so scans count as link clicks.

Limits: the free plan allows 60 API requests a minute and 25 new links a month. Logos on QR codes need a paid plan, which starts at $30 a month.

Good to know: Dub's analytics endpoints aren't available on the free plan. More in Dub alternatives.

5. Hovercode: best for QR-first teams

Hovercode API page

Hovercode is a QR code generator with a full REST API. You can create static or dynamic codes, change a code's destination or design without losing its scan history, and pull scans by country, city, OS and browser.

Limits:

  • The paid Business plan: $39 a month. API access, 600 dynamic QR codes a month.

  • Business Plus: $99 a month. 2,000 dynamic QR codes a month.

  • Rate limit: 60 writes and 120 reads a minute per token.

Good to know: the free plan has no API access and 3 dynamic codes in total.

6. QR TIGER: best for a low monthly price

QR TIGER API documentation page

QR TIGER puts API access on every paid plan. The API creates dynamic and bulk codes and returns scan data for each campaign.

Limits:

  • Regular: $7 a month. 12 dynamic QR codes, 500 API requests a month.

  • The paid Advanced plan: $16 a month. 200 dynamic codes, 3,000 requests a month.

  • The paid Premium plan: $37 a month. 600 dynamic codes, 10,000 requests a month.

Good to know: dynamic codes on the free plan stop at 500 scans each.

7. Uniqode: best for high-volume enterprise use

Uniqode QR code API page

Uniqode (formerly Beaconstac) is built for large companies, with compliance features and bulk generation in batches of up to 10,000. Its API limits are the highest on this list.

Limits (billed yearly):

  • The paid Core plan: $49 a month. 250 dynamic codes, 10 requests a second, 250,000 requests a month.

  • The paid Plus plan: $99 a month. 500 dynamic codes, 25 requests a second, 500,000 requests a month.

Good to know: there's no free plan, only a 14-day trial. Dynamic codes stop working when the trial ends unless you upgrade.

The catch in each free tier

Every free option limits something. Here's the limit you'll hit first.

The catch in each free QR code API tier: ShortPen 200 API calls a month, GoQR.me static only, QuickChart static and rate limited, Dub 25 new links a month, Hovercode no API on Free, QR TIGER no API on Free, Uniqode 14-day trial only

How to choose a QR code API

Decide if the code will ever need to change. If it goes on packaging, posters or business cards, assume it will. Pick a dynamic API. If it's a one-off ticket or a Wi-Fi login, a free static API is enough.

Count requests, not codes. Each create, edit and analytics call uses quota. A campaign with 500 codes and a daily stats sync uses far more calls than 500.

Check what happens to printed codes. Read what the provider does with dynamic codes on the free plan, at the end of a trial and after you cancel. A code that stops redirecting can't be fixed once it's printed.

Use your own domain. A dynamic code on your own short domain keeps working if you move to another provider later. You point the domain at the new tool and recreate the links. See our link shortener API guide for the link side of this.

Tips for production

  • Keep the key on your server. Never ship an API key in browser or mobile code.

  • Handle 429 errors. When you hit a rate limit or monthly quota, wait and retry with backoff instead of failing the whole batch.

  • Store the QR code ID. You need it to edit the code or match scans to it later.

  • Use error correction M or higher for print, and H if you add a logo.

  • Test a printed proof. Scan it with an iPhone and an Android phone at the real size and distance before you print the whole run.

FAQ

Is there a free QR code API?

Yes. GoQR.me, QuickChart and Dub's QR endpoint make static codes for free with no key. For dynamic codes with scan tracking, ShortPen's free plan includes 200 API calls a month.

Does Google have a QR code API?

Not anymore. QR codes came from Google Image Charts, which Google deprecated in 2012, and the old chart.googleapis.com URLs no longer work. GoQR.me and QuickChart are the usual replacements, with the same kind of URL-based request.

Can I track scans of a QR code made with an API?

Only with a dynamic QR code. The code points to a short link that records each scan before redirecting. Static codes from GoQR.me or QuickChart's free tier can't be tracked. For tracking beyond scans, see QR code analytics.

Can I change a QR code's destination after printing?

Yes, if it's dynamic. With ShortPen, send a PUT /v1/qr request with the code's ID and the new URL. The printed code stays the same.

Can I add a logo through the API?

Most APIs here support it. ShortPen takes a logo upload in the request, QuickChart uses centerImageUrl, and Dub's logo parameter needs a paid plan. Use high error correction so the code still scans.

What format should I use for printed QR codes?

SVG or EPS, because vector files stay sharp at any size. If you only have PNG, make it at least 1000 px wide for prints up to about 8 cm.

If you want dynamic QR codes with scan tracking from your own code, try the ShortPen API free.

One place for every link, QR code, and conversion

One place for every link, QR code, and conversion

Branded links and QR codes you can edit after printing

Conversions tied to the exact link or QR code, from your website or store online

Workspaces, custom domains and full analytics history as your team grows

Ready to make every click count?

Simplify your link management, gain valuable insights, and take control of your online presence. Your journey to better links starts here.