# Blocket.se Search Scraper 🛍️ (`shahidirfan/blocket-se-search-scraper`) Actor

Scrape Swedish classifieds from Blocket.se at scale. Extract listings with prices, descriptions, locations, seller info & images. Ideal for price monitoring, competitive intelligence, market research & re-commerce analytics. Real-time, structured data ready for automation.

- **URL**: https://apify.com/shahidirfan/blocket-se-search-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Developer tools, E-commerce, Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Search Scraper

Extract listings from Blocket.se, Sweden's largest online marketplace. Search for items by keyword, location, or browse full categories. Collect prices, images, seller details, coordinates and more from every listing.

### Features

- **Direct API access** - Fetches data from Blocket's internal search APIs for fast, reliable extraction
- **Multi-category support** - Works across marketplace items (Torget), cars, boats, and motorcycles
- **Custom search parameters** - Filter by keyword, location, price range, and sort order
- **Automatic pagination** - Collects results across multiple pages until your target count is reached
- **Rich data output** - Every listing includes title, price, images, location, coordinates, seller type, shipping availability, and more

### Use Cases

#### Price Research
Track pricing trends across categories. Compare similar items to find market rates or identify undervalued listings.

#### Market Analysis
Analyze inventory levels, seller types, and geographic distribution of listings across Sweden.

#### Competitive Intelligence
Monitor specific product categories, brands, or seller segments for business research.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | String | No | - | A Blocket.se search URL. If provided, keyword/location are ignored |
| `keyword` | String | No | - | Search keyword (e.g. `cykel`, `soffa`, `iPhone`) |
| `location` | String | No | - | City or region filter (e.g. `Stockholm`, `Goteborg`) |
| `results_wanted` | Integer | No | `20` | Maximum number of listings to collect |
| `max_pages` | Integer | No | `10` | Safety cap on number of result pages to visit |
| `proxyConfiguration` | Object | No | - | Apify proxy settings (not required for Blocket) |

---

### Output Data

Each item in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | Blocket ad ID |
| `title` | String | Listing title |
| `price` | Number | Price in SEK |
| `currency` | String | Currency code (SEK) |
| `location` | String | City or region |
| `coordinates` | Object | Latitude and longitude |
| `image_url` | String | Primary image URL |
| `image_urls` | Array | All image URLs |
| `url` | String | Canonical ad URL |
| `trade_type` | String | Sales, giveaway, or wanted |
| `date_posted` | String | ISO date of posting |
| `seller_type` | String | Private or professional seller |
| `shipping_available` | Boolean | Whether shipping is available |
| `buy_now_available` | Boolean | Whether buy now is available |
| `flags` | Array | Listing flags |
| `labels` | Array | Listing labels |
| `distance` | Number | Distance from search point |

---

### Usage Examples

#### Basic Keyword Search

Search for bicycles:

```json
{
    "keyword": "cykel",
    "results_wanted": 50
}
````

#### Search with Location

Find furniture in Stockholm:

```json
{
    "keyword": "soffa",
    "location": "Stockholm",
    "results_wanted": 30
}
```

#### Search from URL

Use a specific Blocket search URL:

```json
{
    "startUrl": "https://www.blocket.se/recommerce/forsale/search?q=lampa&sort=PRICE_ASC",
    "results_wanted": 100
}
```

#### Search Cars

Search for used Volvo cars sorted by newest:

```json
{
    "startUrl": "https://www.blocket.se/bilar/sok?q=volvo&sort=PUBLISHED_DESC",
    "results_wanted": 50
}
```

***

### Sample Output

```json
{
    "id": "24725378",
    "title": "Cykel Marvil 20 and 3 vaxlar, handbroms + fotbroms",
    "price": 1350,
    "currency": "SEK",
    "location": "Hagfors",
    "coordinates": {
        "lat": 60.0255,
        "lng": 13.71342
    },
    "image_url": "https://images.blocketcdn.se/dynamic/default/item/24725378/87bfe232.jpg",
    "image_urls": ["https://images.blocketcdn.se/..."],
    "url": "https://www.blocket.se/recommerce/forsale/item/24725378",
    "trade_type": "Saljes",
    "date_posted": "2026-07-11T08:06:04.000Z",
    "seller_type": "private",
    "shipping_available": false,
    "buy_now_available": false
}
```

***

### Tips for Best Results

#### Choose Working URLs

- Use search result URLs from Blocket (not individual ad pages)
- Start with popular keywords for broader results
- Test with different categories to understand data coverage

#### Optimize Collection Size

- Start with a small result count (20-30) to test your query
- Increase for production runs as needed
- The API supports up to 50 results per page

#### Location Filtering

- Use Swedish location names (Stockholm, Goteborg, Malmo)
- Leave location empty for nationwide results

***

### Integrations

Connect your data with:

- **Google Sheets** - Export for analysis and reporting
- **Airtable** - Build searchable databases of listings
- **Make** - Create automated workflows with collected data
- **Zapier** - Trigger actions based on new listings

#### Export Formats

Download data in multiple formats:

- **JSON** - For developers and APIs
- **CSV** - For spreadsheet analysis
- **Excel** - For business reporting
- **XML** - For system integrations

***

### Frequently Asked Questions

#### How many items can I collect?

You can collect thousands of listings. The API returns up to 50 items per page with up to 50 pages available.

#### Does this work with Blocket car listings?

Yes. Use the car search URL format: `https://www.blocket.se/bilar/sok?q=volvo`. The actor automatically detects vehicle searches and uses the correct API.

#### Can I filter by price?

Price filtering is supported via the URL. Add `&price_from=1000&price_to=5000` to your search URL.

#### What if no results are returned?

The search may not match any listings. Try broadening your keyword or removing location filters.

#### Is a proxy required?

No. Blocket's APIs are publicly accessible without proxies. Proxy configuration is available for high-volume use cases.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/schedules)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with Blocket's terms of service and applicable laws. Respect rate limits and use data responsibly.

# Actor input Schema

## `startUrl` (type: `string`):

A Blocket.se search URL (e.g. https://www.blocket.se/recommerce/forsale/search?q=cykel). If provided, keyword/location are ignored.

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

Search keyword (e.g. 'cykel', 'soffa', 'iPhone'). Not used if Start URL is provided.

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

City or region filter (e.g. 'Stockholm', 'Göteborg'). Not used if Start URL is provided.

## `results_wanted` (type: `integer`):

Maximum number of listings to collect.

## `max_pages` (type: `integer`):

Safety cap on number of result pages to visit (max 50).

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

Use Apify Proxy. Not required for Blocket but helpful for volume scraping.

## Actor input object example

```json
{
  "keyword": "cykel",
  "results_wanted": 20,
  "max_pages": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "keyword": "cykel",
    "results_wanted": 20,
    "max_pages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/blocket-se-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 = {
    "keyword": "cykel",
    "results_wanted": 20,
    "max_pages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/blocket-se-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keyword": "cykel",
  "results_wanted": 20,
  "max_pages": 10
}' |
apify call shahidirfan/blocket-se-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/blocket-se-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Blocket.se Search Scraper 🛍️",
        "description": "Scrape Swedish classifieds from Blocket.se at scale. Extract listings with prices, descriptions, locations, seller info & images. Ideal for price monitoring, competitive intelligence, market research & re-commerce analytics. Real-time, structured data ready for automation.",
        "version": "0.0",
        "x-build-id": "TnRe4abGThyIEW9nJ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~blocket-se-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-blocket-se-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~blocket-se-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-blocket-se-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~blocket-se-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-blocket-se-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrl": {
                        "title": "Start URL",
                        "type": "string",
                        "description": "A Blocket.se search URL (e.g. https://www.blocket.se/recommerce/forsale/search?q=cykel). If provided, keyword/location are ignored."
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Search keyword (e.g. 'cykel', 'soffa', 'iPhone'). Not used if Start URL is provided."
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City or region filter (e.g. 'Stockholm', 'Göteborg'). Not used if Start URL is provided."
                    },
                    "results_wanted": {
                        "title": "Maximum results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings to collect.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum pages",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Safety cap on number of result pages to visit (max 50).",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy. Not required for Blocket but helpful for volume scraping.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
