expiry-barcode-lookup
/api/v1/expiry-barcode-lookup
0 credits/call
expiry
Look up a product name by barcode: our own cache first, then Open Food Facts. Returns found=false if neither has it — caller falls back to manual name entry. Public (no auth required), same as the future standalone 'BiH Barcode Lookup' MCP server (PLAN.md).
Sign in + create an API key on the keys page to authenticate calls.
curl -X POST https://www.rokom.ba/api/v1/expiry-barcode-lookup \
-H "Authorization: Bearer mcpsk_<your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"barcode": ""
}'
Add this server to Claude Desktop's claude_desktop_config.json. The endpoint becomes a callable tool inside Claude. See the MCP setup guide for the full walk-through.
{
"mcpServers": {
"this-api": {
"url": "https://www.rokom.ba/mcp",
"transport": "http",
"auth": {
"type": "bearer",
"token": "mcpsk_<your_api_key>"
}
}
}
}
Inside Claude this endpoint surfaces as the tool expiry-barcode-lookup.
Standard requests — no custom SDK needed. pip install requests first.
import requests
r = requests.post(
"https://www.rokom.ba/api/v1/expiry-barcode-lookup",
headers={"Authorization": "Bearer mcpsk_<your_api_key>"},
json={
"barcode": ""
},
)
r.raise_for_status()
print(r.json())
Plain fetch. Works in Node 18+, Deno, Bun, and any modern browser.
const r = await fetch("https://www.rokom.ba/api/v1/expiry-barcode-lookup", {
method: "POST",
headers: {
"Authorization": "Bearer mcpsk_<your_api_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"barcode": ""
}),
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
console.log(await r.json());
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| barcode | string | required | — |
maxLength=14
minLength=6
pattern=^\d{6,14}$
|
Output
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| found | boolean | required | — | |
| name | string | optional | ||
| brand | string | optional | ||
| image_url | string | optional | ||
| source | string | optional | none |
Try it
Fires a real POST /api/v1/expiry-barcode-lookup from your browser. Charges 0 credits per call against your account.