GET /v0/qr
Validates and parses the content typically encoded in QR codes and Data Matrix barcodes. Automatically detects the format based on well-known prefixes (URL, vCard, WiFi, etc.) and validates the structure. Returns the detected format along with parsed fields. If no known format is detected, falls back to plain text.
Query Parameters Parameter Type Required Description value string Yes The QR / Data Matrix content to validate and parse
Supported Formats Format Prefix / Pattern Returned format URL http:// or https:// url vCard BEGIN:VCARD vcard WiFi Network WIFI: wifi Email (MATMSG) MATMSG: or mailto: email SMS smsto: or sms: sms Phone tel: tel Geo Location geo: geo MeCard MECARD: mecard Calendar Event BEGIN:VEVENT vevent Plain Text (fallback) text
Example Request Bash Node.js Python
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.isvalid.dev/v0/qr?value=WIFI%3AT%3AWPA%3BS%3AMyNetwork%3BP%3Asecret123%3B%3B" Response Fields Field Type Description valid boolean Whether the content is valid for the detected format format string Detected format: url, vcard, wifi, email, sms, tel, geo, mecard, vevent, or text data object Parsed fields (varies by format). Present when valid is true error string Error message when valid is false
Example Response — WiFi {
"valid": true,
"format": "wifi",
"data": {
"encryption": "WPA",
"ssid": "MyNetwork",
"password": "secret123",
"hidden": false
}
}Example Response — URL {
"valid": true,
"format": "url",
"data": {
"protocol": "https",
"host": "example.com",
"path": "/page",
"query": "id=42",
"fragment": ""
}
}Example Response — vCard {
"valid": true,
"format": "vcard",
"data": {
"version": "3.0",
"name": "Jan Kowalski",
"phones": ["+48123456789"],
"emails": ["jan@example.com"],
"org": "Firma Sp. z o.o."
}
}Example Response — Geo {
"valid": true,
"format": "geo",
"data": {
"lat": 52.2297,
"lon": 21.0122
}
}Example Response — plain text (fallback) {
"valid": true,
"format": "text",
"data": {
"content": "Hello world",
"length": 11
}
}Example Response — invalid WiFi {
"valid": false,
"format": "wifi",
"error": "Missing required field: ssid"
}