QR Scan API Reference
Scan a QR code image (submitted as base64) and extract its decoded content.
Service details and pricing: QR Scan API
POSThttps://api.apivoid.com/v2/qr-scan
AuthenticationSend your API key in the X-API-Key header to authenticate.Credits & quotaTrack credits usage via the X-Service-Quota response header.Errors & retriesError format, status codes and safe retry rules, with real examples.
Request example
Query the endpoint via an HTTPS POST request (replace YOUR_API_KEY_HERE with your API key):
curl
curl -X POST "https://api.apivoid.com/v2/qr-scan" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY_HERE" \
-d '{"image_base64": "RW5jb2RlIGFuZCBkZWNv..."}'The same request in PHP:
php
$imageBase64 = 'RW5jb2RlIGFuZCBkZWNv...';
$apiKey = 'YOUR_API_KEY_HERE';
$curl = curl_init('https://api.apivoid.com/v2/qr-scan');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'X-API-Key: ' . $apiKey]);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode(['image_base64' => $imageBase64]));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($httpCode === 200) {
$responseData = json_decode($response, true);
print_r($responseData);
} else {
print_r('An error occurred: '.$response);
}Request parameters
Required
image_base64stringRequired
Base64-encoded image file content (max 2.5 MB).
Response example
A successful request returns HTTP 200 with a JSON body:
json · 200
{
"qrcode_found": true,
"extracted_data": "https://www.possible-phishing-url.com/bank/login",
"action_type": "URL",
"ioc": {
"urls": [
"https://www.possible-phishing-url.com/bank/login"
],
"emails": [],
"phone_numbers": [],
"bitcoin_addresses": []
},
"elapsed_ms": 63
}Response fields
The fields returned in the JSON response:
qrcode_foundboolean
Returns true if a QR code was found in the image.
extracted_datastring
Data extracted from the QR code.
action_typestring
Type of action encoded in the QR code, e.g. URL, EMAIL, PHONE, TEXT.
ioc → urlsarray
URLs found in the QR code data.
ioc → emailsarray
Email addresses found in the QR code data.
ioc → phone_numbersarray
Phone numbers found in the QR code data.
ioc → bitcoin_addressesarray
Bitcoin addresses found in the QR code data.
elapsed_msinteger
Time taken to process the request, in milliseconds.