Choose the operation that matches what you hold
The four operations start from different inputs, so the first decision is which one fits the value you already have:
- a barcode goes to
bestprice-barcode, which returns the matching products with theirproduct_id - a product name goes to
bestprice-search, which returns rows with aproduct_idor, for the listing of a single shop, anoffer_id - a category id or a category URL goes to
bestprice-category, which returns rows shaped like search rows - a
product_idor a product URL goes tobestprice-product, which returns the shop offers and the price band
The category_id in a row of bestprice-search or bestprice-barcode leads to bestprice-category, and the product_id of a row leads to bestprice-product.
Resolve a barcode with the BestPrice.gr API
A barcode from a catalogue becomes a BestPrice.gr product in two calls, and the second call returns the shop offers of that product.
- Call
bestprice-barcodewith the code asbody.barcode, written with or without spaces and hyphens. - Read
exact_matchof the answer and thematch_typeof each row inproducts; with the defaultbody.strict, every returned row is abarcode_exactrow. - Take the
product_idof the returned row. - Call
bestprice-productwith that id asbody.product_idto read the shop offers.
An EAN-13 code needs no padding of your own, because a code that misses is tried again zero-padded to 14 digits. The category_id and category_title of the row place the product in its category, which bestprice-category can browse.
Match by name and GTIN when the barcode lookup finds nothing
An empty products list from bestprice-barcode means that the barcode index does not carry the code, and the gtin of a product still lets you decide whether it is the one you hold.
- Call
bestprice-searchwith the product name from your catalogue asbody.query, in Greek or English. - Pick the rows whose
listing_typeisproduct, because only those carry aproduct_id. - Open each picked row with
bestprice-productby itsproduct_id. - Compare the
gtinof the opened product with your code, and readgtin_typeto see which key the barcode came from. - Keep the product whose
gtinequals your code.
Review fuzzy name matches before accepting them
Fuzzy name matches are useful for reviewing a catalogue entry, but a text_match row is not a barcode match.
- Call
bestprice-barcodewithbody.barcode, setbody.strictto false andbody.limitto at most 8. - Split the rows by
match_type:barcode_exactrows are exact matches andtext_matchrows are candidates. - Read
match_confidenceof each candidate next to itstitle,brandandmodel. - Open a candidate with
bestprice-productand compare itsgtinwith the code before treating it as a barcode match.
exact_match in the answer shows whether the lookup produced an exact match at all.
Read the shop prices of one product
bestprice-product gives the price picture of one product in a single call.
- Send the product's id as
body.product_id, or a product URL in its place. - Read
price_low_eurandprice_high_eurfor the price band across the market. - Read
offersfor the individual prices, where each offer names itsshop,price_eurandavailability. - Compare
offers_listedwithoffer_count:offers_listedshows how many offers this response carries andoffer_countshows how many the market has. - Rank the shops by comparing
price_euracross the entries ofoffers.
Read condition of each offer when the same product is offered in different conditions.
Search by keyword and open the right row
A keyword search finds products by name, and its rows say which ones can be opened.
- Call
bestprice-searchwithbody.queryin Greek or English, for exampleiphone 15. - Check
redirected_tofirst: when it is present, the rows are the grid of that category or brand page. - Read
listing_typeof each row; aproductrow has aproduct_id, while ashop_offerrow has anoffer_idand amerchant_idand no product page. - Compare
price_eurandshop_countof theproductrows to choose the rows worth opening. - Open the chosen rows with
bestprice-product.
A barcode does not work as body.query: use bestprice-barcode for those.
Browse a category and narrow it with a keyword
A category id turns the grid of one category into rows that can be read without a keyword.
- Take the
category_idof a row frombestprice-searchorbestprice-barcode, or use the number in a category URL. - Call
bestprice-categorywith that value asbody.category_id. - Add
body.query, such asiphone, to narrow the grid to the rows that match it. - Set
body.limitto the number of rows wanted, up to 24. - Read
listing_type,price_eurandshop_countof each returned row, because the rows are shaped like search rows. - Open the rows of interest with
bestprice-product.
Only page 1 returns rows, so narrow the grid with body.query or choose another category in place of paging.
How BestPrice.gr works
A comparison shopping website is a vertical search engine that aggregates listings from many retailers so that shoppers can compare products by price, features and reviews. On BestPrice.gr, a price history chart shows how the lowest recorded price of a product moved across participating shops over the available period, and a shopping list totals the cost of a set of products at each shop to show which shop has the best combined price.
A GTIN is a GS1 identifier for trade items, 8, 12, 13 or 14 digits long, used to look up product information in databases, for example by scanning the barcode. An EAN-13 barcode carries a 13-digit GTIN-13 and is mainly used on consumer products scanned at checkout, while the shorter EAN-8 carries a GTIN-8 for small packages.
[
{
"body": {
"barcode": "8806091024749"
}
},
{
"body": {
"product_id": "2159006120"
}
}
]{
"body": {
"query": "iphone 15",
"limit": 8
}
}{
"body": {
"category_id": "806",
"query": "iphone",
"limit": 24
}
}{
"body": {
"barcode": "8806091024749",
"strict": false,
"limit": 8
}
}Server-side request template
This server-side template shows authentication and request identity using the first operation of this API. Choose the operation for your use case and check its current availability and price on the API page. After a timeout, resend the unchanged request with the same Idempotency-Key.
The gateway request is always POST.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/bestprice/bestprice-barcode' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"barcode":"8806091024749"}}'Integration checklist
- The API key is stored in a server-side secret manager and never sent to a browser.
- Each request carries its own Idempotency-Key, kept until the request has a final answer.
- The integration reads ok and error.code and handles each error code as the error table describes.
- An uncertain POST is inspected using its original identity, never blindly repeated with a new one.
- The operation’s current availability and price have been checked on its API page.
BestPrice.gr API overview and prices · Read the API reference · Try it in the playground