# Hemkop.se Scraper - Swedish Grocery Prices, EAN and Offers (`studio-amba/hemkop-scraper`) Actor

Scrape product data from hemkop.se, the Swedish supermarket. Get prices in SEK, unit prices, member offers with end dates, EAN, stock status, brands, ingredients and origin for groceries by category or product URL.

- **URL**: https://apify.com/studio-amba/hemkop-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 result scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hemkop.se Scraper - Swedish Grocery Prices, EAN and Offers

Scrape product data from [hemkop.se](https://www.hemkop.se), the online supermarket of Hemkop (Axfood). Each row has the shelf price in SEK, unit price, member offer with end date, EAN, stock status, brand, category and, with product details on, description, ingredients and country of origin.

### How to scrape Hemkop.se data

1. Open the Actor and paste one or more category URLs, for example `https://www.hemkop.se/c/mejeri-ost-och-agg/mjolk`.
2. Set Max results to the number of products you want.
3. Click Start. The Actor reads every product in the category and its subcategories.
4. Download the dataset as JSON, CSV or Excel, or read it through the Apify API.

To read the whole assortment, leave the category URLs and product URLs empty and raise Max results.

To read specific products, paste product URLs such as `https://www.hemkop.se/produkt/Mellanmjolk-Langre-Hallbarhet-1-5procent-101233933_ST` into Product URLs.

### What data does the Hemkop scraper return?

| Field | Description |
|---|---|
| name | Product name |
| brand | Brand or manufacturer |
| productId | Hemkop product code |
| ean | EAN/GTIN barcode |
| price | Shelf price in SEK, VAT included |
| currency | SEK |
| unitPrice, unitPriceUnit | Price per kg or litre and its unit |
| size, subtitle | Package size and the brand and size line as published |
| inStock | Whether the product can be ordered |
| category, categories | Deepest category and the category path |
| promoPrice, promoQuantity | Offer price and the number of items the offer needs |
| promoLabel, promoType, promoValidUntil | Offer name, campaign type and end date |
| savingsAmount | Saving in SEK with the offer |
| description, ingredients, originCountry, labels, weight | Product details (when product details are on) |
| imageUrl, url | Main image and product page |
| country, language, scrapedAt | se, sv and the scrape timestamp |

Fields the site does not publish for a product are left out of that row.

### Example output

```json
{
  "name": "Mellanmjölk Längre Hållbarhet 1,5%",
  "brand": "Garant",
  "productId": "101233933_ST",
  "ean": "7340083443893",
  "price": 17.45,
  "currency": "SEK",
  "unitPrice": 11.63,
  "unitPriceUnit": "SEK/l",
  "size": "1,5l",
  "inStock": true,
  "category": "Mellanmjölk",
  "url": "https://www.hemkop.se/produkt/101233933_ST"
}
```

### Input

| Field | Description |
|---|---|
| categoryUrls | Category pages from hemkop.se. Subcategories are included. |
| productUrls | Product pages from hemkop.se. |
| maxResults | Maximum number of rows. Default 50. |
| includeDetails | Adds EAN, description, ingredients and origin from the product data. Default on. |
| proxyConfiguration | Proxy used for the requests. Default is Apify Proxy. |

If both URL lists are empty, the Actor walks all top-level categories until Max results is reached.

### Offers and member prices

Hemkop shows member prices (Klubbpris) and multi-buy offers next to the shelf price. The shelf price stays in `price`. The offer price is in `promoPrice`, the number of items it needs in `promoQuantity` (1 for a single item, 2 or more for a multi-buy), and the end date in `promoValidUntil`.

### Product lookup by barcode

Rows carry the EAN, so you can match Hemkop products with the same product at other Swedish and European shops. The EAN comes from the product data, and from the image file name when product details are off.

### How much does it cost?

Pricing is per result. The cost per product is listed on the Actor's pricing tab. A run with product details on makes one extra request per product, so it takes longer than a run with details off. The usage cost of a run settles after the run succeeds.

### Run time

A category with 100 products takes about one minute with product details on. The whole assortment has tens of thousands of products and takes several hours, so set the run timeout to match Max results.

### Use cases

- Price monitoring of Swedish grocery prices
- Tracking member offers and when they end
- Matching products across shops by EAN
- Assortment analysis by brand and category
- Unit price comparison per kg or litre

### Scheduling

Create a schedule on the Apify platform to run the Actor daily or weekly with the same input. Compare datasets between runs to see price and offer changes.

### Data export

Every run stores its rows in a dataset. Export it as JSON, CSV, Excel or XML, or fetch it with the Apify API or the Apify clients for JavaScript and Python.

### Limits

- Only products listed in the public assortment are returned. Prices are the online prices without a store login.
- Free-text search is not offered. Use category URLs or product URLs.
- Availability is the online assortment status. Store-level stock is not published.

### Integrations

Connect the dataset to Google Sheets, Make, Zapier, n8n or a webhook through the Apify integrations.

### Legal

The Actor reads public product data that hemkop.se shows to every visitor. You are responsible for using the data in line with the site's terms and applicable law, including database and copyright rules. We are not responsible for restrictions imposed by the source website.

### Frequently asked questions

**Does it need a login?** No.

**Which currency are the prices in?** Swedish kronor (SEK), VAT included.

**Can I get the EAN?** Yes, in the `ean` field.

**Can I scrape one category only?** Yes, paste its URL into Category URLs.

**What happens when a product has no offer?** The offer fields are left out of that row.

**What happens when nothing matches?** The run ends without rows and the status message says no products were found.

**Why is a run slow?** Product details need one request per product. Turn Include product details off for a faster run.

# Actor input Schema

## `categoryUrls` (type: `array`):

Category pages from hemkop.se, e.g. https://www.hemkop.se/c/mejeri-ost-och-agg/mjolk. Every product in the category and its subcategories becomes one row. Leave this and the product URLs empty to read the whole assortment up to Max results.

## `productUrls` (type: `array`):

Product pages from hemkop.se, e.g. https://www.hemkop.se/produkt/Mellanmjolk-Langre-Hallbarhet-1-5procent-101233933_ST. Each product becomes one row.

## `maxResults` (type: `integer`):

Maximum number of rows (one row per product).

## `includeDetails` (type: `boolean`):

Reads the product page data for each product to add EAN, description, ingredients and country of origin. Turn off for a faster run with the listing fields only (EAN is then taken from the image name when available).

## `proxyConfiguration` (type: `object`):

Proxy used for the requests. Default is Apify Proxy.

## Actor input object example

```json
{
  "categoryUrls": [
    "https://www.hemkop.se/c/mejeri-ost-och-agg/mjolk"
  ],
  "maxResults": 20,
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "categoryUrls": [
        "https://www.hemkop.se/c/mejeri-ost-och-agg/mjolk"
    ],
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/hemkop-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "categoryUrls": ["https://www.hemkop.se/c/mejeri-ost-och-agg/mjolk"],
    "maxResults": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/hemkop-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "categoryUrls": [
    "https://www.hemkop.se/c/mejeri-ost-och-agg/mjolk"
  ],
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call studio-amba/hemkop-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio-amba/hemkop-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8EsSVfltujGo2e1O9/builds/ooB4uKfLvc5yWFs8n/openapi.json
