DEVELOPER DOCUMENTATION

Connect in a few lines.

Look up a product by its barcode and get a clean JSON response. You need an active plan and an API key.

1. Get your API key

Create an account, choose a plan and submit the M-Pesa transaction code. After the payment is verified, open My account and create an API key. Copy the full key when it appears; it is only displayed once.

2. Make a request

GET/api/v1/barcode/{barcode}

Pass the key in the X-API-Key request header. A Bearer token in the Authorization header is also accepted.

Python
import requests

barcode = "ENTER_BARCODE"
api_key = "YOUR_API_KEY"

response = requests.get(
    f"https://YOUR-DOMAIN/api/v1/barcode/{barcode}",
    headers={"X-API-Key": api_key},
    timeout=10,
)
print(response.status_code)
print(response.json())
JavaScript
const barcode = "ENTER_BARCODE";
const response = await fetch(
  `https://YOUR-DOMAIN/api/v1/barcode/${barcode}`,
  { headers: { "X-API-Key": "YOUR_API_KEY" } }
);
const product = await response.json();
console.log(product);

Replace YOUR-DOMAIN with your deployed Render URL or custom domain.

3. Response format

JSON example
{
  "barcode": "your-product-barcode",
  "name": "Product name",
  "brand": "Brand name",
  "pack_size": "500 ml",
  "category": "Dairy",
  "price_kes": null,
  "verified": false,
  "source": "",
  "updated_at": "timestamp",
  "usage": { "limit": 1000, "used": 1, "remaining": 999 }
}

The values above are illustrative. Actual fields and values come from the current catalogue; price may be empty where no reliable price is available.

4. Common errors

401API key required or invalidCheck the key header. A revoked key cannot be used.
402Subscription requiredActivate a plan or renew expired access.
404Product not foundNo catalogue record matched that barcode.
429Plan limit reachedUpgrade or wait until the next paid period.

5. Usage and data quality

Lookup limits are tied to your approved plan. The API does not invent missing data, and a syntactically valid barcode is not proof that a product is genuine. Treat the verified field and source information accordingly.

View plans