# Blocket Scraper — Sweden Classifieds & Prices (`crawloop/blocket-scraper`) Actor

Blocket scraper for Swedish classifieds. Each row has the SEK price, location, year, mileage, seller type, and photos for cars, phones, boats, and general for-sale ads. Export JSON or monitor new ads.

- **URL**: https://apify.com/crawloop/blocket-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 listings

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

## Blocket Scraper

> **Disclaimer:** Unofficial tool — not affiliated with, sponsored by, or endorsed by Blocket AB or its affiliates. Data is read from publicly accessible search and listing pages only. No login. You are responsible for complying with applicable law (including GDPR where personal data appears) and the site’s terms. No warranty on accuracy or availability. Provided for informational and research use.

**Blocket scraper** for Swedish classifieds. Each row is one listing: asking price in SEK, location, seller type, description, and photos. Cars add year and mileage. Search by keyword or category, or paste a results URL. Use it as a **Blocket scraper** and **Blocket API alternative** from **Python**, **Node.js**, **cURL**, or **Apify MCP**, and export the dataset as JSON.

**Best for:** phone and general for-sale comps, used cars, boats, and a scheduled run that saves only new ads and price changes.

| Actor | Role |
| :--- | :--- |
| Blocket Scraper ◄── you are here | Sweden classifieds: SEK price, location, year, mileage, new-ad monitor |
| [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper) | Germany classifieds |
| [Tutti.ch Scraper](https://apify.com/crawloop/tutti-ch-scraper) | Switzerland classifieds |
| [Gumtree Scraper](https://apify.com/crawloop/gumtree-scraper) | UK classifieds |
| [Leboncoin Scraper](https://apify.com/crawloop/leboncoin-scraper) | France classifieds |
| [Marktplaats Scraper](https://apify.com/crawloop/marktplaats-scraper) | Netherlands classifieds |
| [eBay Sold Listings Scraper](https://apify.com/crawloop/ebay-sold-listings-scraper) | Sold comps for the same goods |

### When to use this Actor

- **A keyword** — Set Keyword to iphone and leave Search URLs empty. For sale is the default section.
- **Cars, boats, motorcycles, or caravans** — Pick the category. Leave Keyword empty to browse that section, or add a make.
- **A results page you already opened** — Paste the search URL. Keyword and category are ignored when Search URLs is set.
- **One listing** — Paste the listing URL. The run saves that page.
- **New ads and price cuts** — Turn on monitor mode and schedule the same search. The first run stores a baseline and saves nothing. Later runs save new listing ids and price changes.

### When not to use this Actor

- **Phone numbers** — The contact button is not called. A number the seller typed into the description stays inside `description`.
- **A national dump in one run** — Cap `maxItems` (200). Split by category or keyword.
- **Logged-in seller tools** — This Actor reads public pages only.

### Key features

- **Search and listing pages** — Title, SEK price, location, description, and photos. Cars include year, mileage in Swedish mil, transmission, and color. Default **256 MB**. Direct HTTP. No browser.
- **Keyword or category** — For sale, cars, boats, motorcycles, and caravans.
- **Pasted URL** — Search URLs and single listing pages.
- **Private versus business** — `sellerType` is `private` or `business` when the public page says so.
- **Monitor** — Named key-value store of listing id and last price for that search. The seed run does not open listing pages.

### Input

| Field | Required | Default | What it does |
| :--- | :--- | :--- | :--- |
| Search or listing URLs | No | — | Wins over the filters below. |
| Keyword | No | iPhone on For sale | Search text. For sale with an empty keyword searches for iPhone. |
| Category | No | For sale | Section used when Search URLs is empty. |
| Open listing pages | No | on | Description, location, photos, and public specs. Same saved row. |
| Maximum listings | No | 40 | Rows to save, up to 200. |
| Monitor mode | No | off | Baseline first, then new ids and price changes. |
| Monitor state store | No | blocket-monitor | Named store for the baseline. |
| Proxy | No | off | Turn it on if a run is blocked. |

```json
{
  "keyword": "iphone",
  "category": "forsale",
  "includeListingDetails": true,
  "maxItems": 40,
  "monitorMode": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### Output

| Field | Meaning |
| :--- | :--- |
| `id` | Listing id |
| `url` | Public listing page |
| `title` | Listing title |
| `price` | Asking price in SEK |
| `currency` | `SEK` |
| `location` | Place or postal area on the listing page |
| `postalCode` | Five-digit code when the address starts with one |
| `latitude`, `longitude` | Map point from the public map link |
| `category` | Category path |
| `brand`, `model` | Brand and model when the page shows them |
| `year` | Model year |
| `mileageMil` | Odometer in Swedish mil (1 mil = 10 km) |
| `transmission`, `fuel`, `color` | Specs printed on the listing |
| `sellerType` | `private` or `business` |
| `description` | Listing description |
| `image`, `images` | First photo, then the photo list |
| `attributes` | Other public spec pairs |
| `changeType` | `new` or `price_change` on monitor runs |
| `previousPrice` | Prior asking price when `changeType` is `price_change` |
| `scrapedAt` | UTC timestamp |

```json
{
  "id": "27232101",
  "url": "https://www.blocket.se/recommerce/forsale/item/27232101",
  "title": "Iphone 11",
  "price": 300,
  "currency": "SEK",
  "location": "27333 Tomelilla",
  "postalCode": "27333",
  "brand": "Apple",
  "sellerType": "private",
  "description": "Hel och fin telefon utan repor."
}
```

### Use cases

- Compare asking prices for a phone model and keep location and seller type.
- Pull used cars with year, mileage, transmission, and the public SEK price.
- Schedule monitor mode each morning and export only listings whose price moved.
- For sold comps on the same goods, run [eBay Sold Listings Scraper](https://apify.com/crawloop/ebay-sold-listings-scraper). For Germany, run [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper).

### Integration examples

Replace `APIFY_TOKEN`. The slug below is the Store name.

#### Node.js

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("crawloop/blocket-scraper").call({
  keyword: "iphone",
  maxItems: 40,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("crawloop/blocket-scraper").call(run_input={
    "category": "cars",
    "keyword": "volvo",
    "maxItems": 40,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(len(items))
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/crawloop~blocket-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"iphone","maxItems":40}'
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp).
Connect your Apify account, then call this Actor by its Store name `crawloop/blocket-scraper`.

Example prompts:

- "Run Blocket Scraper for iphone and return price, location, and seller type as JSON"
- "Scrape Blocket cars for Volvo and summarize year, mileage, and asking price"
- "Run Blocket Scraper in monitor mode for iphone, then use eBay Sold Listings Scraper for sold comps"

### Suite next step

This Actor covers Swedish classifieds. For sold prices on the same goods, run [eBay Sold Listings Scraper](https://apify.com/crawloop/ebay-sold-listings-scraper). For another country’s classifieds, run [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper) or [Tutti.ch Scraper](https://apify.com/crawloop/tutti-ch-scraper).

### FAQ

**Does this open every listing page?**
Yes, when Open listing pages is on. Monitor seed runs skip those pages and save nothing. Turn the option off to keep the search card only.

**Which categories are included?**
For sale, cars, boats, motorcycles, and caravans. A pasted search URL can target any public results page.

**What if the run is blocked?**
Turn the proxy on and retry. If datacenter is still blocked, switch the proxy to residential.

**What does monitor mode skip?**
Listing ids already stored for that same search, unless the asking price changed. A quiet tick writes zero rows. The first run only fills the baseline.

**Are phone numbers included?**
The contact button is not called. A number written in the description stays in `description`.

**How do I export the rows?**
The run writes one listing per dataset row. Download JSON, CSV, or Excel from that dataset, or read it with the Node.js, Python, and cURL examples.

# Actor input Schema

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

Blocket search or listing URLs. When this list is set, keyword and category are ignored.

## `keyword` (type: `string`):

Search text. On For sale with an empty keyword, the run searches for iPhone. Cars, boats, motorcycles, and caravans can be left blank to browse that section.

## `category` (type: `string`):

Section used when Search URLs is empty.

## `includeListingDetails` (type: `boolean`):

Fetch each saved listing for the description, location, photos, and public specs. The same listing event covers the card and the page. Monitor seed runs do not open listing pages.

## `maxItems` (type: `integer`):

How many listings to save. Monitor mode examines this many cards and saves only new ids and price changes.

## `monitorMode` (type: `boolean`):

The first run for a search stores a baseline and saves nothing. Later runs save new listings and price changes only.

## `monitorStateStore` (type: `string`):

Named key-value store that keeps the baseline between scheduled runs.

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

Off by default. Turn the proxy on if a run is blocked, and switch to residential only if datacenter is still blocked.

## Actor input object example

```json
{
  "category": "forsale",
  "includeListingDetails": true,
  "maxItems": 40,
  "monitorMode": false,
  "monitorStateStore": "blocket-monitor",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Default dataset items — one listing per row.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/blocket-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("crawloop/blocket-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 '{}' |
apify call crawloop/blocket-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawloop/blocket-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/T3rODTqRrxkwqqtl1/builds/1scV85G5SzC83Xw5a/openapi.json
