🚀 Experience the new and improved APIVoid! Check out what's new

QR Scan API: Decode QR Codes and Extract Text

A JSON API to quickly extract text from QR code images. Submit a base64-encoded QR code image and the API will return its text content along with IoCs such as phone numbers, URLs and emails. Ideal for analyzing QR codes found in emails or suspicious attachments.

Consumes 2 credits per API call

# Example Curl request from the command line:
                          
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..."}'

# Example JSON output for a 200 HTTP status code:

{
    "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
}
Code analysis

Key Features

Inspect images for QR code and analyze its text content

Businesses and startups use this QR Scan API to easily decode QR code images and extract their content for further analysis. It integrates seamlessly into any workflow automation and is very fast.

Support PNG, SVG, JPG

The API supports common QR code images formats such as PNG (the most popular one), SVG and JPG images.

Max 2.5 MB Image Size

Only images that are less than 2.5 MB file size are supported. QR code images should as smaller as possible.

Indicators of Compromise

Extract valuable IoCs in the QR code text like URLs, email addresses, phone numbers and crypto addresses.

Fast Scanning

The API is optimized for speed and typically processes small image files in under 500 ms to 1 second.

Common Use Cases

Take a look at some real-world use cases of this API service

Our API can be used in many ways, from cybersecurity tasks to workflow automations. Here we showcase the most popular use cases according to our customers usage:

Analyze Image Attachments

Scan email image attachments, identify those with QR codes, and display the extracted content.

Extract Useful IoCs

Analyze the decoded QR code text and extract URLs, phone numbers, emails and bitcoin addresses.

Data Enrichment

Use the decoded QR code data to enrich your threat intelligence platform with extracted IoCs.

Workflow Automation

Easily integrate this API in your cybsersecurity workflow to effectively check for and decode QR codes.

Use cases

USAGE EXAMPLE

Learn how seamless it is to add and use QR Scan API anywhere you want

All it takes is a HTTPS POST request with JSON payload to our endpoint, and you’ll receive the response within seconds, usually within 1-3 seconds. Here are a few code examples to use the API:

$image_base64 = 'RW5jb2RlIGFuZCBkZWNv...';

$apiUrl = 'https://api.apivoid.com/v2/qr-scan';
$apiKey = 'your_api_key_here';

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'X-API-Key: ' . $apiKey]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['image_base64' => $image_base64]));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    $responseData = json_decode($response, true);

    print_r($responseData);
} else {
    print_r('An error occurred: '.$response);
}

Start using our API services, it takes just a few minutes

Create your account, pick a subscription plan, and make your first API call instantly with your API key—simple as that!

Get started now