# Blocket Cars Search Scraper (`stealth_mode/blocket-cars-search-scraper`) Actor

Scrape car listings from Blocket.se — Sweden's largest marketplace — and extract 30+ fields including make, model, price, mileage, fuel type, transmission, registration number, and location. Perfect for dealers, analysts, and automotive researchers.

- **URL**: https://apify.com/stealth_mode/blocket-cars-search-scraper.md
- **Developed by:** [Stealth mode](https://apify.com/stealth_mode) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Stats:** 23 total users, 4 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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.se Cars Scraper: Extract Swedish Car Listings at Scale

***

### What Is Blocket.se?

Blocket.se is Sweden's most popular classifieds platform, with its automotive section hosting tens of thousands of used and new car listings from both private sellers and dealerships. Manually collecting pricing, mileage, or vehicle specs across hundreds of listings is impractical. The **Blocket.se Cars Scraper** automates this, turning search result pages into clean, structured datasets ready for analysis.

***

### Overview

The **Blocket Cars Scraper** targets Blocket's car search pages and extracts comprehensive listing data for each vehicle. It suits:

- **Car dealers** monitoring competitor pricing and inventory
- **Automotive analysts** tracking market trends by make, model, or region
- **Data aggregators** building used-car price indices
- **Researchers** studying the Swedish automotive resale market

The scraper supports multiple search URLs simultaneously, respects configurable item limits, and continues gracefully past failed URLs.

***

### Input Format

The Actor supports **two scraping modes** — use only **one at a time**:

1. **Scrape by URLs** — scrape data directly from a list of Blocket car search result URLs.

```json
{
  "urls": [
    "https://www.blocket.se/mobility/search/car?sort=MILEAGE_ASC&variant=1.757.2530"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 50
}
```

2. **Scrape by search filters** — scrape data using a keyword and additional filters (location, price, year, mileage, fuel type, etc.) instead of providing URLs.

```json
{
    "keyword": "suv",
    "location": "",
    "lat": "",
    "lon": "",
    "radius": "",
    "sort_by": "MILEAGE_ASC",
    "min_price": "110000",
    "max_price": "670000",
    "year_from": "1956",
    "year_to": "2026",
    "mileage_from": "5000",
    "mileage_to": "19000",
    "fuel_type": "1",
    "body_type": "2",
    "transmission": "2",
    "horsepower_from": "70",
    "horsepower_to": "",
    "weight_from": "200",
    "weight_to": "",
    "color": "6",
    "page": 1,
    "max_items_per_url": 200
}

```

There is also a **General settings** group that applies to both modes.

#### 1. Scrape by URLs

Use this mode when you already have specific Blocket car search result URLs. When this mode is used, all options in the "Scrape by search filters" section will be disabled.

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | `array` | — | One or more Blocket car search page URLs to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list. Build your search on Blocket.se — filter by brand, region, price, or sort order — then paste the resulting URL. The scraper will honour those filters. |
| `ignore_url_failures` | `boolean` | `true` | If `true`, the scraper continues running when a URL fails instead of stopping the entire run. Recommended for bulk jobs. |

#### 2. Scrape by search filters

Use this mode when you want to search using a keyword and additional filter attributes instead of scraping by URLs. If you use this mode, leave the `urls` field above empty.

| Field | Type | Default | Description |
|---|---|---|---|
| `keyword` | `string` | — | The keyword to search for. |
| `location` | `string` | — | The location to search for. Check the valid location value in the site's URL — e.g. `https://www.blocket.se/mobility/search/car?geoLocationName=Ingelsrudvegen+900` → use `Ingelsrudvegen+900`. |
| `lat` | `string` | — | The latitude to search for. |
| `lon` | `string` | — | The longitude to search for. |
| `radius` | `string` | — | The search radius, in km (range: `200`–`500000`). |
| `sort_by` | `string` (enum) | — | Sort results by: **Most relevant** (`RELEVANCE`), **Mile high–low** (`MILEAGE_DESC`), **Mile low–high** (`MILEAGE_ASC`), **Model** (`MODEL`), **Nearest** (`CLOSEST`), **Price high–low** (`PRICE_DESC`), **Price low–high** (`PRICE_ASC`), **Published** (`PUBLISHED_DESC`), **Year newest–oldest** (`YEAR_DESC`), **Year oldest–newest** (`YEAR_ASC`). |
| `min_price` | `string` | — | Minimum price, in kr (range: `0`–`700000`). |
| `max_price` | `string` | — | Maximum price, in kr (range: `0`–`700000`). |
| `year_from` | `string` | — | Start year (range: `1950`–`2027`). |
| `year_to` | `string` | — | End year (range: `1950`–`2027`). |
| `mileage_from` | `string` | — | Minimum mileage, in km (range: `0`–`20000`). |
| `mileage_to` | `string` | — | Maximum mileage, in km (range: `0`–`20000`). |
| `horsepower_from` | `string` | — | Minimum horsepower, in hp (range: `0`–`500`). |
| `horsepower_to` | `string` | — | Maximum horsepower, in hp (range: `0`–`500`). |
| `weight_from` | `string` | — | Minimum weight, in kg (range: `0`–`4000`). |
| `weight_to` | `string` | — | Maximum weight, in kg (range: `0`–`4000`). |
| `fuel_type` | `string` (enum) | — | Fuel type: **Any**, **Petrol** (`1`), **Diesel** (`2`), **El** (`4`), **Ethanol (FFV, E85)** (`2441`), **Vehicle gas (CNG)** (`3`), **Hybrid Gasoline** (`6`), **Hybrid Diesel** (`8`), **Hybrid Gas** (`5`), **Plug-in Petrol** (`1352`), **Plug-in Diesel** (`1356`). |
| `body_type` | `string` (enum) | — | Body type: **Any**, **Convertible** (`7`), **Coupé** (`6`), **Family Bus** (`5`), **3-Door Hatchback** (`1`), **5-Door Hatchback** (`2`), **Combi** (`4`), **Pickup** (`8`), **Station Wagon** (`3`), **Van** (`10`), **SUV** (`9`), **Other** (`11`). |
| `transmission` | `string` (enum) | — | Transmission: **Any**, **Automatic** (`2`), **Manual** (`1`), **Sequential** (`583`). |
| `color` | `string` (enum) | — | Color: **Any**, **Beige** (`1`), **Blue** (`2`), **Bronze** (`3`), **Brown** (`4`), **Grey** (`6`), **Green** (`5`), **Yellow** (`7`), **Gold** (`8`), **Purple** (`10`), **Orange** (`11`), **Rosa** (`12`), **Red** (`13`), **Silver** (`15`), **Black** (`14`), **Turquoise** (`16`), **White** (`9`). |
| `page` | `integer` | — | The page number to start scraping from. |

#### 3. General settings

Applies to both scraping modes above.

| Field | Type | Default | Description |
|---|---|---|---|
| `max_items_per_url` | `integer` | `20` | The maximum number of listings to collect per URL/search. Increase for broader market coverage, decrease for quick sampling. |

#### Building Your Search URL (for Scrape by URLs mode)

Navigate to [blocket.se](https://www.blocket.se), apply your desired filters (make, price range, year, region, fuel type, etc.), then copy the resulting URL from your browser. The URL encodes all parameters, including:

- `variant` — vehicle model/variant identifier
- `sort` — result ordering (e.g. `MILEAGE_ASC`)
- `geoLocationName` — location filter
- Additional filters such as price, year, and body type

> **Example use case:** The prefilled URL searches car listings sorted by mileage, low to high (`sort=MILEAGE_ASC`), for a specific vehicle variant (`variant=1.757.2530`).

***

### Output Format

**Sample output**

```json
{
  "type": "motor",
  "id": "20811148",
  "main_search_key": "SEARCH_ID_CAR_USED",
  "heading": "Citroen C3",
  "location": "Visby",
  "image": {
    "url": "https://images.blocketcdn.se/dynamic/default/item/20811148/0aa0ff0d-b4ff-4328-b0ed-51769384e067",
    "path": "item/20811148/0aa0ff0d-b4ff-4328-b0ed-51769384e067",
    "height": 3000,
    "width": 4000,
    "aspect_ratio": 1.3333333333333333
  },
  "flags": [],
  "timestamp": 1776254289000,
  "coordinates": {
    "lat": 57.59437,
    "lon": 18.52973,
    "accuracy": 5
  },
  "ad_type": 20,
  "labels": [],
  "canonical_url": "https://www.blocket.se/mobility/item/20811148",
  "extras": [],
  "price": {
    "amount": 11000,
    "currency_code": "SEK",
    "price_unit": "kr"
  },
  "year": 2006,
  "mileage": 312300,
  "mileage_unit": "SCANDINAVIAN_MILE",
  "dealer_segment": "Privat",
  "service_documents": [],
  "regno": "XWN111",
  "make": "Citroen",
  "series": "C3-Serie",
  "model": "C3",
  "model_specification": "1.6 HDi FAP Manuell",
  "transmission": "Manuell",
  "fuel": "Diesel",
  "registration_class": {
    "id": 1,
    "value": "Personbil"
  },
  "facade_title": "Citroen C3",
  "chassis_number": "VF7FC9HZC28682867",
  "sales_form": 1,
  "used_car_of_the_year": [],
  "ad_id": 20811148
}
```

Each listing returns a record with 30+ fields:

#### Identification

| Field | Meaning |
|---|---|
| `ID` | Internal Blocket listing identifier |
| `Ad ID` | Public-facing ad number |
| `Main Search Key` | Primary search index key used by Blocket |
| `Canonical URL` | Permanent URL to the individual listing |
| `Registration Number` | Swedish vehicle registration plate |
| `Chassis Number` | VIN / chassis identifier |

#### Listing Metadata

| Field | Meaning |
|---|---|
| `Type` | Record type (e.g., `car`) |
| `Ad Type` | Listing category (e.g., private sale, dealer) |
| `Heading` | Full listing title as displayed |
| `Facade Title` | Short display title used in search results |
| `Timestamp` | Date and time the listing was published or last updated |
| `Flags` | Special markers on the listing (e.g., price drop, new arrival) |
| `Labels` | Badges shown on the listing card |
| `Extras` | Additional listing metadata not covered by standard fields |

#### Location

| Field | Meaning |
|---|---|
| `Location` | City or region of the seller |
| `Coordinates` | Latitude/longitude of the listing location |

#### Pricing & Sale

| Field | Meaning |
|---|---|
| `Price` | Listed asking price (in SEK) |
| `Sales Form` | How the car is sold (e.g., fixed price, bidding) |
| `Dealer Segment` | Whether the seller is a private individual or a dealership |

#### Vehicle Specifications

| Field | Meaning |
|---|---|
| `Make` | Manufacturer (e.g., Volvo, BMW, Toyota) |
| `Series` | Model series or line (e.g., 3-Series, V-Series) |
| `Model` | Specific model name (e.g., V60, 320i) |
| `Model Specification` | Trim or variant detail (e.g., R-Design, xDrive) |
| `Year` | Model year of the vehicle |
| `Mileage` | Distance driven by the vehicle |
| `Mileage Unit` | Unit of mileage measurement (typically `km`) |
| `Transmission` | Gearbox type (e.g., Manual, Automatic) |
| `Fuel` | Fuel type (e.g., Petrol, Diesel, Electric, Hybrid) |
| `Registration Class` | Swedish vehicle registration category |

#### Quality & Trust Signals

| Field | Meaning |
|---|---|
| `Service Documents` | Whether full service history documentation is available |
| `Used Car Of The Year` | Whether the vehicle carries this award designation |
| `Image` | URL of the primary listing photo |

***

### How to Use

1. **Build your search** — Go to Blocket.se cars, apply your filters (brand, region, price, fuel, etc.), then copy the full URL from your browser.
2. **Configure input** — Paste one or more URLs into the `urls` array. Set `max_items_per_url` based on how many listings you need.
3. **Run the scraper** — Start the actor. For large runs, keep `ignore_url_failures: true` to avoid interruptions.
4. **Export** — Download results as JSON, CSV, or Excel for use in spreadsheets, databases, or BI tools.

**Common issues:**

- Ensure URLs point to **search result pages**, not individual listing pages.
- Blocket search URLs include filter state — verify filters are correct before running.
- For nationwide data, run multiple regional URLs in one job.

***

### Use Cases & Business Value

- **Pricing intelligence:** Track average market prices by make/model/year across Sweden
- **Inventory monitoring:** Watch how long specific vehicles stay listed
- **Dealer benchmarking:** Compare dealer vs. private seller pricing for the same model
- **Mileage analysis:** Identify low-mileage vehicles matching specific criteria at scale

***

### Conclusion

The **Blocket.se Cars Scraper** gives automotive professionals and researchers direct access to one of Scandinavia's richest used-car datasets. With detailed vehicle specs, pricing, location, and trust signals across 30+ fields, it removes hours of manual work and delivers market-ready data on demand.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the Cars list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped.

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

Enter the keyword to search for items

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

Enter the location (Check valid location in the site's URL, e.g: https://www.blocket.se/mobility/search/car?geoLocationName=Ingelsrudvegen+900 -> use Ingelsrudvegen+900) to search for items

## `lat` (type: `string`):

Enter the latitude to search for items

## `lon` (type: `string`):

Enter the longitude to search for items

## `radius` (type: `string`):

Enter the radius to search for items

## `sort_by` (type: `string`):

Sort items by options

## `min_price` (type: `string`):

Enter the min price to search for items

## `max_price` (type: `string`):

Enter the max price to search for items

## `year_from` (type: `string`):

Enter the year from to search for items

## `year_to` (type: `string`):

Enter the year to to search for items

## `mileage_from` (type: `string`):

Enter the mileage from to search for items

## `mileage_to` (type: `string`):

Enter the mileage to to search for items

## `horsepower_from` (type: `string`):

Enter the horsepower from to search for items

## `horsepower_to` (type: `string`):

Enter the horsepower to to search for items

## `weight_from` (type: `string`):

Enter the weight from to search for items

## `weight_to` (type: `string`):

Enter the weight to to search for items

## `fuel_type` (type: `string`):

Enter the fuel type to search for items

## `body_type` (type: `string`):

Enter the body type to search for items

## `transmission` (type: `string`):

Enter the transmission to search for items

## `color` (type: `string`):

Enter the color to search for items

## `page` (type: `integer`):

Specify the page number to start scraping from

## `max_items_per_url` (type: `integer`):

The maximum number of items to scrape per URL.

## Actor input object example

```json
{
  "urls": [
    "https://www.blocket.se/mobility/search/car?sort=MILEAGE_ASC&variant=1.757.2530"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}
```

# 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 = {
    "urls": [
        "https://www.blocket.se/mobility/search/car?sort=MILEAGE_ASC&variant=1.757.2530"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("stealth_mode/blocket-cars-search-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 = {
    "urls": ["https://www.blocket.se/mobility/search/car?sort=MILEAGE_ASC&variant=1.757.2530"],
    "ignore_url_failures": True,
    "max_items_per_url": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("stealth_mode/blocket-cars-search-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 '{
  "urls": [
    "https://www.blocket.se/mobility/search/car?sort=MILEAGE_ASC&variant=1.757.2530"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}' |
apify call stealth_mode/blocket-cars-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,stealth_mode/blocket-cars-search-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/uCpOfXgMa9ocI5EXE/builds/Bee8Yn1EvsgJDVPJm/openapi.json
