# 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:** 1 total users, 0 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 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 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

Download the OpenAPI definition: https://api.apify.com/v2/acts/kOswe896ZoZPAteOB/builds/TnRe4abGThyIEW9nJ/openapi.json
