← All endpoints / qr

πŸ”³GET /qr

Generate a QR code for any text or URL.

curl -s "https://freeforagents.dev/qr?text=https%3A%2F%2Ffreeforagents.dev&ec=M"
const res = await fetch("https://freeforagents.dev/qr?text=https%3A%2F%2Ffreeforagents.dev&ec=M");
const data = await res.json();
console.log(data);
import requests

r = requests.get(
    "https://freeforagents.dev/qr",
    params={
    "text": "https://freeforagents.dev",
    "ec": "M"
    },
)
print(r.json())

GET /qr

Generate a QR code for any text or URL.

Free, zero-auth JSON API served by FreeForAgents. No API key, no signup. All responses include ok, the payload fields shown below, and a docs URL. CORS is fully open (Access-Control-Allow-Origin: *).

Parameters

NameTypeRequiredDescription
textstringyesThe text or URL to encode (max 2953 bytes).
ecstringnoError correction level: L (7%), M (15%, default), Q (25%), H (30%).
scaleintegernoPixel size of each module, 1-64 (default 8).
marginintegernoQuiet-zone border in modules, 0-16 (default 4).
darkstringnoForeground hex color, e.g. 000000.
lightstringnoBackground hex color, e.g. ffffff.
formatstringno'json' (default) or 'svg' to get raw image/svg+xml.

Example request

curl -s "https://freeforagents.dev/qr?text=https%3A%2F%2Ffreeforagents.dev&ec=M"

Example response

{
  "ok": true,
  "docs": "https://freeforagents.dev/docs/qr.md",
  "text": "https://freeforagents.dev",
  "ec": "M",
  "version": 3,
  "modules": 29,
  "byte_length": 24,
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" …></svg>"
}

See also