Quickstart
Quickstart
Create your first QR code in less than 5 minutes.
Prerequisites
- A qr3.app account (sign up for free)
- An API key (→ Authentication)
1. Create your first QR code
npm install @qr3/sdkimport { QR3 } from "@qr3/sdk";
const client = new QR3({ apiKey: "qr3_sk_your_key" });
const code = await client.codes.create({ type: "url", url: "https://example.com", title: "My first QR code", is_dynamic: true,});
console.log(code.data.short_code); // "r7f3Kx"console.log(code.data.image_svg_url); // SVG URLpip install qr3appfrom qr3app import QR3
client = QR3(api_key="qr3_sk_your_key")
code = client.codes.create( type="url", url="https://example.com", title="My first QR code", is_dynamic=True,)
print(code["data"]["short_code"]) # "r7f3Kx"go get github.com/ostheimer/qr3-gopackage main
import ( "context" "fmt" qr3 "github.com/ostheimer/qr3-go/qr3")
func main() { client := qr3.New("qr3_sk_your_key")
code, _ := client.Codes.Create(context.Background(), qr3.CreateCodeParams{ Type: "url", URL: "https://example.com", })
fmt.Println(code.Data.ShortCode) // "r7f3Kx"}curl -X POST https://qr3.app/v1/codes \ -H "Authorization: Bearer qr3_sk_your_key" \ -H "Content-Type: application/json" \ -d '{ "type": "url", "url": "https://example.com", "title": "My first QR code", "is_dynamic": true }'2. Download the QR code image
// SVG (vector, ideal for print)const svg = await fetch(code.data.image_svg_url).then(r => r.text());
// PNG (raster, 512×512px by default)const pngBuffer = await fetch(code.data.image_png_url).then(r => r.arrayBuffer());
// PDF (vector PDF for print: black modules by default; with ?fg=/?bg= the// colors are written as grayscale or CMYK, no ICC profile, not PDF/X)const pdf = await fetch( `https://qr3.app/v1/codes/${code.data.short_code}/qr.pdf`).then(r => r.arrayBuffer());3. Scan analytics
const scans = await client.scans.list(code.data.id, { days: 30 });
console.log(scans.data.total_scans); // 142console.log(scans.data.unique_visitors); // 118console.log(scans.data.top_countries[0]); // { value: "AT", count: 45 }Next steps
- Authentication — API key types and scopes
- SDKs — TypeScript SDK & CLI (Python, Go, PHP coming soon)
- API Reference — Full interactive API documentation
- MCP Server — AI agent integration