Barcode lookup
Find the BestPrice.gr product behind an EAN, UPC or GTIN barcode.
Loading / 加载中…
BestPrice.gr API · E-commerce & marketplace data
The BestPrice.gr API offers four operations: a keyword search, a category grid, a barcode lookup and a product read with the offers of Greek shops. A `product_id` from a search, category or barcode row opens the product read, and a `category_id` from a row opens the category grid.
JSON in, a structured response out. Every public gateway endpoint uses POST.
Find the BestPrice.gr product behind an EAN, UPC or GTIN barcode.
List the products of one category by id, with an optional keyword to narrow them.
Read one product with its shop offers, price band, barcode and rating.
Search products by keyword in Greek or English and read each row's price and shop count.
bestprice-search takes a keyword in Greek or English as body.query and returns a grid of products in products.
A row is either a compared product or the listing of a single shop, and the row itself says which kind it is:
| Field | What it tells you |
|---|---|
listing_type | product for a compared product, shop_offer for the listing of one shop |
product_id | the id of a compared product |
offer_id and merchant_id | the identifiers of a single shop's listing |
price_eur and currency | the price shown for the row, which is the lowest across shops, and its currency |
shop_count | how many shops carry the product |
category_id | the category the row belongs to |
url, title and image | the page address, the name and the picture of the row |
The rows of bestprice-category have the same shape, and category_id in data shows which category they belong to.
BestPrice.gr answers some queries with a redirect to a category or brand page: a search for samsung is answered with the Samsung brand page, and the rows are the grid of that page.
When a redirect took place, redirected_to describes the target page:
type: category or brandid, title and url: the identifier, the name and the address of the target pageThe field is present only in that case, so read it first when the rows must match the query.
bestprice-barcode resolves an EAN-13, EAN-8, UPC-12 or GTIN-14 code, sent as body.barcode, to a BestPrice.gr product id, which makes it possible to match a catalogue on barcodes instead of names.
Every row carries a match_type. The value barcode_exact means BestPrice.gr declared an exact barcode match for the row, and text_match means the row came from a fuzzy name match, which is not a barcode match. body.strict decides which rows come back: it defaults to true and returns the exact rows only, and false adds the text_match rows.
A bestprice-barcode answer lists the matching products in products, and a row reads like this:
| Field | What it tells you |
|---|---|
product_id and url | the id and the page address of the product |
title, brand, model and variant | the name of the product with its brand, model and variant |
category_id and category_title | the category of the product and its name |
price_from_eur and currency | the starting price and its currency |
offer_count | how many offers the product has |
availability | the availability shown for the product |
rating and rating_count | the rating and the number of ratings |
image | the picture of the product |
match_confidence | how confident the match is |
Beside the rows, exact_match shows whether the lookup found an exact match, strict shows the mode the lookup ran in, and barcode and barcode_queried show the code that was looked up.
product in a bestprice-product answer combines the identity, the price band and the shop offers of one product.
| Field | What it tells you |
|---|---|
price_low_eur and price_high_eur | the lowest and the highest price across the market |
offer_count | how many offers the market has |
offers_listed | how many offers this answer carries |
gtin and gtin_type | the barcode of the product and the kind of key it came from |
mpn and sku | the manufacturer part number and the stock keeping unit |
category_path | the category path of the product |
rating and rating_count | the rating and the number of ratings it rests on |
Each element of offers describes the offer of one shop:
shop: the name of the shopprice_eur and currency: the price and its currencyurl: the address of the offeravailability and condition: the availability and the condition of the itemBestPrice.gr is a Greek price-comparison service run by The Best Company S.A. in Crete. It began in 2001 as Pathfinder Shopping and has carried the BestPrice.gr name since 2011.
Shoppers use it to compare prices from many Greek online stores, check the price history of a product and read store reviews. Product pages also carry specifications, reviews and a questions-and-answers section where shoppers and shops can answer questions.
BestPrice.gr does not sell products itself: a shopper picks a partner shop and completes the order on that shop's own site, which handles payment, shipping and customer service.
POST /api/v1/bestprice/<action> with x-api-key, Content-Type: application/json and a required Idempotency-Key.ok: true: data is the result of the operation, meta.requestId identifies the recorded request and meta.chargedCreditUnits is the amount charged. Otherwise ok is false and error.code names the reason; read ok and error.code rather than relying on the HTTP status alone. Every gateway reply carries a request id for support: meta.requestId, or a top-level requestId in a reply without meta (such as a refusal before admission).price_low_eur, price_high_eur and the entries of offers.shop with its price_eur and availability.bestprice-category with its category id and reading the price and the shop count of each row.gtin of bestprice-product for codes the barcode lookup does not carry.body.limit runs from 1 to 8 in bestprice-barcode and from 1 to 24 in bestprice-search and bestprice-category.body.page starts at 1 in bestprice-search and bestprice-category.body.limit, body.page or body.strict is ignored and its default applies; an invalid body.query of bestprice-category is ignored.products list from bestprice-barcode is a valid answer, and it means the barcode index does not carry that code.shop_offer row of bestprice-search has no product page, so its product_id is null and bestprice-product has nothing to open.Send the code as body.barcode to bestprice-barcode, for example 8806091024749. Spaces and hyphens inside the code are ignored, and a 13-digit code that finds no match is tried again zero-padded to 14 digits, so the code can be sent as the catalogue stores it.
bestprice-search works on a text index that does not carry barcodes, so a barcode in body.query does not work. Send EAN, GTIN and UPC codes to bestprice-barcode, and keep bestprice-search for product names in Greek or English, such as iphone 15. The search also accepts q, keyword and term as alternative names for body.query.
Call bestprice-product with the product_id of a row from bestprice-search, bestprice-category or bestprice-barcode. A product URL works as body.product_id too, and id is accepted as an alternative name for the input. Read the price band from price_low_eur and price_high_eur, and read the single shop prices from the entries of offers.
Read category_id from a row of bestprice-search or bestprice-barcode, or take the number from a category URL; the URL itself works as body.category_id too. category, cid and url are further names that body.category_id accepts. Pass the value to bestprice-category, and add body.query when only the rows that match a keyword are wanted.
Only page 1 is served. A body.page above 1 returns no rows, and bestprice-search shows page_available as false instead of returning the same rows again. To reach other products, change body.query or choose another category with body.category_id, and set body.limit to the number of rows wanted from page 1.
Search the product name with bestprice-search, open the candidate rows with bestprice-product and compare the gtin of each opened product with your code. A match ties the catalogue entry to that BestPrice.gr product, and its product_id can be stored for later calls to bestprice-product when the offers are needed again.