Barcode / QR decode · Barcode Decode
$0.003
per call · USD Coin on Base
Decode a barcode or QR code from an image. Send a base64 PNG or JPEG (or a data: URL); returns the decoded text and the symbology. Reads QR, DataMatrix, and 1D barcodes (EAN/UPC/Code39/Code128/ITF/Codabar). Deterministic, no network, no model.
Endpoint
POST https://agent402.tools/api/barcode-decode4
Calls / 30d
1
Unique payers / 30d
Aug 31
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://agent402.tools/api/barcode-decode", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"image": "iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAAAAklEQVR4AewaftIAAALNSURBVO3BW2rgUAwFwT7C+99yTz4vImDjvNCgqviBNUaxRinWKMUapVijXHwiCX9N5bskoVO5k4S/pnIq1ijFGqVYoxRrlIuHVH5KEp5IwknlrSScVJ5Q+SlJuFOsUYo1SrFGKdYoF1+QhDdU3lC5k4TflIQ3VN4o1ijFGqVYo1wMloRO5YkkTFSsUYo1SrFGKdYoF4Mk4aTyRBL+F8UapVijFGuUYo1y8QUqv0nlThKeUPkOKr+pWKMUa5RijXLxUBL+WhJOKk+odEk4qTyRhL9UrFGKNUqxRinWKPED/5EkdCr/i2KNUqxRijVKsUa5+EQSOpUuCSeVLgmdyikJncqdJLyVhJPKG0noVO4koVO5U6xRijVKsUaJH3gpCXdU/loSOpVTEjqVLgknlTeS8ITKqVijFGuUYo1SrFEuPpGEJ1S+QxI6lS4JJ5UuCd8lCW8k4Y5Kl4Q7xRqlWKMUa5RijRI/0CThCZVTEjqVLgknlTeS8JNUuiS8ofIdijVKsUYp1ijFGiV+oElCp9Il4aTSJeENlS4JJ5UnktCpnJLwhkqXhDdU7hRrlGKNUqxR4geGSMIbKm8k4Y5Kl4Q7Km8Ua5RijVKsUYo1ysUnkvDXVDqVUxLeSsJJpVO5k4QnVO4koVM5FWuUYo1SrFGKNcrFQyo/JQlvqHRJeELlThLuqLyRhE7lTrFGKdYoxRrl4guS8IbKG0k4qXQqTyThpPKEyikJnUqXhDtJ6FROxRqlWKMUa5RijXIxiMopCZ1Kl4RO5ZSETuWOyhMqpyR0KneKNUqxRinWKMUa5WKQJJxUflISOpVTEp5QOal0SehUTsUapVijFGuUiy9Q+U0qpyR0Kk8k4Y5Kl4STyhtJeKNYoxRrlGKNUqxRLh5Kwl9LwndROSWhS0KnckpCp9Il4aTSJeFOsUYp1ijFGqVYo8QPrDGKNUqxRinWKP8AIFwq4iXMWtcAAAAASUVORK5CYII="
}),
});
const data = await res.json();curl -X POST \
"https://agent402.tools/api/barcode-decode" \
-H "Content-Type: application/json" \
-d '{"image":"iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAAAAklEQVR4AewaftIAAALNSURBVO3BW2rgUAwFwT7C+99yTz4vImDjvNCgqviBNUaxRinWKMUapVijXHwiCX9N5bskoVO5k4S/pnIq1ijFGqVYoxRrlIuHVH5KEp5IwknlrSScVJ5Q+SlJuFOsUYo1SrFGKdYoF1+QhDdU3lC5k4TflIQ3VN4o1ijFGqVYo1wMloRO5YkkTFSsUYo1SrFGKdYoF4Mk4aTyRBL+F8UapVijFGuUYo1y8QUqv0nlThKeUPkOKr+pWKMUa5RijXLxUBL+WhJOKk+odEk4qTyRhL9UrFGKNUqxRinWKPED/5EkdCr/i2KNUqxRijVKsUa5+EQSOpUuCSeVLgmdyikJncqdJLyVhJPKG0noVO4koVO5U6xRijVKsUaJH3gpCXdU/loSOpVTEjqVLgknlTeS8ITKqVijFGuUYo1SrFEuPpGEJ1S+QxI6lS4JJ5UuCd8lCW8k4Y5Kl4Q7xRqlWKMUa5RijRI/0CThCZVTEjqVLgknlTeS8JNUuiS8ofIdijVKsUYp1ijFGiV+oElCp9Il4aTSJeENlS4JJ5UnktCpnJLwhkqXhDdU7hRrlGKNUqxR4geGSMIbKm8k4Y5Kl4Q7Km8Ua5RijVKsUYo1ysUnkvDXVDqVUxLeSsJJpVO5k4QnVO4koVM5FWuUYo1SrFGKNcrFQyo/JQlvqHRJeELlThLuqLyRhE7lTrFGKdYoxRrl4guS8IbKG0k4qXQqTyThpPKEyikJnUqXhDtJ6FROxRqlWKMUa5RijXIxiMopCZ1Kl4RO5ZSETuWOyhMqpyR0KneKNUqxRinWKMUa5WKQJJxUflISOpVTEp5QOal0SehUTsUapVijFGuUiy9Q+U0qpyR0Kk8k4Y5Kl4STyhtJeKNYoxRrlGKNUqxRLh5Kwl9LwndROSWhS0KnckpCp9Il4aTSJeFOsUYp1ijFGqVYo8QPrDGKNUqxRinWKP8AIFwq4iXMWtcAAAAASUVORK5CYII="}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"decoder": "zxing",
"format": "QR_CODE",
"found": true,
"text": "AGENT402"
}Payment details
0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0USD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Data & Enrichment and the homepage with a featured placement.
More from Barcode / QR decode & similar services
Oneshotagent · Verify Email
win.oneshotagent.com
Email deliverability verification
Oneshotagent · Enrich Email
win.oneshotagent.com
Email enrichment and validation
Strale · Email Validate
api.strale.io
Validate an email address: RFC 5322 syntax, MX records, 5,361 disposable domain detection, role-based address detection (35 patterns), free provider detection, and typo suggestion for common providers (gmial.com ? gmail.com). Returns deliverability assess…