QR Code API: What it is, how it works, and how to choose the right one

ShortPen University

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 lets you generate QR codes programmatically. Instead of creating them one at a time through a web interface, you send an HTTP request with your data and get a QR code image back. That's it at its core.

If you're building a product that needs to generate QR codes at scale (for tickets, packaging, campaigns, or anything else), doing it manually isn't an option. You need an API.

But the market splits sharply between free static APIs that take 30 seconds to integrate and paid dynamic platforms that cost $7–$49/month.

Picking the wrong one means either rebuilding later or paying for features you don't need.

This guide covers how QR code APIs work, the real differences between static and dynamic options, what to evaluate before committing to a provider, and how to integrate one into your stack.

What is a QR code API?

A QR code API is a web service that accepts data (a URL, text, contact info, or any string) and returns a QR code image encoding that data. The simplest ones work with a single GET request. You construct a URL with your parameters, and the API returns a PNG or SVG.

For example, GoQR.me's API works like this: you call api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://example.com and get back a QR code image. No authentication, no API key, no SDK. You can embed it directly in an <img> tag.

More advanced QR code APIs use authenticated REST endpoints. You send a POST request with a JSON body containing your data and customization options (colors, logo, error-correction level), and receive a response with a QR code image or a URL to it.

API vs. library: which do you actually need?

This is the first decision, and most guides skip it entirely. You have two options for programmatic QR code generation:

A hosted API (like GoQR, QuickChart, or ShortPen) runs on someone else’s servers. You send requests over HTTP. The upside: no infrastructure to manage, and paid options include analytics, dynamic codes, and tracking. Hosted APIs can be integrated into various software platforms for dynamic QR code management, making it easy to automate QR code creation and editing within your existing software workflows. The downside: you depend on a third party for uptime and availability.

A client-side library (like qrcode.js for JavaScript or python-qrcode for Python) runs in your own code. You generate QR codes locally with zero external dependencies. The upside: no API calls, no rate limits, no subscription. The downside: no tracking, no dynamic codes, and you handle image rendering yourself.

Use an API when you need dynamic QR codes, scan analytics, or hosted reliability without managing image generation infrastructure. Use a library when you need static-only generation with zero external dependencies.

Most REST endpoints for QR code APIs require authentication. API requests for QR Code generation typically require an access token for authentication.

Static vs. dynamic QR code APIs

This is the most important distinction in the category, and it directly affects what you'll pay, what you can track, and what risks you take on.

What static QR code APIs do

A static QR code encodes data directly into the code's pattern. The destination URL (or text, or contact info) is baked into the black-and-white squares themselves. Once generated, it can't change.

Static APIs are typically free and require no authentication. GoQR.me and QuickChart both follow this model. You make a GET request, get an image back. No account needed. No rate limits (or very generous ones). QuickChart offers 1,000 free requests per month, with a $40/month tier for 100,000.

Static codes work well for permanent links, email signatures, one-off materials, and situations where tracking isn't needed.

What dynamic QR code APIs do

A dynamic QR code doesn’t encode your destination URL directly. Instead, it encodes a short redirect URL that the provider controls. When someone scans it, they hit the provider’s server first, which redirects them to your actual destination.

This intermediary step enables three things static codes can’t do. You can change the destination URL after printing. You can track scans (location, device, time). Dynamic QR codes are widely used in mobile campaigns and apps, allowing marketers to customize QR codes for mobile use and track mobile-specific engagement. APIs can pipe scan activity and conversion data directly into a company’s CRM or analytics dashboard for real-time analytics. And you can run A/B tests without reprinting.

The QR code market was valued at over $10 billion as of 2025, according to Grand View Research, with projected growth above 16% annually through 2030. Most of that value sits in the dynamic segment.

But dynamic codes come with a real tradeoff worth understanding.

The subscription dependency problem

Dynamic QR codes redirect through the provider's servers. If your subscription lapses, the redirect stops working. Your printed materials (posters, packaging, business cards) become dead ends.

This is the single most common complaint across Reddit threads, G2 reviews, and Capterra feedback about dynamic QR code platforms. Users describe it as a "hostage" situation: the QR codes you already printed will only continue to work as long as you keep paying.

Before committing to a dynamic QR code API, clearly understand this dependency. Platforms with transparent pricing and reasonable terms reduce the risk of surprise costs forcing cancellation. But the structural dependency remains.

If permanence matters more than editability, a static code with a redirect you control (like a short link on your own domain) may be the better architecture.

What to look for in a QR code API

Feature lists on provider websites all start looking the same. Here's what actually matters when evaluating options.

Authentication and access

Free static APIs (GoQR, QuickChart) require no authentication. You start making requests immediately. For anything involving dynamic codes or tracking, you'll need an API key and a paid account.

Rate limits vary wildly across providers. GoQR publishes no limit. QuickChart offers 1,000 requests per month on the free tier. ShortPen's API allows unlimited requests per month.

Uniqode scales from 10 requests per second on Pro to 100 on Business+ plans, with monthly caps ranging from 250,000 to 2 million requests.

If you're generating codes in bulk (product labels, event tickets, direct mail), check the rate limit before signing up. Hitting a cap mid-production run is a problem you want to avoid.

Customization options

Most QR code APIs support basic customization: foreground and background colors, output size, and format (PNG, SVG, PDF, JPEG). You can set the foreground color (e.g., using #RRGGBB format) and should ensure there is sufficient contrast between the foreground and background colors for optimal scannability.

Some APIs go further with gradient support, dot/eye patterns, and logo embedding. Design options often include customizing the QR code's eyeBallShape or eyeFrameShape to use a circle or other shapes, and frame styles such as balloon top are available for further customization.

When adding a logo to a QR code, error correction level matters. QR codes have four error correction levels: L (7% damage tolerance), M (15%), Q (25%), and H (30%). The higher the level, the more of the code can be obscured while remaining scannable.

If you’re embedding a logo, use level H.

Most APIs default to M, which may not leave enough room for a logo overlay without breaking scannability.

This detail gets overlooked in most comparisons, but it directly affects whether your branded QR codes actually work in the real world.

Customizing QR Codes with unique designs can increase their attractiveness and potentially lead to more scans.

Analytics and tracking

If you're using QR codes for marketing or campaigns, you need to know how many people scanned, from where, and on what device. Static APIs offer none of this. Dynamic platforms provide scan counts, geographic data, device breakdown, and referrer information.

Some platforms go further and connect scans to downstream outcomes.

With ShortPen, for example, every QR code is tied to a branded link with automatic scan and click tracking. If you install the ShortPen Pixel on your destination page, you can connect those scans to specific conversion events (signups, purchases, form submissions) and view them alongside your link data in a single dashboard.

That turns a QR code from a traffic channel into a measurable attribution point. For a deeper look at what scan data you can collect and how to act on it, see our guide to QR code analytics.

Pricing transparency

Free static APIs are genuinely free. No catches.

For dynamic platforms, pricing ranges from $7/month (QR Tiger's entry plan) to $49/month or more (Uniqode Pro, which is the lowest tier with API access).

The jumps between tiers can be steep, and API access is often locked behind mid-tier or higher plans.

Watch for hidden scan limits on free tiers, aggressive trial-to-paid auto-conversions, and per-scan fees that scale unpredictably. The cleanest pricing models state exactly how many codes, scans, and API calls each plan includes, with no surprises mid-campaign.

ShortPen's paid plans include API access with transparent limits and no per-scan charges.

Top QR code API providers compared

Free static APIs

GoQR.me is the most widely used free QR code API. Zero authentication, unlimited requests, simple GET-based pattern. It’s the only provider that also offers a QR code reading/decoding endpoint. Static codes only, no analytics.

QuickChart is open-source and self-hostable. It supports center-image (logo) embedding and claims 100% uptime for over three years. The free tier allows 1,000 QR codes per month. The $40/month Professional plan jumps to 100,000.

QRCode Monkey offers the most visual customization among free tools: 15+ body patterns, gradient support, and logo embedding. API access routes through RapidAPI with per-call pricing. It is fully compatible with modern HTML5 browsers and outputs QR codes directly to the browser for display or download.

QR codes generated by these APIs can be easily scanned using a phone's camera or a QR code reader app available in your app store.

Paid dynamic platforms

ShortPen combines dynamic QR code generation with branded link management and post-click conversion tracking in one platform. Every QR code is tied to a branded link, with scan-and-click analytics enabled by default. Add the ShortPen Pixel to your destination page to track signups, purchases, or any custom event directly from the dashboard. The REST API generates both a short link and a QR code in a single call, runs at 60 requests per minute, and is available on paid plans with a 14-day premium trial. Free tier available.

QR Tiger has the broadest feature set: 31 QR solution types, GPS tracking, bulk generation (up to 3,000 codes at once), and integrations with Zapier, Google Analytics 4, and HubSpot. You can link dynamic QR codes directly to Facebook pages or integrate Facebook social media links within QR code campaigns for enhanced engagement. Plans start at $7/month, with API access on the $37/month Premium tier.

Uniqode (formerly Beaconstac) targets regulated enterprise teams with SOC 2 Type II, GDPR, HIPAA, and ISO 27001 compliance. Detailed rate limit documentation. API access starts at the $49/month Pro plan.

Dub.co takes a different approach: open-source, SOC 2 certified, and integrated into a broader link attribution platform. Used by companies like Vercel and Twilio.

Link management platforms with QR APIs

Some platforms combine link management, QR code generation, and analytics under one roof. This matters because it means developers don't need separate tools for shortening links, generating QR codes, and tracking performance.

ShortPen fits here. Its REST API lets you generate branded short links and QR codes in a single request to api.shortpen.com/v1/generate, authenticated with a bearer token.

Every generated QR code is a dynamic code tied to a branded link, with click-and-scan analytics enabled by default. You can organize codes into workspaces and folders by campaign, and the Pixel adds conversion tracking on top.

The API limits requests to 60 per minute per token and is available on paid plans with a 14-day premium trial.

Provider

Free tier

API access price

Dynamic QR

Analytics

Scan limits

ShortPen

Yes

Free and paid plans

Yes, unlimited

Yes

Unlimited

GoQR.me

Unlimited

Free (no auth)

No

No

None

QuickChart

1K/month

Free / $40/mo

No

No

None

QR Tiger

3 dynamic codes

$37/month

Yes

Yes

Plan-based

Uniqode

14-day trial

$49/month

Yes

Yes

250K–2M/mo

Dub.co

Yes

Free (basic)

Yes

Yes

Plan-based

How to integrate a QR code API

Simple GET-based APIs (static)

The simplest integration requires no SDK, no library, and no authentication:

GET https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://example.com
GET https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://example.com
GET https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://example.com

This returns a PNG image. You can use it directly in an HTML <img> tag, embed it in an email, or download it for print. Add parameters for color (color= for foreground, bgcolor= for background) and error correction level (ecc=H for maximum).

This pattern works from any language or framework. If all you need is static QR code generation without tracking, this is the fastest path to production.

REST APIs with authentication (dynamic)

For dynamic codes with tracking, you'll work with a standard REST API pattern:

  1. Create an API key in your provider's dashboard

  2. Store the key securely (environment variable, secrets manager)

  3. Send a POST request with your bearer token and payload

  4. Receive a response containing the QR code image or URL, plus a tracking link

With ShortPen's API, for example, you POST to https://api.shortpen.com/v1/generate with your bearer token and destination URL in the JSON body. The response includes both a branded short link and a QR code, with analytics tracking enabled automatically. No separate QR generation step needed.

Best practices for production

Cache generated QR codes. If you're displaying the same QR code repeatedly (on a product page, in a recurring email), don't call the API on every page load. Generate once, cache the image, and serve it from your CDN or local storage.

Handle rate limits gracefully. Implement exponential backoff for 429 responses. If you're doing bulk generation, space your requests to stay within limits.

Use SVG for print, PNG for digital. SVG and PDF are vector formats that scale without quality loss. Critical for anything that gets printed. PNG works fine for screens.

Set the right error correction level. Use H (30% tolerance) when embedding logos. Use M (15%) as a general default. Use L (7%) only when you need maximum data density in a small physical space.

Test before deploying. Generate a code, print it at the actual size you'll use, and scan it with multiple phones in the lighting conditions your users will encounter. A code that works on screen can fail on a dark poster under fluorescent light.

Common mistakes and pitfalls

Even with the best QR code generator or code API, it’s easy to make mistakes that can render your QR codes unreadable or ineffective. Here are some of the most common pitfalls and how to avoid them:

  • Poor contrast: Always ensure there’s a strong contrast between your QR code and its background. A dark code on a light background is best. Avoid using colors that blend together, as this can make the code difficult for scanners to read.

  • Low-quality images or wrong file format: Using a low-resolution image or the wrong file type (like a compressed JPG) can distort the QR code’s modules, making it hard to scan. For print, always generate your QR codes in a vector format like SVG or EPS. For digital, use high-resolution PNG files.

  • Incorrect pixel size: If your QR code is too small, especially in print, it may not be scannable. Make sure the pixel size is appropriate for the intended use generally, at least 2 x 2 cm for print, but larger for posters or signage.

  • Not testing before deployment: Always test your QR codes with multiple devices and QR code readers before going live. This helps catch issues like broken links, incorrect data, or codes that don’t scan well in real-world conditions.

  • Over-customization: While it’s tempting to create a custom QR code with logos and colors, too much customization can interfere with readability. If you add a logo, increase the error correction level and test thoroughly.

By paying attention to these details when you generate QR codes, you’ll avoid common mistakes and ensure your codes are reliable, readable, and deliver a seamless experience for your users.

Common use cases for QR code APIs

Product packaging and labels

Manufacturers generate unique QR codes per SKU, batch, or individual unit. These can link to product info, authentication verification, warranty registration, or setup instructions. Dynamic codes let you update the destination after packaging is printed, so a product manual QR can point to the latest version of the documentation.

Event ticketing and check-in

Each attendee gets a unique QR code that doubles as their ticket. At the venue, staff scan codes for validation. The API generates codes in bulk during registration, and analytics track attendance rates in real time.

Marketing campaigns (print, out-of-home, direct mail)

QR codes on posters, flyers, packaging inserts, and billboards connect offline touchpoints to digital destinations. Dynamic codes let you A/B test landing pages without changing the printed material.

For a practical example, see how to automate direct mail campaigns with personalized QR codes.

With ShortPen, you can organize campaign QR codes into folders by campaign name and tag them by channel (print, OOH, direct mail). Scan data flows into the same analytics dashboard as your link clicks, and the Pixel tracks what happens after the scan, whether that's a signup, a purchase, or any custom event you define. You can test this workflow on the free plan.

Document authentication

Certificates, invoices, contracts, and official documents embed QR codes that link to verification databases. When someone scans the code, they can confirm the document's authenticity. Static codes work fine here since the verification URL is permanent.

FAQ

Is there a completely free QR code API?

Yes. GoQR.me and QuickChart both offer free QR code APIs for static code generation. GoQR requires no authentication and has no published request limit. QuickChart allows 1,000 free requests per month. Neither supports dynamic codes or scan analytics. ShortPen also offers a free plan that includes QR code generation with basic click and scan tracking.

What's the difference between a QR code API and a QR code library?

An API is a hosted service you call over HTTP. Someone else maintains the servers, handles image rendering, and (for paid plans) provides analytics. A library like qrcode.js or python-qrcode runs in your own application. You generate codes locally with no network calls, no rate limits, and no subscription fees. The tradeoff: libraries produce static codes only. If you need dynamic codes, scan tracking, or conversion attribution, you need an API.

Do dynamic QR codes stop working if I cancel my subscription?

In most cases, yes. Dynamic codes redirect through the provider's servers. When your subscription ends, the redirect typically stops. This means printed materials with those codes become nonfunctional. Before going all-in on dynamic QR codes, evaluate the provider's pricing stability and terms. Open-source platforms like Dub.co offer some protection, as you can self-host if needed.

Can I add a logo to a QR code generated via API?

Many APIs support logo embedding, including ShortPen, QRCode Monkey, QR Tiger, and Scanova. When adding a logo, set the error correction level to H (which tolerates up to 30% damage to the code pattern). Most APIs default to M (15%), which often isn't enough room for a logo without breaking scannability. Test the result with multiple devices before printing.

How many QR codes can I generate per minute via API?

It depends on the provider and plan. GoQR.me has no published limit. QuickChart offers 1,000 per month on the free tier. ShortPen allows 60 requests per minute per API token. Uniqode supports 10 to 100 requests per second, depending on plan tier, with monthly caps between 250,000 and 2 million. For bulk generation (product labels, ticketing), check rate limits before committing.

What format should I use for printed QR codes?

Use SVG or PDF. Both are vector formats that scale to any size without losing quality, whether your code appears on a business card or a billboard. PNG is fine for digital and on-screen use. Avoid JPEG for QR codes because compression artifacts can reduce the contrast between modules and hurt scannability.

Conclusion: Choosing the right QR code API

The right pick depends on what you're building.

If you need static codes with zero setup, GoQR.me or QuickChart will get you running in minutes. If you need dynamic codes with tracking, evaluate providers on pricing transparency, rate limits, and what happens to your codes if you cancel.

If you want QR generation, link management, and conversion tracking in one system without stitching together multiple tools, ShortPen's API covers all three.

Start with the free plan and see if it fits your workflow.

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.