This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Universal Barcode Lookup on Selection

Utilities · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryUtilities
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Universal Barcode Lookup on Selection allows you to select any barcode number (UPC, EAN, ISBN, etc.) on a webpage and instantly look up product information from a public barcode API. When you select text that matches a barcode pattern (typically 12-13 digits), a floating button appears near the selection. Clicking the button opens a popup showing the product name, brand, category, and image, along with action buttons to copy the product info to your clipboard or open a search for the product. The script caches results locally to minimize API calls and supports multiple barcode APIs including UPCitemDB, BarcodeLookup, and Open Food Facts.

WHERE IT RUNS

This script operates as a userscript within the BotGentz extension on any webpage that contains barcode numbers, including e-commerce sites, inventory systems, receipts, product listings, and documentation pages. It functions on any modern browser that supports the BotGentz extension, including Chrome, Firefox, Edge, Safari, and Opera. The script runs entirely client-side, fetching product data from public APIs without sending any user data to external servers.

HOW TO USE

After installation, simply select any barcode number on a webpage by dragging your mouse over it. A small floating button with a camera icon appears near the selection. Click the button to look up the product information. A popup appears showing the product details, including name, brand, category, and image if available. Use the "Copy" button to copy the product information to your clipboard, or the "Search" button to open a Google search for the product. The popup can be closed by clicking the ✕ button or pressing Escape on your keyboard. The script automatically detects barcode patterns without requiring any manual activation.

THE MECHANISM THAT MAKES IT WORK

The script uses a selection event listener to detect when text is selected on the page. The selected text is cleaned by removing non-digit characters and validated against barcode patterns using a regular expression that matches sequences of 8 to 14 digits, covering UPC (12 digits), EAN (13 digits), and ISBN (10 or 13 digits) formats. When a valid barcode is detected, a floating button is positioned near the selection using the selection's bounding rectangle. Clicking the button triggers a GET request to the configured barcode API endpoint, with the barcode passed as a query parameter. The response is parsed to extract product information, which is then displayed in a floating popup. Results are cached using GM_setValue with a configurable expiration duration to reduce API usage and improve speed. The popup includes action buttons that use GM_setClipboard and GM_openInTab for copy and search functionality.

THE PANEL

The script panel is built using BotGentz's BGPanel framework and provides comprehensive control over the barcode lookup's behavior. The panel opens as a floating overlay that can be dragged anywhere on your screen, with a clean dark theme matching the tool's aesthetic. It includes dropdown menus for preferred API selection (UPCitemDB, BarcodeLookup, Open Food Facts) and popup position (above, below, left, right of selection). A text input allows you to specify a custom API endpoint. Toggle switches enable or disable the lookup, auto-show on selection, product images, and caching. Action buttons allow you to save settings, clear the cache, or reset all settings to defaults. The panel collapses to a small icon when not in use and expands when clicked, remaining accessible but unobtrusive. Press the Escape key at any time to close the panel.

PLEASE NOTE

This script requires the free BotGentz extension to be installed and activated in your browser. The extension is available from the official BotGentz website. The script relies on public barcode APIs that may have usage limits or require API keys. The UPCitemDB free trial allows limited requests; consider upgrading or using alternative APIs for heavy usage. The script does not collect or transmit any user data—all barcode lookups are performed via direct API requests from your browser. Cached results are stored locally using GM_setValue and can be cleared at any time. The script is designed for convenience and may not have product information for all barcodes. Not all barcode numbers shown on webpages are actual product identifiers—the script filters for valid patterns but may occasionally show the floating button on non-product numbers.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.