Top Performing QR Codes
curl --request GET \
--url https://jmpy.me/api/v1/qranalytics/top-qr-codes \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"name": "<string>",
"contentType": "<string>",
"totalScans": 123,
"recentScans": 123,
"uniqueScanners": 123,
"lastScannedAt": "<string>",
"createdAt": "<string>"
}
]
}QR Code Analytics
Top Performing QR Codes
Get your best performing QR codes ranked by scan count
GET
/
qranalytics
/
top-qr-codes
Top Performing QR Codes
curl --request GET \
--url https://jmpy.me/api/v1/qranalytics/top-qr-codes \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"name": "<string>",
"contentType": "<string>",
"totalScans": 123,
"recentScans": 123,
"uniqueScanners": 123,
"lastScannedAt": "<string>",
"createdAt": "<string>"
}
]
}Get a list of your top performing QR codes ranked by scan count. This endpoint helps identify which QR codes drive the most engagement.
Query Parameters
Number of QR codes to return (max 100).
Number of days to include in recent scan calculations (1-365).
Response
Array of top performing QR codes.
Show QR Code Object
Show QR Code Object
QR code UUID.
QR code name (or “Unnamed QR Code” if not set).
Type of content:
url, text, vcard, wifi, email, sms, phone.Total all-time scans for this QR code.
Scans within the specified days period.
Unique visitors within the specified days period.
ISO 8601 timestamp of the most recent scan.
ISO 8601 timestamp when the QR code was created.
Request Examples
- cURL
- Node.js
- TypeScript
- Python
- PHP
- Go
- Java
# Get top 10 QR codes by scans
curl -X GET "https://jmpy.me/api/v1/qranalytics/top-qr-codes?limit=10&days=30" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get top 25 QR codes for last 90 days
curl -X GET "https://jmpy.me/api/v1/qranalytics/top-qr-codes?limit=25&days=90" \
-H "Authorization: Bearer YOUR_API_KEY"
const fetch = require('node-fetch');
const response = await fetch(
'https://jmpy.me/api/v1/qranalytics/top-qr-codes?limit=10&days=30',
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}
);
const data = await response.json();
console.log('Top Performing QR Codes:');
data.data.forEach((qr, index) => {
console.log(`${index + 1}. ${qr.name}`);
console.log(` Total: ${qr.totalScans} | Recent: ${qr.recentScans} | Unique: ${qr.uniqueScanners}`);
});
import axios from 'axios';
interface TopQRCode {
id: string;
name: string;
contentType: string;
totalScans: number;
recentScans: number;
uniqueScanners: number;
lastScannedAt: string | null;
createdAt: string;
}
const response = await axios.get<{ success: boolean; data: TopQRCode[] }>(
'https://jmpy.me/api/v1/qranalytics/top-qr-codes',
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
params: { limit: 10, days: 30 }
}
);
const topQRCodes = response.data.data;
console.log(`Top ${topQRCodes.length} QR codes:`);
topQRCodes.forEach(qr => {
console.log(` ${qr.name}: ${qr.totalScans} total scans`);
});
import requests
response = requests.get(
'https://jmpy.me/api/v1/qranalytics/top-qr-codes',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'limit': 10, 'days': 30}
)
top_qr_codes = response.json()['data']
print("Top Performing QR Codes:")
for i, qr in enumerate(top_qr_codes, 1):
print(f"{i}. {qr['name']}")
print(f" Total: {qr['totalScans']} | Recent: {qr['recentScans']} | Unique: {qr['uniqueScanners']}")
<?php
$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://jmpy.me/api/v1/qranalytics/top-qr-codes', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY'
],
'query' => [
'limit' => 10,
'days' => 30
]
]);
$topQRCodes = json_decode($response->getBody(), true)['data'];
echo "Top Performing QR Codes:\n";
foreach ($topQRCodes as $i => $qr) {
$rank = $i + 1;
echo "{$rank}. {$qr['name']}: {$qr['totalScans']} scans\n";
}
?>
package main
import (
"fmt"
"net/http"
"net/url"
"io"
)
func main() {
baseURL := "https://jmpy.me/api/v1/qranalytics/top-qr-codes"
params := url.Values{}
params.Add("limit", "10")
params.Add("days", "30")
req, _ := http.NewRequest("GET", baseURL+"?"+params.Encode(), nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.URI;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
String url = "https://jmpy.me/api/v1/qranalytics/top-qr-codes?limit=10&days=30";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response Examples
- 200 OK
- 401 Unauthorized
{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Product Launch Campaign",
"contentType": "url",
"totalScans": 4523,
"recentScans": 1234,
"uniqueScanners": 980,
"lastScannedAt": "2025-01-07T15:30:00Z",
"createdAt": "2024-06-15T10:00:00Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Store Front Display",
"contentType": "url",
"totalScans": 3256,
"recentScans": 987,
"uniqueScanners": 756,
"lastScannedAt": "2025-01-07T14:22:00Z",
"createdAt": "2024-08-20T09:30:00Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "Business Card",
"contentType": "vcard",
"totalScans": 2145,
"recentScans": 456,
"uniqueScanners": 389,
"lastScannedAt": "2025-01-07T12:15:00Z",
"createdAt": "2024-03-10T14:45:00Z"
}
]
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "User authentication required"
}
}
Use Cases
Build a leaderboard widget
Build a leaderboard widget
Display top performing QR codes in a dashboard leaderboard.
async function getLeaderboard() {
const response = await fetch(
'https://jmpy.me/api/v1/qranalytics/top-qr-codes?limit=5&days=30',
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const { data } = await response.json();
// Format for leaderboard display
return data.map((qr, index) => ({
rank: index + 1,
name: qr.name,
scans: qr.recentScans,
trend: qr.recentScans > (qr.totalScans * 0.3) ? 'hot' : 'normal',
lastActive: new Date(qr.lastScannedAt).toLocaleDateString()
}));
}
Identify underperforming QR codes
Identify underperforming QR codes
Find QR codes that were once popular but have declined in engagement.
import requests
from datetime import datetime
def find_declining_qr_codes():
response = requests.get(
'https://jmpy.me/api/v1/qranalytics/top-qr-codes?limit=50&days=30',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
qr_codes = response.json()['data']
declining = []
for qr in qr_codes:
# If recent activity is less than 10% of total, it's declining
if qr['totalScans'] > 100:
activity_ratio = qr['recentScans'] / qr['totalScans']
if activity_ratio < 0.1:
declining.append({
'name': qr['name'],
'total': qr['totalScans'],
'recent': qr['recentScans'],
'ratio': f"{activity_ratio*100:.1f}%"
})
print("Declining QR Codes (need refreshing):")
for qr in declining:
print(f" {qr['name']}: {qr['recent']}/{qr['total']} ({qr['ratio']} recent)")
return declining
Content type performance analysis
Content type performance analysis
Analyze which types of QR codes perform best.
interface ContentTypeStats {
type: string;
count: number;
totalScans: number;
avgScans: number;
}
async function analyzeContentTypes(): Promise<ContentTypeStats[]> {
const response = await fetch(
'https://jmpy.me/api/v1/qranalytics/top-qr-codes?limit=100&days=30',
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const { data } = await response.json();
// Group by content type
const byType: Record<string, { scans: number; count: number }> = {};
data.forEach(qr => {
if (!byType[qr.contentType]) {
byType[qr.contentType] = { scans: 0, count: 0 };
}
byType[qr.contentType].scans += qr.recentScans;
byType[qr.contentType].count++;
});
// Calculate averages and format
return Object.entries(byType).map(([type, stats]) => ({
type,
count: stats.count,
totalScans: stats.scans,
avgScans: Math.round(stats.scans / stats.count)
})).sort((a, b) => b.avgScans - a.avgScans);
}
Related Endpoints
Analytics Overview
Get aggregated summary statistics
Complete Analytics
Get detailed analytics for a specific QR code
Recent Activity
See the latest scan events
List QR Codes
Get a list of all your QR codes
⌘I