nemlig APInemlig.com ↗
Access nemlig.com grocery products, categories, offers, and basket management via 7 structured API endpoints. Search by keyword, browse categories, and retrieve nutritional data.
What is the nemlig API?
The nemlig.com API exposes 7 endpoints for searching Danish grocery products, browsing the full category hierarchy, retrieving product details including nutritional declarations, checking current promotional offers, and managing an anonymous shopping basket. The search_products endpoint accepts a keyword query — such as 'mælk' or 'ost' — and returns both matching product listings and related recipe suggestions in a single response.
curl -X GET 'https://api.parse.bot/scraper/dc286e03-5996-4d49-911e-af66d0762977/search_products?limit=5&query=m%C3%A6lk&offset=0' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace nemlig-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: nemlig.com grocery SDK — search, browse categories, offers, basket."""
from parse_apis.nemlig.com_grocery_api import Nemlig, Product, Category, CategoryPage, OfferPage, ProductNotFound
client = Nemlig()
# Search for dairy products — limit= caps total items fetched
for product in client.products.search(query="mælk", limit=5):
print(product.name, product.brand, product.price, product.url)
# Browse the category tree and drill into a category page
first_cat = client.categories.list(limit=1).first()
if first_cat:
print(first_cat.text, first_cat.url)
page = client.categories.browse(category_url=first_cat.url)
print(page.meta_data, page.content)
# View current promotional offers
offers = client.offerpages.get()
print(offers.meta_data, offers.content)
# Add a product to the basket using an id from search results
first_product = client.products.search(query="ost", limit=1).first()
if first_product:
basket = client.baskets.add_product(product_id=first_product.id, quantity=2)
print(basket.total_price, basket.number_of_products)
for item in basket.lines:
print(item.name, item.brand, item.quantity, item.item_price)
# Retrieve current basket state
current = client.baskets.get()
print(current.basket_guid, current.total_price)
# Typed error handling
try:
basket = client.baskets.add_product(product_id="9999999999")
except ProductNotFound as exc:
print(f"Product not found: {exc.product_slug}")
print("exercised: products.search / categories.list / categories.browse / offerpages.get / baskets.add_product / baskets.get")
Full-text search over nemlig.com's product catalog. Returns matching products with pricing, availability, and campaign info, plus recipe suggestions related to the query. Paginated via offset/limit. Each product exposes an Id (for basket operations) and a Url slug (for detail lookups).
| Param | Type | Description |
|---|---|---|
| limit | integer | Maximum number of product results to return. |
| queryrequired | string | Search keyword (e.g. 'mælk', 'brød', 'ost') |
| offset | integer | Offset for pagination of product results. |
{
"type": "object",
"fields": {
"start": "offset of the first returned product",
"recipes": "array of recipe suggestions related to the search query",
"products": "array of product objects with Id, Name, Brand, Price, Url, etc.",
"num_found": "total number of matching products"
},
"sample": {
"data": {
"start": 0,
"recipes": [
{
"Id": "dd4bad84-da7d-4099-a04c-57eb08e4d4ea",
"Url": "/opskrifter/koldskaal-med-appelsin-og-ingefaer-98001324",
"Name": "Koldskål med appelsin og ingefær",
"TotalTime": "50 min",
"NumberOfPersons": 4
}
],
"products": [
{
"Id": "5601131",
"Url": "delemaelk-0-4-oeko-5601131",
"Name": "Delemælk 0,4% øko.",
"Brand": "Naturmælk",
"Price": 19.95,
"Labels": [
"Øko (dansk)"
],
"Category": "Køl",
"Description": "1 l / Naturmælk",
"SubCategory": "Øvrig mælk",
"DiscountItem": false,
"UnitPriceCalc": 19.95,
"UnitPriceLabel": "kr/l"
}
],
"num_found": 133
},
"status": "success"
}
}About the nemlig API
Product Search and Details
The search_products endpoint takes a required query string and optional limit and offset parameters for pagination. It returns a Products object containing a Products array and a NumFound count, alongside a Recipes array for content discovery. Each product entry in the results carries an Id field used to call add_to_basket, and a slug used to call get_product_details. The get_product_details endpoint accepts a product_slug and returns a content array covering description sections, media, attributes, and nutritional declarations, plus a MetaData object with the product name, category path, URL, and SEO fields.
Category Browsing and Offers
list_categories returns the complete navigation tree with no required inputs. Each node exposes an Id, a Text display name, a Url path such as /dagligvarer/frugt-groent, and a Children array of subcategories following the same structure. Pass any Url value from that tree into get_category_products via the category_url parameter to retrieve the corresponding content sections — which include product lists, brand spots, and promotional ribbons — along with category-level MetaData. The get_offers endpoint requires no inputs and returns the current tilbud (offers) page content sections and associated metadata.
Basket Management
The add_to_basket endpoint accepts a required product_id (obtainable from search_products results via Products.Products[*].Id) and an optional quantity integer. It returns the updated basket state: a Lines array of line items with product details and quantities, a BasketGuid session identifier, a TotalPrice reflecting delivery fees, and a NumberOfProducts count. get_basket retrieves the same structure for the current anonymous basket without requiring any inputs, allowing you to inspect basket state at any point in a session.
The nemlig API is a managed, monitored endpoint for nemlig.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when nemlig.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official nemlig.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a Danish grocery price comparison tool using product data from
search_productsandget_product_details. - Aggregate nutritional information across product categories by combining
get_category_productsand the nutritional declarations inget_product_detailsresponses. - Monitor weekly promotional offers on nemlig.com by polling
get_offersand tracking changes in the content sections. - Construct a category-aware product catalog browser using the nested tree from
list_categoriesand per-category results fromget_category_products. - Prototype a grocery list tool that adds items to a basket via
add_to_basketand reads back totals fromTotalPriceandLines. - Surface recipe suggestions alongside search results by reading the
Recipesarray returned bysearch_products. - Extract SEO metadata and category paths for nemlig.com products using the
MetaDataobject fromget_product_details.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does nemlig.com have an official public developer API?+
What does `get_product_details` return beyond the basic product name and price?+
content array that includes description sections, media assets, product attributes, and nutritional declarations. The MetaData object adds the product URL, category path, and SEO fields. Price data appears within the content sections but structured nutritional data is the most distinctive field not available from the search results alone.Does the basket persist across sessions or require a user account?+
BasketGuid returned from add_to_basket and get_basket. It is not tied to a registered nemlig.com account. Completing a checkout or linking the basket to an authenticated account is not supported by the current API. You can fork it on Parse and revise to add an endpoint that bridges to authenticated order submission.Does the API cover product reviews or customer ratings?+
How does pagination work in `search_products`?+
offset to move through results and limit to cap the number returned per call. The NumFound field in the Products object tells you the total count of matching products, so you can calculate how many pages exist before making additional calls.