# Kronans Apotek Scraper — Swedish Pharmacy Products & Prices (`studio-amba/kronansapotek-scraper`) Actor

Scrape products, prices, and details from Kronans Apotek — Sweden's #3 pharmacy chain. Covers the full product catalogue via category and full-store listing crawls.

- **URL**: https://apify.com/studio-amba/kronansapotek-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 1 total users, 0 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

## Kronans Apotek Scraper

Scrape product data from [kronansapotek.se](https://www.kronansapotek.se), Sweden's #3 pharmacy chain by store count. Extract prices, EAN/GTIN barcodes, brands, categories, and availability for medicines, supplements, skincare, and wellness products across the full online catalogue.

Sibling actors in the same vertical: `apoteket-scraper`, `apotekhjartat-scraper`, `apotek1-scraper`, `apotea-scraper`, `apohem-scraper` — together these cover Sweden's and Norway's major online pharmacies.

### Input

| Field | Type | Required | Description |
|-------|------|----------|--------------|
| `startUrls` | Array | No | Specific Kronans Apotek **product** page URLs to scrape directly, e.g. `https://www.kronansapotek.se/Alvedon/p/097610/`. When set, only these URLs are scraped (no filtering). |
| `maxResults` | Integer | No | Max products to return from the default full-catalogue crawl (default: 100). Ignored when `startUrls` is set. |
| `proxyConfiguration` | Object | No | Proxy settings. Kronans Apotek has no anti-bot protection, so the free automatic Apify proxy pool is enough. |

If you provide nothing, the actor crawls the full catalogue by default (see below).

### How the full-catalogue crawl works

Kronans Apotek is a static site (Gatsby, hosted on S3 + CloudFront). The category and "all products" listing pages you see in a browser paginate via `?page=N`, but that pagination is client-side JavaScript only — a plain HTTP request to `?page=2` returns byte-identical content to `?page=1` (verified live 2026-09-11). So instead of paginating listing pages, this actor reads the site's own XML sitemap (`/_gatsby/sitemap-index.xml`), which lists every product detail page directly — over 33,500 URLs across 8 sitemap files — and fetches product data from there.

About 45% of the catalogue is prescription-only medicines, which Swedish pharmacy sites don't publicly categorize or describe (a regulatory restriction on marketing prescription drugs, not a scraping gap — verified against the source's own JSON-LD, which omits `description` and any real category breadcrumb for these pages). The default crawl skips these uncategorized listings, the same way sibling actor `apoteket-scraper` excludes prescription items at its search-API level. Pass a specific product URL via `startUrls` if you need a prescription item's price/EAN regardless.

### Output

| Field | Type | Example |
|-------|------|---------|
| `name` | String | `"Alvedon 500 mg Paracetamol, Filmdragerad tablett, 20 styck"` |
| `brand` | String | `"Alvedon"` |
| `price` | Number | `34` |
| `currency` | String | `"SEK"` |
| `sku` | String | `"097610"` |
| `ean` | String | `"07046260976108"` |
| `inStock` | Boolean or null | `true` (null when the source doesn't state availability — never guessed) |
| `imageUrl` | String | Product image |
| `itemDescription` | String | Product description, when published |
| `category` | String | Breadcrumb category path, e.g. `"Förkylning och feber > Feber"` |
| `strength` | String | Parsed dosage, e.g. `"500 mg"`, when present in the name |
| `form` | String | Parsed pharmaceutical form, e.g. `"Filmdragerad tablett"`, when present |
| `packageText` | String | Parsed pack size, e.g. `"20 styck"`, when present |
| `url` | String | Product page URL |
| `scrapedAt` | String | ISO 8601 timestamp |

```json
{
    "name": "Alvedon 500 mg Paracetamol, Filmdragerad tablett, 20 styck",
    "brand": "Alvedon",
    "price": 34,
    "currency": "SEK",
    "url": "https://www.kronansapotek.se/Alvedon/p/097610/",
    "scrapedAt": "2026-09-11T14:14:24.586Z",
    "sku": "097610",
    "ean": "07046260976108",
    "inStock": true,
    "imageUrl": "https://www.kronansapotek.se/k2/images/097610/large/0.jpg",
    "itemDescription": "Alvedon innehåller paracetamol som är smärtlindrande och febernedsättande.",
    "category": "Förkylning och feber > Feber",
    "strength": "500 mg",
    "form": "Filmdragerad tablett",
    "packageText": "20 styck"
}
```

### Technical notes

- Product data comes from schema.org `Product` JSON-LD on each detail page — no headless browser needed, plain HTTP GET + parsing.
- Prices are in SEK (Swedish kronor), read directly from the source's own numeric `offers.price` field.
- `inStock` is a nullable 3-state field: `true`/`false` when the source states availability, `null` when it doesn't. It is never coerced to `false` just because availability is unstated.
- No anti-bot protection was found on kronansapotek.se (verified live 2026-09-11), so the default proxy setting is the free automatic Apify proxy pool — no residential proxy required.

### Cost

Using CheerioCrawler (HTTP-only, no browser): $0.005 start fee plus $0.002 per result. 100 products costs about $0.21; 1,000 about $2.01. A run's usage cost only settles after the run reports SUCCEEDED — reading the dataset mid-run will undercount the eventual charge.

### How to scrape Kronans Apotek data

1. Go to this actor's page on the [Apify Store](https://apify.com/store).
2. Click **Try for free** to open it in Apify Console.
3. Leave the input empty for a full-catalogue crawl, set `maxResults`, or paste specific product URLs into `startUrls`.
4. Click **Start** and wait for the run to finish.
5. Download your data in JSON, CSV, Excel, or connect it to your workflow via the Apify API.

You can also schedule regular runs, set up webhooks for real-time notifications, or integrate the results directly into your application using the [Apify API](https://docs.apify.com/api).

### Tips and tricks

- **Start small**: test with `maxResults: 10` before running large scrapes.
- **Direct product lookups**: use `startUrls` when you already know the exact product page(s) you want, including prescription items the default crawl skips.
- **Schedule runs**: set up recurring runs to keep pricing data fresh automatically.
- **No login required**: this actor scrapes publicly available data without needing an account.

### Limitations

- Data is scraped from the public website and may change without notice.
- Prescription-only medicines are excluded from the default full-catalogue crawl (see "How the full-catalogue crawl works" above) — use `startUrls` to fetch one directly.
- Very large scraping jobs (thousands of products) take longer since each product requires its own detail-page request.
- Respect the website's terms of service and use responsibly.

### Features

- **No login required** — scrapes publicly available data from Kronans Apotek without needing credentials or cookies.
- **Structured output** — results are returned as clean JSON objects, ready for processing.
- **Full-catalogue discovery** — reads the site's own XML sitemap to reliably enumerate products, working around client-side-only listing pagination.
- **Direct product lookups** — pass exact product URLs via `startUrls` for targeted scraping.
- **Proxy support** — configurable proxy settings, though none is required by default.
- **API access** — integrate results into your workflow using the Apify API or webhooks.

### FAQ

**Is it legal to scrape Kronans Apotek?**
Web scraping of publicly available data is generally permitted. This actor only accesses information that is publicly visible to any website visitor. Always review the website's terms of service before scraping.

**Why don't all products have a category or description?**
Kronans Apotek doesn't publish a public category breadcrumb or marketing description for prescription-only medicines (a regulatory restriction on drug marketing, not a data gap in this actor). The default crawl skips these; pass the product URL via `startUrls` if you need its price/EAN anyway.

**How often should I run this scraper?**
For price monitoring or competitive intelligence, daily or weekly runs are common. Set up a [schedule](https://docs.apify.com/schedules) in Apify Console to automate this.

**Can I export the data to Google Sheets or Excel?**
Yes. After each run, you can download results in CSV, JSON, or Excel format directly from Apify Console. You can also connect results to Google Sheets using Apify integrations.

**What if the scraper stops working?**
Websites change their structure occasionally. If you notice issues, please open an issue on the actor's page. We actively maintain this scraper and fix issues promptly.

# Actor input Schema

## `startUrls` (type: `array`):

Optional list of specific Kronans Apotek PRODUCT page URLs to scrape directly (e.g. https://www.kronansapotek.se/Alvedon/p/097610/). Leave empty to crawl the full product catalogue instead: Kronans Apotek's visible category/listing pagination (?page=N) is client-side only and can't be followed by direct HTTP requests (verified live 2026-09-11), so the default crawl discovers products from the site's own XML sitemap (33,500+ product URLs) up to Max Results.

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

Maximum number of products to return from the default sitemap-driven full-catalogue crawl (ignored when Start URLs is set — then every listed URL is scraped). The catalogue has 33,500+ product pages.

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

Proxy settings. Kronans Apotek has no anti-bot protection (verified live 2026-09-11, plain HTTP works from Apify's own IPs) so the automatic Apify proxy pool is enough — no residential proxy required.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.kronansapotek.se/Alvedon/p/097610/"
    }
  ],
  "maxResults": 100,
  "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 = {
    "startUrls": [
        {
            "url": "https://www.kronansapotek.se/Alvedon/p/097610/"
        }
    ],
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/kronansapotek-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 = {
    "startUrls": [{ "url": "https://www.kronansapotek.se/Alvedon/p/097610/" }],
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/kronansapotek-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 '{
  "startUrls": [
    {
      "url": "https://www.kronansapotek.se/Alvedon/p/097610/"
    }
  ],
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call studio-amba/kronansapotek-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio-amba/kronansapotek-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/jxjTpQfOeziQM64ct/builds/JPiLuXSAsJI8YbOHs/openapi.json
