# Blocket Scraper: Sweden Marketplace Listings (`reventadata/blocket-scraper`) Actor

Scrape Blocket.se, Sweden's biggest marketplace, by search term. Title, price in SEK, location with coordinates, posting time, private or retailer seller, shipping and buy-now flags, photos, plus brand and memory size where listed. Unofficial.

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

## Pricing

from $1.00 / 1,000 results

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 (Sweden): second-hand ads from blocket.se

> **Unofficial.** This Actor is not affiliated with, authorised by, endorsed by, or in any way officially
> connected to Blocket or Vend. "Blocket" is a trademark of its respective owner and is used here only to
> describe what this tool reads. It reads the same public search results a browser does.

Blocket Scraper searches the "Torget" second-hand marketplace on blocket.se (Sweden) and returns one
structured row per ad: title, price in SEK, town, listing time, seller kind, shipping flags, images and the ad link, plus brand, memory size and
shop name where the ad has them.

### What does it do?

For each search term it walks the site's own public search results, page by page (53 ads a page, up to
50 pages, 2,650 ads per search term), and saves the ads to the dataset. Category, county, seller kind, ad type
and price range are applied by the site itself, so the pages you fetch already match your filters.

### Why use it?

- **Structured columns:** price as a number, listing time as an ISO timestamp, seller and shipping as true/false.
- **Light:** no browser and no proxy needed.
- **Public data only:** the rows hold what the search results show, including a company's shop name when it
  sells as a company; nothing from behind a login.

### How to use it

1. Give one or more search terms in `searchQueries`.
2. Optionally narrow by category, county, seller kind, ad type and price range.
3. Run the Actor and download the dataset as JSON, CSV, Excel or NDJSON.

#### Input

| Field | Type | Description |
|---|---|---|
| `searchQueries` | array | One search per term. |
| `category` | string | One of the 11 top-level categories, or `any`. |
| `location` | string | One of the 21 Swedish counties, or `any`. |
| `sellers` | string | `any`, `private` or `company`. |
| `tradeType` | string | `sell` (default), `giveaway`, `wanted` or `any`. |
| `minPrice`, `maxPrice` | integer | Inclusive price bounds in SEK, applied by the site. |
| `shippingOnly` | boolean | Keep only ads marked "Kan skickas". |
| `excludeForParts` | boolean | Drop ads whose title says "Reservdel..." or "iCloud-låst". |
| `requireKeywordMatch` | boolean | Drop ads where a search word is missing from title and brand (default on). |
| `maxItems` | integer | Cap on rows saved across all terms. |
| `maxPages` | integer | Pages per term, 1 to 50. |
| `proxyConfiguration` | object | Optional. Off by default. |

#### Sample input

```json
{
    "searchQueries": ["iphone"],
    "maxItems": 10
}
```

#### Output

| Field | Type | Description |
|---|---|---|
| `id` | string | Blocket ad id. |
| `title` | string | Ad heading. |
| `url` | string | Canonical ad URL. |
| `price` | number / null | Asking price. |
| `currency` | string | `SEK`. |
| `location` | string / null | Town or area. |
| `postedAt` | string / null | Listing time, ISO 8601 UTC. |
| `latitude`, `longitude` | number / null | Approximate position; null when the ad has none. |
| `imageUrls` | array | Image URLs. |
| `isPrivate`, `isRetailer` | boolean | The site's own seller flags. |
| `shippingAvailable`, `sellerPaysShipping`, `buyNow` | boolean | Shipping and direct-purchase flags. |
| `labels` | array | The site's badges in Swedish, e.g. `Privat`, `Kan skickas`. |
| `brand`, `memorySize` | string / null | Where the ad's category has them (phones, for example). |
| `organisationName` | string / null | Shop name, on company ads. |
| `tradeType` | string / null | Ad type as the site words it, e.g. `Säljes`. |
| `matchedKeyword` | string | The search term that returned the ad. |
| `site` | string | `SE`. |
| `scrapedAt` | string | ISO 8601 timestamp of the scrape. |

#### Sample output

One row from a real platform run on 2026-11-11 (search `iphone`; `imageUrls` shortened to 2 items):

```json
{
  "id": "28151659",
  "title": "Apple iPhone 11 64gb. 85% batterihälsa",
  "url": "https://www.blocket.se/recommerce/forsale/item/28151659",
  "price": 700,
  "currency": "SEK",
  "location": "Borlänge",
  "postedAt": "2026-11-11T03:47:20+00:00",
  "latitude": 60.48075,
  "longitude": 15.43271,
  "imageUrls": [
    "https://images.blocketcdn.se/dynamic/default/item/28151659/d011ce94-4b47-4425-8d89-2427c24e52c5",
    "https://images.blocketcdn.se/dynamic/default/item/28151659/41b252f3-14c2-48a9-813c-16c0915b6200"
  ],
  "isPrivate": true,
  "isRetailer": false,
  "shippingAvailable": true,
  "sellerPaysShipping": false,
  "buyNow": false,
  "labels": [
    "Kan skickas",
    "Privat"
  ],
  "brand": "Apple",
  "memorySize": "64 GB",
  "organisationName": null,
  "tradeType": "Säljes",
  "matchedKeyword": "iphone",
  "site": "SE",
  "scrapedAt": "2026-11-11T06:37:10.891087+00:00"
}
```

### Limits

- The site serves at most 50 pages per search: 2,650 ads. To go further, split a search by category, county,
  seller kind or price range.
- Ads are returned in the site's default relevance order. The Actor does not send a sort option, because the
  site's robots.txt disallows it.
- The result list carries no ad description, seller name for private sellers, or condition; those are not in the rows.

### Privacy & Compliance

This Actor reads only publicly accessible search results and returns the public data they show. It sends no
login. Check the site's terms and your local law before using the data.

# Actor input Schema

## `searchQueries` (type: `array`):

One search per term across blocket.se (Sweden), the site's 'Torget' second-hand marketplace. Several words in one term must all appear in the ad title or brand when 'Require the query in the title' is on.

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

Optional top-level category. Narrows every search term to that category. Any category searches all of Torget.

## `location` (type: `string`):

Optional Swedish county (län). Any county searches the whole country.

## `sellers` (type: `string`):

Private sellers only, companies only, or both. The site decides who is a company (its own 'Företag' label).

## `tradeType` (type: `string`):

Blocket mixes ads for sale with give-away ads and wanted ads ('Köpes'). For sale is almost always what you want.

## `minPrice` (type: `integer`):

Optional, inclusive. Applied by the site itself. Must not be above the maximum price.

## `maxPrice` (type: `integer`):

Optional, inclusive. Applied by the site itself.

## `shippingOnly` (type: `boolean`):

Keeps only ads marked 'Kan skickas' (can be shipped). Applied after fetching, so a run with this on fetches more pages per row kept.

## `excludeForParts` (type: `boolean`):

Drops ads whose title says 'Reservdel...' (spare parts) or 'iCloud-låst' (iCloud-locked). Only those two phrases are recognised, because they are the only damage wording confirmed on the site so far. Off by default.

## `requireKeywordMatch` (type: `boolean`):

Drops ads where a word of the search term is missing from both the title and the brand. The site also matches the ad description, which the result list does not show, so a search for a phone returns accessories and unrelated ads too.

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

Hard cap on rows saved across all search terms.

## `maxPages` (type: `integer`):

53 ads a page. The site serves at most 50 pages (2,650 ads) per search, so this is clamped to 50. Narrow the search with category, county, seller or price to go beyond that.

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

Optional. Left off by default; only turn it on if you see request failures.

## Actor input object example

```json
{
  "searchQueries": [
    "iphone"
  ],
  "category": "any",
  "location": "any",
  "sellers": "any",
  "tradeType": "sell",
  "shippingOnly": false,
  "excludeForParts": false,
  "requireKeywordMatch": true,
  "maxItems": 10,
  "maxPages": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Items scraped from the target website.

# 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 = {
    "searchQueries": [
        "iphone"
    ],
    "maxItems": 10,
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("reventadata/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 = {
    "searchQueries": ["iphone"],
    "maxItems": 10,
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("reventadata/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 '{
  "searchQueries": [
    "iphone"
  ],
  "maxItems": 10,
  "maxPages": 1
}' |
apify call reventadata/blocket-scraper --silent --output-dataset

```

## MCP server setup

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