# Prej API > Danish grocery prices as a REST API: products from 21 chains, matched across > chains by GTIN/EAN barcode, with daily price history and current offers. `/v1/stats` > returns the live product count; https://prej.dk/api/daekning publishes per-chain coverage. > This file describes the API at https://api.prej.app. The consumer website is https://prej.dk. Base URL: https://api.prej.app Specification: https://api.prej.app/openapi.json (OpenAPI 3.1 — the authoritative description) Reference: https://api.prej.app/docs Index: https://api.prej.app/ (JSON, same content as this file) ## Authentication Every `/v1/*` endpoint needs an API key, passed as `Authorization: Bearer prej_`. A free key is issued instantly at https://prej.dk/api — no email approval. Keys and daily usage are managed at https://prej.dk/konto. Terms: https://prej.dk/vilkaar-api. ``` curl -H "Authorization: Bearer prej_xxx" "https://api.prej.app/v1/products?q=skyr&limit=5" ``` ## Endpoints - `GET https://api.prej.app/v1/products`: Search and browse products. - `GET https://api.prej.app/v1/products/optimize`: Optimize a shopping list across stores. - `GET https://api.prej.app/v1/products/batch`: Fetch multiple products by ID. - `GET https://api.prej.app/v1/products/{id}`: Get a single product with prices and related products. - `GET https://api.prej.app/v1/products/{id}/history`: Price history for a product. - `GET https://api.prej.app/v1/offers`: Every offer running today. - `GET https://api.prej.app/v1/flyers`: Tilbudsaviser running now. - `GET https://api.prej.app/v1/categories`: All product categories. - `GET https://api.prej.app/v1/labels`: All product labels. - `GET https://api.prej.app/v1/scan/{gtin}`: Look up a product by GTIN/EAN barcode. - `GET https://api.prej.app/v1/lookup/{chain}/{item_number}`: Look up a product by a chain's own article number. - `GET https://api.prej.app/v1/chains`: All grocery chains. - `GET https://api.prej.app/v1/stats`: Aggregate stats (product count, chain count, drop overview). ## Data model - **Prices are integers in øre** (1/100 DKK). 2495 is 24,95 kr. Divide by 100. - **A price belongs to a chain, not to a store.** `chain_slug` identifies the chain; we do not model individual shops, and one chain has one price nationally. - **Products are matched across chains by GTIN/EAN barcode.** `gtins` carries every barcode the matched variants use, and is empty for a substantial minority of products, whose chains publish none — chiefly Nemlig, Motatos and the border-trade shops. Those products are islands and never appear in a cross-chain comparison. Measured per-chain coverage is published at https://prej.dk/api/daekning. `/v1/scan/{gtin}` looks a barcode up in reverse. - **`category_name` is null for a large share of listed products.** Categorisation runs continuously and has never been complete, so treat a null as normal and do not assume `?category=` is exhaustive. The measured share is at https://prej.dk/api/data. - **`source`** is `scraped` (read from the chain's own catalogue) or `flyer` (read from a tilbudsavis, so it is an advertised offer price). - **`offer_ends` is inclusive** — the last day the offer price applies, not the day the price changes back. An offer running 5–11 September has `offer_ends: 2026-09-11` and the normal price returns on the 12th. - **A null `offer_starts` means the chain does not publish a start date** (Rema 1000, Nemlig date only the end), never that the price is not an offer. - **`price` is what one article costs bought alone; `multi_buy` is the deal** ("3 for 135 kr" is `{ quantity: 3, price: 13500, price_each: 4500 }`), null when there is none. A multi-buy sets `is_offer` and often has no dates, so `offer_ends` can be null on it. - **`as_of`** is on every list response and on `/v1/stats`: the date of the data behind the response. Nightly, between 03:00 and 04:25 Europe/Copenhagen. Snapshots begin in April 2026; nothing older exists, whatever a plan's history window allows. - **Border-trade chains** (German shops on the Danish border) are included and flagged `is_border_trade`; pass `exclude_border_trade=1` to leave them out. ## Vocabularies - Chain slugs (`?chain=`): 365discount, bilka, bilkatogo, brugsen, calle, fakta-de, fleggaard, fotex, kvickly, lidl, meny, minkobmand, motatos, nemlig, netto, poetzsch, rema1000, scandinavian-park, spar, superbrugsen, wolt-market. - Top-level category slugs (`?category=`): baby-og-boern, bolig-og-koekken, broed-og-kager, drikkevarer, dyremad, elektronik, fritid-og-sport, frost, frugt-og-groent, have-og-byggemarked, husholdning, kiosk, kolonial, koed-og-fisk, legetoej, mad-fra-hele-verden, mejeri-og-koel, personlig-pleje, slik-og-snacks, toej-og-sko, oevrigt. - Label keys (`?labels=`, comma-separated): welfare_1, welfare_2, welfare_3, dyrenes_beskyttelse, keyhole, wholegrain, gluten_free, lactose_free, organic_dk, organic_eu, msc, asc, fairtrade, rainforest_alliance, danish_produced, vegan, vegetarian, sugar_free, no_added_sugar, nordic_swan, asthma_allergy, eu_star, halal, alcohol_free, eu_ecolabel, ggn, decaf, biodynamic, ce_mark, ecocert. Full objects — names, logos, the three-level category tree — come from `/v1/chains`, `/v1/categories` and `/v1/labels`. ## Plans and limits - **Gratis** (`free`), Free: 25 requests/day, 7 days of price history, non-commercial use only. - **Start** (`basic`), 750 DKK/month: 2,500 requests/day, 90 days of price history, commercial use permitted. - **Pro** (`pro`), 2,500 DKK/month: 25,000 requests/day, 365 days of price history, commercial use permitted. - **Enterprise** (`enterprise`), 7,500 DKK/month and up: 1,000,000 requests/day, 365 days of price history, commercial use permitted. The daily quota is per key and resets at 00:00 UTC; `X-RateLimit-Limit-Day` and `X-RateLimit-Remaining-Day` are on every authenticated response. A shared burst guard allows 120 requests per minute per key. Both limits refuse with `429` and a body carrying `scope` (`daily` or `burst`), `limit`, `remaining`, `reset_at` and `retry_after_seconds`, so a backoff can be computed rather than parsed. A `daily` 429 also carries `upgrade_url`, the account page where a bigger plan is ordered. A `401` carries `docs_url` and `signup_url`. Paid plans are ordered at https://prej.dk/konto; Enterprise is by agreement (hej@prej.dk). Prices are totals — Prej is not VAT-registered, so no VAT is added. ## Optional - [Terms of use](https://prej.dk/vilkaar-api) - [Pricing and free key](https://prej.dk/api) - [Contact](mailto:hej@prej.dk)