# Blocket.se Scraper (`solidcode/blocket-scraper`) Actor

\[💰 $3.0 / 1K] Extract classified ads from Blocket.se — Sweden's biggest second-hand marketplace. Search cars, motorcycles, electronics, furniture, and more. Filter by county, category, price, seller type, and recency.

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

## Pricing

from $3.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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Blocket.se Scraper

Pull classified ads from Blocket.se — Sweden's largest second-hand marketplace — at scale, complete with prices in SEK, GPS coordinates, postal codes, full image galleries, seller details, and rich vehicle specs (make, model, year, mileage in km, fuel, gearbox, registration number, horsepower) plus a dedicated boat spec set (hull type, length, beam, top speed, engine type). Built for Swedish e-commerce sellers tracking resale prices, used-car dealers monitoring the Nordic vehicle market, and analytics teams studying Scandinavian consumer behavior without scraping HTML page by page.

### Why This Scraper?

- **All 21 Swedish counties (län) mapped** — full nationwide coverage from Stockholms län to Norrbottens län, selectable by human-readable county name (not the raw `0.30000`-series codes).
- **14 categories, including 3 vehicle verticals** — Cars (Bilar) and Motorcycles (MC) pull make, model, year, mileage in km, fuel, gearbox, registration number and horsepower; Boats (Båtar) swap in a purpose-built set of 8 marine specs: hull type across 15 classes (Yacht, Flybridge, RIB, Daycruiser, Segelbåt/Motorseglare), length in feet, beam in cm, top speed in knots, engine type, engine horsepower, fuel and hull material.
- **Native `mil` → kilometres conversion** — Blocket's mobility API returns odometer readings in *Scandinavian mile* (1 mil = 10 km). Every vehicle row is normalized to kilometres so your spreadsheet doesn't lie to you.
- **Up to ~2,650 marketplace ads or ~2,500 vehicle ads per keyword query** — the actor pages through Blocket's full result set automatically, with no manual offset juggling.
- **Five wired-in filters** — price range (SEK), seller type (private vs business vs both), shipping-only (Blocket Frakt), recency window (last 24 hours / 3 / 7 / 9 days), and sort order (newest / cheapest / most expensive) all pushed straight into Blocket's search API.
- **Multi-keyword search + URL-paste mode** — drop in any list of search terms for guided runs, or paste exact Blocket.se URLs (search pages, category pages, or individual ads) for power-user control.
- **43 structured fields per ad, identical on every row** — marketplace ads and vehicle ads come back with the same column set, so a mixed export never shifts columns. Includes latitude/longitude, postal code, the full image array and the seller's profile URL.
- **Body type on every car, hull class on every boat** — cars carry all 11 of Blocket's own body types (Kombi, SUV, Sedan, Halvkombi 3- and 5-dörrar, Familjebuss, Coupé, Cabriolet, Pickup, Skåpbil, Annat), motorcycles 17 riding types, boats 15 hull classes. Filled on 100% of car rows.
- **English values in every category column** — fuel, gearbox, condition, engine type and hull material all come back as a fixed English vocabulary (`petrol`, `automatic`, `like-new`, `outboard`, `fiberglass`), never a mix of Swedish and English you have to clean up.
- **Cross-keyword deduplication by ad ID** — run ten overlapping queries and every ad still appears exactly once in your dataset.

### Use Cases

**Pricing Intelligence & Competitive Analysis**

- Track resale prices for iPhones, Samsung, MacBooks across Swedish counties
- Benchmark your own marketplace prices against live Blocket listings
- Spot underpriced inventory by sorting cheapest-first within a price band

**Used-Vehicle Market Research**

- Monitor the Swedish used-car market by make, model, and county
- Build mileage-vs-price curves for specific Audi, Volvo, or BMW models
- Track boat and motorcycle inventory ahead of the spring buying season

**Lead Generation**

- Build seller contact lists from business dealers across all 21 counties
- Surface car dealerships with the largest active inventory in a given län
- Identify private sellers liquidating high-value electronics or furniture

**Real-Estate & Second-Hand Goods Market Studies**

- Quantify second-hand inventory volume by category and region
- Study price-decay curves for consumer electronics over the 9-day recency window
- Compare urban vs rural pricing for furniture and household goods

**Regional & Demographic Trend Analysis**

- Map second-hand activity by county to identify high-turnover regions
- Compare per-capita listing density across Sweden's 21 län
- Detect seasonal patterns in sport, hobby, and outdoor categories

### Getting Started

#### Simple Keyword Search

```json
{
    "searchQueries": ["iphone"]
}
```

#### Region & Price-Filtered Search

```json
{
    "searchQueries": ["soffa"],
    "region": "stockholm",
    "priceMin": 500,
    "priceMax": 3000
}
```

#### Vehicle Search (cheapest first, last 7 days)

```json
{
    "searchQueries": ["audi a4"],
    "category": "cars",
    "publishedWithin": "7",
    "sortBy": "price-asc",
    "maxResults": 200
}
```

#### Paste a Blocket.se URL

```json
{
    "startUrls": [
        "https://www.blocket.se/annonser/hela_sverige?q=cykel"
    ],
    "maxResults": 50
}
```

### Input Reference

#### Search

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQueries` | string\[] | `["iphone"]` | Keywords to search for (Swedish or English — both work). Each keyword runs as its own search; ads matching multiple keywords are deduplicated by ID. |
| `category` | select | `All categories` | One of: All categories, Cars (Bilar), Motorcycles (MC / Mopeder), Boats (Båtar), Electronics (Elektronik), Furniture & Home (Möbler & Hem), Fashion (Kläder & Accessoarer), Sports & Outdoor (Sport & Fritid), Hobby & Collectibles (Hobby & Samlarprylar), Kids & Baby (Barn & Baby), Pets (Husdjur), Art & Antiques (Konst & Antikt), Garden & Renovation (Trädgård & Renovering), Vehicle Parts (Bildelar & Tillbehör), Business Equipment (Företagsutrustning). Vehicle categories unlock the richer mobility schema. |
| `region` | select | `All of Sweden` | One of 21 Swedish counties: Stockholms län, Uppsala län, Södermanlands län, Östergötlands län, Jönköpings län, Kronobergs län, Kalmar län, Gotlands län, Blekinge län, Skåne län, Hallands län, Västra Götalands län, Värmlands län, Örebro län, Västmanlands län, Dalarnas län, Gävleborgs län, Västernorrlands län, Jämtlands län, Västerbottens län, Norrbottens län — or All of Sweden. |

#### Sorting & Filters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `sortBy` | select | `Newest first` | Order: Newest first (default), Cheapest first, or Most expensive first. |
| `priceMin` | integer | none | Minimum price in Swedish kronor (SEK). |
| `priceMax` | integer | none | Maximum price in Swedish kronor (SEK). |
| `sellerType` | select | `All sellers` | All sellers, Private sellers only, or Business / dealers only. |
| `shippingOnly` | boolean | `false` | Only include ads where the seller offers Blocket Frakt (shipping). |
| `publishedWithin` | select | `Any time` | Recency window: Any time, Last 24 hours, Last 3 days, Last 7 days, or Last 9 days. |

#### Advanced Search (optional)

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | URL\[] | `[]` | Paste Blocket.se URLs directly. A search-result page is scanned up to your limit; a single ad page returns exactly that one ad. Dealer and shop pages aren't supported and are skipped with a note in the log. When provided, these override the Search / Filters fields above. |

#### Limits

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxResults` | integer | `100` | Maximum number of ads to collect across all searches. Set to 0 for no cap (an internal safety limit of 100,000 still applies). |

### Output

One row per ad, flat schema. Vehicle-specific fields are populated only for Cars, Motorcycles, and Boats — they are `null` for marketplace categories.

#### Marketplace Ad Example

```json
{
    "id": "25911826",
    "url": "https://www.blocket.se/recommerce/forsale/item/25911826",
    "title": "iPhone 14",
    "description": "Skärmskydd monterat sedan ny. Ej låst. Batterihälsa 80%.",
    "price": 3000,
    "currency": "SEK",
    "priceText": "3000 kr",
    "category": "Electronics",
    "subcategory": "Mobiltelefoner",
    "region": "Norrbottens län",
    "regionSlug": "norrbotten",
    "city": "Öjebyn",
    "zipCode": "94332",
    "latitude": 65.32655,
    "longitude": 21.413,
    "sellerName": null,
    "sellerType": "private",
    "sellerUrl": null,
    "shipping": true,
    "condition": "used",
    "conditionGrade": "good",
    "brand": "Apple",
    "imageUrl": "https://images.blocketcdn.se/dynamic/default/item/25911826/b59ddf11-9fc1-42cd-9922-2b6b2fbbd196",
    "imageUrls": [
        "https://images.blocketcdn.se/dynamic/default/item/25911826/b59ddf11-9fc1-42cd-9922-2b6b2fbbd196",
        "https://images.blocketcdn.se/dynamic/default/item/25911826/2d904812-55b7-4b7a-83a9-1b8269e75ad8"
    ],
    "make": null,
    "model": null,
    "modelSpec": null,
    "year": null,
    "mileage": null,
    "fuel": null,
    "gearbox": null,
    "regno": null,
    "horsepower": null,
    "engineType": null,
    "engineVolumeCc": null,
    "lengthFeet": null,
    "widthCm": null,
    "topSpeedKnots": null,
    "hullMaterial": null,
    "publishedAt": "2026-08-21T17:07:18Z",
    "searchQuery": "iphone",
    "sourceListUrl": "https://www.blocket.se/...",
    "scrapedAt": "2026-08-22T01:39:09.759110Z"
}
```

#### Vehicle Ad Example

```json
{
    "id": "987654321",
    "url": "https://www.blocket.se/mobility/item/987654321",
    "title": "Audi A4 Avant 2.0 TDI quattro S-line",
    "description": "Välskött Audi A4 Avant från 2018. Servad enligt schema, ny besiktning utan anmärkning.",
    "price": 189000,
    "currency": "SEK",
    "priceText": "189000 kr",
    "category": "Cars",
    "subcategory": "Kombi",
    "region": "Västra Götalands län",
    "regionSlug": "vastra-gotaland",
    "city": "Göteborg",
    "zipCode": "41121",
    "latitude": 57.7089,
    "longitude": 11.9746,
    "sellerName": "Bilhuset Väst AB",
    "sellerType": "business",
    "sellerUrl": "https://www.blocket.se/mobility/dealer/7214",
    "shipping": false,
    "condition": "used",
    "conditionGrade": null,
    "brand": null,
    "imageUrl": "https://i.blocketcdn.se/pictures/mobility/audi_main.jpg",
    "imageUrls": [
        "https://i.blocketcdn.se/pictures/mobility/audi_1.jpg",
        "https://i.blocketcdn.se/pictures/mobility/audi_2.jpg"
    ],
    "make": "Audi",
    "model": "A4",
    "modelSpec": "Avant 2.0 TDI quattro",
    "year": 2018,
    "mileage": 87500,
    "fuel": "diesel",
    "gearbox": "automatic",
    "regno": "ABC123",
    "horsepower": 190,
    "engineType": null,
    "engineVolumeCc": 1968,
    "lengthFeet": null,
    "widthCm": null,
    "topSpeedKnots": null,
    "hullMaterial": null,
    "publishedAt": "2026-05-26T08:45:00Z",
    "searchQuery": "audi a4",
    "sourceListUrl": "https://www.blocket.se/...",
    "scrapedAt": "2026-05-28T09:15:33Z"
}
```

#### Core Ad Fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Blocket ad ID — unique identifier. |
| `url` | string | Canonical ad URL on Blocket.se. |
| `title` | string | Ad headline as written by the seller. |
| `description` | string | Full free-text body of the ad. |
| `price` | number | Numeric price in SEK. `null` for "Pris på förfrågan" (price on request). |
| `currency` | string | Always `"SEK"`. |
| `priceText` | string | Price as displayed (e.g. `"6500 kr"` or `"Pris på förfrågan"`). |
| `category` | string | Human-readable top-level category (e.g. `"Electronics"`, `"Cars"`). |
| `subcategory` | string | Blocket's own sub-classification: the marketplace leaf category on goods (e.g. `"Mobiltelefoner"`), the body type on cars, the riding type on motorcycles, and the hull class on boats. |
| `condition` | string | `"new"`, `"used"`, or `null`. Only genuinely unused items are `"new"` — "like new" second-hand goods are `"used"`. |
| `conditionGrade` | string | Blocket's own five-step grade on marketplace ads: `"new"`, `"like-new"`, `"good"`, `"fair"`, `"for-parts"`, or `null`. |
| `brand` | string | Brand name for branded goods (marketplace categories). |
| `publishedAt` | string | ISO 8601 timestamp of when the ad was posted. |
| `scrapedAt` | string | ISO 8601 timestamp of when the row was collected. |
| `searchQuery` | string | The keyword that surfaced this ad (for traceability). |
| `sourceListUrl` | string | Traceability reference back to where this row came from: the exact search that surfaced the ad, or — when you paste a single ad page into `startUrls` — that ad's own URL. Abbreviated in the examples above. |

#### Location Fields

| Field | Type | Description |
|-------|------|-------------|
| `region` | string | The county the ad itself is in, as a Swedish county name (e.g. `"Stockholms län"`). Filled on every run, including nationwide ones. |
| `regionSlug` | string | The same county as the value the `region` input accepts (e.g. `"stockholm"`), so you can feed a row straight back into a narrower search. |
| `city` | string | City or town name. |
| `zipCode` | string | Swedish postal code, when published. |
| `latitude` | number | GPS latitude. |
| `longitude` | number | GPS longitude. |

#### Seller & Shipping

| Field | Type | Description |
|-------|------|-------------|
| `sellerName` | string | Dealer or shop name. Blocket keeps private sellers anonymous, so this is filled on business ads only and is empty on every private ad. |
| `sellerType` | string | `"private"` or `"business"`. |
| `sellerUrl` | string | Link to the dealer or shop page on Blocket. Business ads only, across every category including boats — private sellers have no public page, so this is empty on their ads. |
| `shipping` | boolean | `true` when the seller offers Blocket Frakt shipping. |

#### Images

| Field | Type | Description |
|-------|------|-------------|
| `imageUrl` | string | URL of the primary listing photo. |
| `imageUrls` | string\[] | Array of every photo URL on the ad (typically 1–20). |

#### Vehicle-Only Fields

Populated for Cars, Motorcycles, and Boats. `null` for all other categories.

| Field | Type | Description |
|-------|------|-------------|
| `subcategory` | string | Body type on cars — one of 11: `"Kombi"`, `"SUV"`, `"Sedan"`, `"Halvkombi 5-dörrar"`, `"Halvkombi 3-dörrar"`, `"Familjebuss"`, `"Coupé"`, `"Cabriolet"`, `"Pickup"`, `"Skåpbil"`, `"Annat"`. Riding type on motorcycles (`"Touring"`, `"Cruiser"`, `"Adventure"`, `"Sport"` and 13 more) and hull class on boats. |
| `make` | string | Manufacturer (e.g. `"Audi"`, `"Volvo"`, `"Yamaha"`, `"Princess"`). |
| `model` | string | Model name (e.g. `"A4"`, `"XC60"`, `"S72"`). |
| `modelSpec` | string | Variant / trim string (e.g. `"Avant 2.0 TDI quattro"`). Cars only. |
| `year` | number | Model year. `null` when the seller left it blank. |
| `mileage` | number | Odometer reading in **kilometres** (normalized from Blocket's native *mil* unit). Cars and motorcycles. |
| `fuel` | string | One of eight normalized values: `"petrol"`, `"diesel"`, `"electric"`, `"hybrid"`, `"plug-in hybrid"`, `"ethanol"`, `"gas"`, `"other"`. Cars, motorcycles and boats. |
| `gearbox` | string | One of three normalized values: `"manual"`, `"automatic"`, `"sequential"`. Cars only. |
| `regno` | string | Swedish vehicle registration number. |
| `horsepower` | number | Engine power in HP, when published. |
| `engineVolumeCc` | number | Engine displacement in cc. Cars and motorcycles. |

#### Boat-Only Fields

Populated for the Boats (Båtar) category. Present on every row and `null` everywhere else, so the columns never disappear from a mixed export.

| Field | Type | Description |
|-------|------|-------------|
| `subcategory` | string | Hull class — one of 15 values: `"Yacht"`, `"Flybridge"`, `"Daycruiser"`, `"RIB"`, `"Segelbåt/Motorseglare"`, `"Styrpulpetbåt"`, `"Bowrider"`, `"Kabinbåt"`, `"Hyttbåt"`, `"Powerboat"`, `"Snipa"`, `"Småbåt/Gummibåt"`, `"Vattenskoter"`, `"Fiskebåt/Arbetsbåt"`, `"Annat"`. |
| `lengthFeet` | number | Hull length in feet, as Blocket publishes it. |
| `widthCm` | number | Beam in centimetres, exactly as the seller entered it. |
| `topSpeedKnots` | number | Top speed in knots. |
| `engineType` | string | One of three normalized values: `"inboard"`, `"outboard"`, `"other"`. |
| `hullMaterial` | string | One of five normalized values: `"fiberglass"`, `"aluminium"`, `"plastic"`, `"wood"`, `"other"`. |

### Tips for Best Results

- **Use multiple keywords for broader coverage** — Swedish and English both work (`["soffa", "couch", "3-sits"]`). Results are deduplicated by ad ID, so overlap costs nothing.
- **Per-query pagination ceiling is ~2,650 marketplace ads or ~2,500 vehicle ads** — to go deeper into a hot category, split your search with price bands (`0-500`, `500-2000`, `2000+`) or by county.
- **Pairing `sellerType: "private"` with `category: "cars"` returns near-zero results** — roughly 99% of car ads on Blocket are posted by business dealers. Use `All sellers` or `Business / dealers only` for cars.
- **`publishedWithin` maxes out at 9 days** — Blocket's search API does not support wider time windows. Use `Any time` to include older listings.
- **For vehicle data, pick the dedicated category** (Cars, Motorcycles, or Boats) — only these trigger the mobility schema with make/model/mileage/fuel/gearbox/horsepower extraction.
- **Boat ads carry marine specs instead of road specs** — expect `lengthFeet`, `widthCm`, `topSpeedKnots`, `engineType` and `hullMaterial` to fill, and `mileage`, `gearbox` and `modelSpec` to stay empty. Boat sellers fill these fields voluntarily, so sort by `lengthFeet` or `horsepower` only after filtering out the blanks.
- **A region filter dramatically reduces noise** for local-market research; pair `region: "skane"` with a tight price band to focus on one län at a time.
- **Combine `priceMin`/`priceMax` with multi-keyword search** to capture specific market segments — e.g. mid-range used phones in Stockholm.

### Pricing

**$3.00 per 1,000 results** — flat pay-per-result, billed only for ads actually delivered to your dataset.

| Results | Estimated Cost |
|---------|----------------|
| 100 | $0.30 |
| 1,000 | $3.00 |
| 10,000 | $30.00 |
| 100,000 | $300.00 |

A "result" is one row in the output dataset — i.e. one Blocket ad. **No compute charges — you only pay per result returned.** Platform fees (storage, data transfer) depend on your Apify plan.

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications on new results
- **Webhooks** — Trigger custom APIs on run completion
- **Apify API** — Full programmatic access

### Legal & Ethical Use

This actor collects publicly available classified-ad data from Blocket.se for legitimate market research, pricing intelligence, and competitive analysis. You are responsible for complying with Blocket.se's Terms of Service, the Swedish Marketing Act, and EU/GDPR rules when handling any personal data captured in seller names, contact details, or ad descriptions. Do not use extracted data for spam, harassment, or any unlawful purpose.

# Actor input Schema

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

Keywords to search for on Blocket.se (Swedish or English — both work). Each keyword runs as its own search; rows that match more than one keyword are deduplicated by ad ID. Leave empty to scrape the unfiltered listing for the chosen category and region.

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

Limit results to a single Blocket category. Vehicle categories (Cars, Motorcycles, Boats) use Blocket's richer mobility schema and return extra fields (make, model, year, mileage, fuel, gearbox, registration number).

## `region` (type: `string`):

Restrict results to a single Swedish county (län). Leave on 'All of Sweden' to search nationwide.

## `priceMin` (type: `integer`):

Only include ads at or above this price, in Swedish kronor (SEK). Leave empty for no minimum.

## `priceMax` (type: `integer`):

Only include ads at or below this price, in Swedish kronor (SEK). Leave empty for no maximum.

## `sellerType` (type: `string`):

Filter by who is selling — private individuals only, business dealers only, or both. Dealers post most car ads, so 'Business / dealers only' returns the largest volume in the Cars category, while 'Private sellers only' returns a smaller but genuine set.

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

Only include ads where the seller offers shipping (Blocket Frakt). Useful when you can't pick the item up in person.

## `publishedWithin` (type: `string`):

Only include ads posted within this recency window. 'Any' returns all currently active ads. Maximum window is 9 days — Blocket's search API does not support wider time filters.

## `sortBy` (type: `string`):

Order in which to collect results from Blocket. Newest first is the default and gives the most relevant recent ads first.

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

Power-user input. Paste Blocket.se URLs directly. Two kinds work. A search-result page (e.g. https://www.blocket.se/annonser/hela\_sverige?q=iphone or https://www.blocket.se/mobility/search/car?q=volvo) is scanned for as many ads as your limit allows. A single ad page (e.g. https://www.blocket.se/recommerce/forsale/item/25917453, https://www.blocket.se/mobility/item/25918030, or the older https://www.blocket.se/annons/25917453) returns exactly that one ad. Dealer and shop pages aren't supported — they're skipped with a note in the log rather than turned into a nationwide scan. When provided, these override the Search Keywords / Category / Region / Filters fields above.

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

Maximum number of ads to collect across all searches and URLs. Set to 0 for no cap (an internal safety limit of 100,000 still applies). Results are collected in full pages, so the final page may overshoot this number by a few rows.

## Actor input object example

```json
{
  "searchQueries": [
    "iphone"
  ],
  "category": "all",
  "region": "all",
  "sellerType": "all",
  "shippingOnly": false,
  "publishedWithin": "any",
  "sortBy": "newest",
  "startUrls": [],
  "maxResults": 100
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of ads with the key fields at a glance — title, price, location, category, seller, posted date, and ad URL.

## `details` (type: `string`):

Full per-ad fields including description, photo URLs, vehicle and boat specs, GPS coordinates, seller details, and timestamps.

# 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"
    ],
    "category": "all",
    "region": "all",
    "sellerType": "all",
    "shippingOnly": false,
    "publishedWithin": "any",
    "sortBy": "newest",
    "startUrls": [],
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/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"],
    "category": "all",
    "region": "all",
    "sellerType": "all",
    "shippingOnly": False,
    "publishedWithin": "any",
    "sortBy": "newest",
    "startUrls": [],
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/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"
  ],
  "category": "all",
  "region": "all",
  "sellerType": "all",
  "shippingOnly": false,
  "publishedWithin": "any",
  "sortBy": "newest",
  "startUrls": [],
  "maxResults": 100
}' |
apify call solidcode/blocket-scraper --silent --output-dataset

```

## MCP server setup

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