# Barcode Lookup — EAN, UPC, GTIN & ISBN Product Data (`mechniverse/barcode-lookup`) Actor

Barcode lookup for EAN, UPC, GTIN and ISBN codes: get the product name, brand, category and image from six open databases. No API key needed. Pay only when a product is found. Bulk lookup of up to 10 barcodes per run.

- **URL**: https://apify.com/mechniverse/barcode-lookup.md
- **Developed by:** [Ganesh Chandak](https://apify.com/mechniverse) (community)
- **Categories:** E-commerce, Developer tools
- **Security:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 product lookups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Barcode Lookup — EAN, UPC, GTIN & ISBN Product Data

**Scan any barcode (food, books, beauty, household, pet) and get clean product data in one call.**

### What does Barcode Lookup do?

Enter a **barcode** (EAN-8, EAN-13, UPC-A, GTIN, ISBN-10 or ISBN-13) and get the product name, brand, category, image and product page link. The data is aggregated from six free public databases: Open Food Facts, Open Products Facts, Open Beauty Facts, Open Pet Food Facts, Open Library and Google Books. There are no API keys to set up, no subscriptions and no scraping on your side. **You pay only when a product is found.**

### Why use Barcode Lookup?

- **Six product databases in one lookup.** Food, books, cosmetics, pet food, household goods and general products.
- **Every barcode format.** EAN-8/13, UPC-A, ISBN-10 (converted to ISBN-13 automatically) and ISBN-13.
- **Clean, structured output.** Title, brand, category, image URL, data source and product page link, with the same fields on every row.
- **Category targeting.** Pick a category (food, books, beauty, pet, household) to search only its sources, at a lower price.
- **Bulk lookup.** Check up to 10 barcodes in one run, each priced and reported separately.
- **Safe failures.** A malformed code returns a clear `invalid_input` row; a valid code that nobody has is free and says which sources were checked.

### How to use Barcode Lookup

1. Open the Actor in **Apify Console** and click **Try for free** (or call it through the [API](https://docs.apify.com/api/v2)).
2. Enter one barcode in the **Barcode** field, for example `3017620422003`. Optionally pick a **Category** to search only that category's sources at the lower rate.
3. For several products, add up to 10 barcodes to the **Barcodes** list, one per line.
4. Click **Start**, then open the **Results** tab or download **JSON, CSV or Excel**. To automate it, use the API, [schedules](https://docs.apify.com/platform/schedules), webhooks, or Zapier, Make and n8n.

### Input

| Field | Type | Description |
|---|---|---|
| `barcode` | string | One barcode: EAN-8, UPC-A, EAN-13, ISBN-10 or ISBN-13. Spaces and dashes are fine. |
| `barcodes` | list of strings | Bulk lookup, one per line, maximum 10. Duplicates are removed. |
| `category` | `all`, `food`, `books`, `beauty`, `pet`, `household` | A valid category searches only its sources (cheaper). `all`, empty or unknown searches everything. |

Example input:

```json
{ "barcode": "3017620422003", "category": "food" }
```

### Output

Each barcode produces one dataset item.

| Field | Description |
|---|---|
| `barcode`, `normalized_barcode`, `format` | The code you sent, its canonical form (ISBN-10 becomes ISBN-13) and its detected format. |
| `txn_type` | `success`, `not_found`, `invalid_input` or `source_error`. |
| `title`, `brand`, `category_label`, `package` | The product details when found. |
| `image_url`, `product_url`, `source` | Product image, the page it came from, and which database answered. |
| `sources_checked`, `source_errors` | Which sources were queried and any that failed. |
| `charge_event`, `charged` | What was billed for this row, if anything. |

Example output:

```json
{
  "barcode": "3017620422003",
  "title": "Nutella",
  "brand": "Nutella, Ferrero, Yum yum",
  "category_label": "food",
  "image_url": "https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.879.400.jpg",
  "product_url": "https://world.openfoodfacts.org/product/3017620422003",
  "source": "openfoodfacts",
  "txn_type": "success",
  "charged": true
}
```

A book works the same way: `{"barcode": "9780306406157", "category": "books"}` returns the title, publisher, cover image and its Open Library page.

### Pricing

This Actor uses pay-per-event pricing, so you only pay for what you use.

| | |
|---|---|
| **Targeted lookup** (you pick food, books, beauty, pet or household) | **$0.003** per barcode |
| **All-sources lookup** (no category, `all`, or an unknown category) | **$0.005** per barcode |
| **1,000 targeted / all-sources lookups** | **$3 / $5** |

- **Pay only for results.** A valid barcode that is not found in any searched source is free.
- **Invalid input is cheaper.** A malformed barcode (wrong format or failed checksum) is charged a **$0.001** handling fee, never the full rate.
- **Bulk is priced per barcode.** Ten barcodes cost ten times the per-barcode rate, charged only for the ones that return data.
- **No subscription.** Pay as you go; Apify free-plan credit applies. Set a maximum cost per run to cap your spend.

### Integrations and API

Connect the Actor to Make, Zapier, n8n, Google Sheets, Slack or webhooks, or call it from code with the Apify API clients for JavaScript and Python.

```bash
curl -X POST https://api.apify.com/v2/acts/mechniverse~barcode-lookup/run-sync-get-dataset-items \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"barcode":"3017620422003","category":"food"}'
```

#### Use with AI agents and MCP

The Actor is available as a tool through [Apify's MCP server](https://docs.apify.com/integrations/mcp), so an AI agent or chatbot can answer "what is this product?" from a scanned code. Output is deterministic JSON, pricing is per event (it respects Apify's maximum-charge budget caps), and invalid formats return an error row, never a silent empty result.

### Who is it for?

- **E-commerce and inventory developers** who enrich catalogs from barcodes without maintaining scrapers or paying for commercial barcode APIs.
- **Grocery, nutrition and wellness apps** with barcode-scan features backed by Open Food Facts and Open Beauty Facts data.
- **Libraries, bookstores and reading apps** that resolve ISBNs to titles, covers and publisher data.
- **AI agents and chatbots** and **consumer researchers** who batch-lookup product origins, categories and brands.

### FAQ

**Which countries and databases does it cover?** Products are resolved through the open Open Food Facts, Open Beauty Facts, Open Pet Food Facts, Open Products Facts, Open Library and Google Books catalogs. These are global, community-maintained databases, so coverage is worldwide.

**Do I need an API key?** No. All sources are free public databases.

**Can I look up several barcodes at once?** Yes, up to 10 per run in the **Barcodes** list. Each is processed and priced independently.

**What happens if a barcode is not found?** If the barcode is valid but no source has it, you are not charged. The row says it was not found and which sources were checked.

**What about an ISBN versus a normal barcode?** Both work. ISBN-10 is converted to ISBN-13 and routed to the book catalogs only, so a book ISBN returns quickly. Pricing follows the category you choose.

**Can it read a barcode from a photo?** No. The Actor takes barcode numbers as text. Use any barcode scanner app to turn a photo into digits, then pass them in.

**Is it legal?** The Actor reads only publicly listed product information from open databases, with no private or personal data. Product data is provided by the source catalogs as-is.

Questions or feature requests? Open an issue on the **Issues** tab; we read every one.

Building an India shopping or price tool? Pair this with [Price Comparison India — Amazon & Flipkart](https://apify.com/mechniverse/india-price-comparison) to add live prices from both marketplaces.

# Actor input Schema

## `barcode` (type: `string`):

One barcode: EAN-8, UPC-A, EAN-13, ISBN-10 or ISBN-13 (spaces and dashes are fine). Example: 3017620422003. ISBN-10 is converted to ISBN-13 automatically.

## `barcodes` (type: `array`):

Look up several barcodes in ONE run — one per line, max 10. Each barcode is processed and priced separately. Leave empty for a single lookup.

## `category` (type: `string`):

Pick a category to search only its sources (targeted rate, cheaper). Omit it or choose 'all' to search everything at the higher all-sources rate. ISBN codes always route to book catalogs internally, but the price still follows this choice: a valid category = targeted rate, anything else = all-sources rate.

## Actor input object example

```json
{
  "barcode": "3017620422003",
  "category": "all"
}
```

# Actor output Schema

## `dataset` (type: `string`):

One record per input barcode: product data + transaction info (what was charged)

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "barcode": "3017620422003",
    "category": "all"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mechniverse/barcode-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "barcode": "3017620422003",
    "category": "all",
}

# Run the Actor and wait for it to finish
run = client.actor("mechniverse/barcode-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "barcode": "3017620422003",
  "category": "all"
}' |
apify call mechniverse/barcode-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mechniverse/barcode-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bsfjGy5Vo6tRs1yDt/builds/chYWaencM8fS9ylJ6/openapi.json
