Documentation
BestPrice.gr API technical reference
Reference for the BestPrice.gr API: barcode, category, product and search inputs with their alternative names, and what the fields in each answer mean.
See also: BestPrice.gr API overview and prices · BestPrice.gr API guide: barcode, search and price flows
On this page
BestPrice.gr API barcode input rules
body.barcode takes an EAN-13, EAN-8, UPC-12 or GTIN-14 code, such as 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.
ean, gtin, upc, code and barcode_number are accepted as alternative names for body.barcode.
body.strict controls which rows come back:
- true keeps only the rows that BestPrice.gr declared an exact barcode match for
- false adds the rows of its fuzzy name match, marked
text_matchinmatch_type
A fuzzy row is not a barcode match. An invalid body.strict or body.limit is ignored and the default applies.
Fields in this section (4)
bestprice-barcode, body.barcode, body.strict, body.limit
Barcode answer fields
match_type is barcode_exact when a row is an exact barcode match and text_match when it comes from a fuzzy name match, and match_confidence shows how confident the match is. exact_match shows whether the lookup produced an exact match, strict shows the mode it ran in, and barcode_queried shows the code that was looked up.
An empty products list is a valid answer: the barcode index does not carry that code. Inside a row, price_from_eur is the starting price in EUR, offer_count counts the offers of the product, category_title names its category, and variant names the variant of the model.
Fields in this section (1)
bestprice-barcode
Category input rules
body.category_id takes the numeric id of a category, such as 806, or a category URL, and category, cid and url are accepted as alternative names for it. The id is the category_id of a search row or the number in a category URL.
body.query narrows the grid to a keyword, such as iphone, and q is accepted as an alternative name for it. An invalid body.query is ignored.
body.page selects the page of the grid, and only page 1 returns rows: a deeper page returns none. body.limit sets how many rows of the page come back, and an invalid body.page or body.limit is ignored so that the default applies.
Fields in this section (5)
bestprice-category, body.category_id, body.query, body.page, body.limit
Category row fields
Each element of products is shaped like a search row. title, url and image describe the product, product_id identifies it, and category_id places it in a category.
price_eur and currency give the price shown, shop_count counts the shops that carry the product, and listing_type, offer_id and merchant_id tell a compared product from the listing of a single shop.
Fields in this section (2)
bestprice-category, bestprice-search
Product id input
body.product_id takes the numeric id of a product, such as 2159006120, or a product URL, and id and url are accepted as alternative names for it. The id is the product_id of a search, category or barcode row.
Fields in this section (2)
bestprice-product, body.product_id
Product record fields
price_low_eur and price_high_eur give the price band across the market. offer_count shows how many offers the market has, while offers_listed shows how many offers this answer carries.
gtin is the barcode of the product and gtin_type names the key it came from. mpn and sku are the manufacturer part number and the stock keeping unit, category_path gives the category path, and rating with rating_count gives the rating and the number of ratings.
Each element of offers is the offer of one shop. shop names the shop, price_eur and currency give its price, availability and condition describe the item, and url is the address of the offer.
Fields in this section (1)
bestprice-product
Search input rules
body.query is a keyword in Greek or English, and q, keyword and term are accepted as alternative names for it. A barcode does not work as a keyword in bestprice-search, because the text index does not carry barcodes: use bestprice-barcode for an EAN, GTIN or UPC.
Only page 1 of a grid is served. A body.page above 1 returns no rows and page_available shows false, rather than the rows of page 1 again, and body.limit sets how many rows of page 1 come back. An invalid body.page or body.limit is ignored and the default applies.
Fields in this section (4)
bestprice-search, body.query, body.page, body.limit
Search answer fields
listing_type is product for a compared product and shop_offer for the listing of a single shop. The second kind has an offer_id and a merchant_id and a null product_id, while price_eur is the price shown for the row, which is the lowest across shops.
redirected_to appears only when the query was redirected to a category or brand page. Its type is category or brand, and id, title and url identify that page. The rows are the grid of that page, and redirected_to tells which page that is.
Fields in this section (1)
bestprice-search
Operations
Every public gateway operation uses POST /api/v1/{project}/{action}.
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.
Barcode lookup
POST /api/v1/bestprice/bestprice-barcode
Find the BestPrice.gr product behind an EAN, UPC or GTIN barcode.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.barcode | string | Required | — | — | — |
body.limit | integer | Optional | 8 | — | 1–8 |
body.strict | boolean | Optional | true | — | — |
Request examples
# 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"}}'Response fields
products[]product_idurltitlebrandmodelvariantcategory_idcategory_titleprice_from_eurcurrencyoffer_countavailabilityratingrating_countimagematch_typematch_confidence
barcodebarcode_queriedstrictexact_match
Category grid
POST /api/v1/bestprice/bestprice-category
List the products of one category by id, with an optional keyword to narrow them.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.category_id | string | Required | — | — | — |
body.limit | integer | Optional | 24 | — | 1–24 |
body.page | integer | Optional | 1 | — | 1–9007199254740991 |
body.query | string | Optional | — | — | — |
Request examples
# 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-category' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category_id":"806"}}'Response fields
products[]pagelimitcategory_id
Product offers
POST /api/v1/bestprice/bestprice-product
Read one product with its shop offers, price band, barcode and rating.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.product_id | string | Required | — | — |
Request examples
# 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-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"2162499899"}}'Response fields
productproduct_idurltitlebrandgtingtin_typempnskucategory_pathprice_low_eurprice_high_euroffer_countoffers_listedratingrating_countoffers[]shopprice_eurcurrencyurlavailabilitycondition
Product search
POST /api/v1/bestprice/bestprice-search
Search products by keyword in Greek or English and read each row's price and shop count.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.query | string | Required | — | — | — |
body.limit | integer | Optional | 24 | — | 1–24 |
body.page | integer | Optional | 1 | — | 1–9007199254740991 |
Request examples
# 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-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"iphone"}}'Response fields
products[]listing_typeproduct_idoffer_idmerchant_idurltitleprice_eurcurrencycategory_idshop_countimage
pagelimitqueryredirected_totypeidtitleurl
page_available
How calls work
POST /api/v1/bestprice/<action>withx-api-key,Content-Type: application/jsonand a requiredIdempotency-Key.- A successful call returns
ok: true:datais the result of the operation,meta.requestIdidentifies the recorded request andmeta.chargedCreditUnitsis the amount charged. Otherwiseokisfalseanderror.codenames the reason; readokanderror.coderather than relying on the HTTP status alone. Every gateway reply carries a request id for support:meta.requestId, or a top-levelrequestIdin a reply withoutmeta(such as a refusal before admission). - Charged the listed price only when a call succeeds. Failures are not charged; an unconfirmed outcome is released after at most 900 seconds without a charge.
- Repeating the same request with the same Idempotency-Key after it has finished returns the stored response for 24 hours without a new charge.
In the gateway reference: