A QR code API without an API key

A program can make a code, set what it does and fetch its picture without an account or an API key. The calls take JSON and answer in JSON.

The calls

Claim a blank code (it works at once and does nothing yet):

curl -s https://blankqr.com/api/links -H 'Content-Type: application/json' -H 'Idempotency-Key: NEW_RANDOM_VALUE' -d '{"blank":true}'

Make a code that is set up at once:

curl -s https://blankqr.com/api/links -H 'Content-Type: application/json' -d '{"action":{"kind":"link","url":"https://example.com/menu"}}'

Set up or change a code with its key:

curl -s https://blankqr.com/api/links/CODE -H 'Content-Type: application/json' -d '{"token":"KEY","action":{"kind":"wifi","name":"Cafe Guest","password":"espresso-2026"}}'

The answer that makes a code holds its short address, its key and the addresses of its picture. The key is shown once.

The picture of a code is at https://blankqr.com/CODE.svg and https://blankqr.com/CODE.png. It holds the short address and nothing else, so it stays the same when the code is changed.

These calls need the paid plan, or Lifetime for the code, and the key from making the code.

A webhook. Each counted scan sends a POST with the code, the time and the scan count to your address:

curl -s https://blankqr.com/api/links/CODE -H 'Content-Type: application/json' \
  -d '{"token":"KEY","webhook":"https://example.com/hooks/scan"}'

Several destinations, one picked by chance at each scan:

curl -s https://blankqr.com/api/links/CODE -H 'Content-Type: application/json' \
  -d '{"token":"KEY","chances":[{"url":"https://example.com/prize","percent":10}]}'

A scan password:

curl -s https://blankqr.com/api/links/CODE -H 'Content-Type: application/json' \
  -d '{"token":"KEY","scan_password":"door 5151"}'

A camera check and a location check, each on its own:

curl -s https://blankqr.com/api/links/CODE -H 'Content-Type: application/json' \
  -d '{"token":"KEY","camera_check":true}'
curl -s https://blankqr.com/api/links/CODE -H 'Content-Type: application/json' \
  -d '{"token":"KEY","location_check":{"lat":40.6892,"lon":-74.0445}}'

Your own code. Send the files of a page, then set the code to it:

curl -s https://blankqr.com/api/links/CODE/files -H 'Content-Type: application/json' \
  -d '{"token":"KEY","files":[{"name":"index.html","text":"<h1>Hello</h1><script src=\"app.js\"></script>"},{"name":"app.js","text":"document.querySelector(\"h1\").textContent = \"Scanned\";"}]}'
curl -s https://blankqr.com/api/links/CODE -H 'Content-Type: application/json' \
  -d '{"token":"KEY","action":{"kind":"page"}}'

Your own code runs in the scanner's browser, in a sandbox. A code holds 1 MB of files and its page starts at index.html.

For assistants

Assistants that use the Model Context Protocol connect to https://blankqr.com/mcp, without a sign-in. The tools are these.

Limits and rules

Where a code may lead is on How it works.

Documents

We would like to count visits with Google Analytics. It sets cookies and sends this visit to Google.