A QR code API for codes you can change and track
Create a QR code with one request, fetch it as a PNG or an SVG, and change where it goes after it’s printed. Every scan is recorded, and on Premium each one is sent to your own software as it happens.
- API access on the Free plan
- PNG and SVG images
- An OpenAPI description
curl https://pikaqr.com/api/v1/qr \
-H "Authorization: Bearer $PIKAQR_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Spring flyer",
"destination_url": "https://example.com/spring",
"tags": ["flyers"],
"metadata": { "campaign": "spring-2027" }
}'What the API does
It’s a REST API that speaks JSON. The base address is https://pikaqr.com/api/v1.
Create codes
Website, menu, text, phone, SMS, email, contact card, Wi-Fi and event codes. Each one gets a short link, and that link is what the printed code holds.
Get images
Fetch any code as a PNG or an SVG, from 64 to 2048 pixels wide, ready to print or put on a page.
Change destinations
Send a new address and every printed copy follows. The old one stays in the code’s history.
Route with rules
Send scans to different places by time, date, device, country, language, a query parameter or an A/B split. Premium.
Read scans
List each scan, or get totals by day, device, country, language, rule and table.
Hear about every scan
Signed webhooks with your own metadata attached, retried when your server is down. Premium.
How it works
Sign up, open the Developers page in your dashboard and create a key. It starts with pk_ and is shown once.
Create a code with POST /qr. The reply has an id and a short_url such as https://pikaqr.com/r/q7Xk2LmP.
Fetch the image from GET /qr/:id/image and print it, or show it on screen.
When someone scans it, PikaQR records the scan and sends them to the current destination.
Read what happened with GET /qr/:id/scans and GET /qr/:id/analytics, or receive each scan as a webhook.
Change where it goes at any time with PATCH /qr/:id. Nothing needs reprinting.
Get a code as an image
The image always holds the code’s own short link, so it keeps working when you change the destination.
Ask for format=png or format=svg, and a size in pixels from 64 to 2048. Without them you get a 512 pixel PNG. Codes you’ve styled in the design studio come back in their colors.
For print, an SVG stays sharp at any size. For a web page or an email, a PNG is the simpler choice.
curl "https://pikaqr.com/api/v1/qr/$CODE_ID/image?format=svg&size=1024" \ -H "Authorization: Bearer $PIKAQR_KEY" \ -o spring-flyer.svg
Authentication
Send your key in every request as Authorization: Bearer followed by the key. Keys are made on the Developers page in your dashboard, and you can have up to 20 at once. PikaQR stores only a hash of each key, so copy it when it’s shown.
A key can read and write, or only read. Give a read-only key to anything that just needs to look, such as a reporting job. A missing or wrong key gets a 401, and a read-only key that tries to make a change gets a 403 with the code read_only_key.
Limits on each plan
Requests are counted per account, per hour. Every reply tells you where you stand.
- Free: 25 codes, with each table on a menu counting as one, and 1,000 requests an hour. Scans and analytics cover the last 7 days.
- Premium, $5 a month: unlimited codes and 10,000 requests an hour. Scans cover the whole history, and analytics cover up to 365 days per request. Rules and webhooks are included.
- Every reply carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Past the limit you get a 429 with a Retry-After header in seconds.
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1794024000
Retry-After: 1260
{
"error": "Rate limit of 1000 requests per hour reached",
"code": "rate_limited"
}Webhooks for every scan
Premium can send each scan to your server as a signed POST, within moments of it happening.
Add an https endpoint with POST /webhooks, for every code or for one. Each event carries the code’s tags and metadata, the device, country and language, the destination, the rule that matched and the table, if there was one. IP addresses are left out.
Every request is signed with HMAC-SHA256 in the PikaQR-Signature header. Answer with a 2xx within 10 seconds. Failed deliveries are tried again after 30 seconds, 2 minutes, 10 minutes, 1 hour and 6 hours.
{
"id": "evt_6f1c2e",
"type": "scan.created",
"created_at": "2026-11-07T19:42:10.000Z",
"data": {
"code": {
"id": "b3a1…",
"short_code": "abc123",
"title": "Dinner menu",
"type": "menu",
"tags": ["dining-room"],
"metadata": { "site": "main" }
},
"scan": {
"device": "mobile",
"os": "iOS",
"language": "es",
"country": "ES",
"table": { "id": "7d2e…", "name": "Table 12" },
"destination": "https://example.com/menu",
"rule": { "type": "time", "label": "Dinner" },
"unique": true
}
}
}Errors you can match on
Every error has the same shape: an error sentence for people and a code for programs. The code won’t change, so it’s safe to branch on.
- unauthorized: the key is missing or wrong (401)
- read_only_key: a read-only key tried to make a change (403)
- plan_limit: the plan has no room for another code or table (403)
- premium_required: rules and webhooks need Premium (403)
- not_found: no code with that id on your account (404)
- invalid_destination: the address or content isn’t valid (400)
- rate_limited: wait for the number of seconds in Retry-After (429)
An OpenAPI description
The whole API is described in OpenAPI 3.1 at https://pikaqr.com/api/v1/openapi.json. Use it to generate a client in your language, load it into your API tool, or check a request before you send it. The API reference is built from the same file, so the two always agree.
Questions
Is there a free QR code API?
Yes. The Free plan includes API access with 25 codes and 1,000 requests an hour. You get images, destination changes and the last 7 days of scans. Premium adds unlimited codes, rules, webhooks and full scan history.
Can the API return a QR code image?
Yes. GET /qr/:id/image returns a PNG or an SVG from 64 to 2048 pixels wide. The image holds the code’s short link, so it’s for codes you’ve created. To draw a one-off static code for any text, use the free generator or a library such as qrcode.
How is this different from a QR code library?
A library draws a static code: the address is fixed in the pattern, and nobody can count scans. The API creates a dynamic code. It holds a short link, so you can change the destination later, add rules and see every scan.
How do I authenticate with the API?
Create a key on the Developers page in your dashboard and send it as Authorization: Bearer followed by the key. Keys can read and write, or only read.
What are the API rate limits?
1,000 requests an hour on Free and 10,000 on Premium, counted per account. Every reply has X-RateLimit headers, and a 429 tells you how many seconds to wait.
Can I change a QR code after it’s printed?
Yes. Send a new destination_url with PATCH /qr/:id. Every printed copy goes to the new address straight away, and the old one stays in the code’s history.