Fast CLI for searching Blocket.se — Sweden's largest marketplace.
Search the general marketplace, cars, boats, and motorcycles. Designed for agents, scripts, and quick terminal lookups. Minimal dependencies, structured output.
pip install blocket-cliOr with uv:
uv tool install blocket-cliblocket search "soffa"
blocket search "iphone 15" -l stockholm --price-max 8000
blocket search "mountainbike" -c sports --sort price-asc -n 10
blocket search "ps5" -c electronics -o json | jq '.results[:3]'blocket cars "volvo xc60" --year-min 2018 --mileage-max 12000
blocket cars "tesla model 3" --fuel el --sort price-asc
blocket cars "vw alltrack" -l stockholm --price-max 300000 -o jsonblocket boats "segelbat" --length-min 30
blocket boats "bayliner" --sort price-asc -o jsonblocket mc "yamaha mt-07" --year-min 2020
blocket mc "harley" --sort price-desc -o jsonblocket ad 20851738
blocket ad 20851738 -o jsonblocket categories # general marketplace categories
blocket locations # Swedish counties
blocket fuels # fuel types for car search| Flag | Format | Use case |
|---|---|---|
| (default) | Human-readable table | Terminal browsing |
-o json |
Compact JSON | Piping to jq, API consumption |
-o jsonl |
One JSON object per line | Streaming, log processing |
All search commands support these shared options:
| Option | Description |
|---|---|
-l, --location |
Filter by Swedish county (e.g. stockholm, skane) |
--price-min |
Minimum price in SEK |
--price-max |
Maximum price in SEK |
--sort |
Sort order (relevance, price-asc, price-desc, date) |
-n, --limit |
Max results to display |
-p, --page |
Page number |
-o, --output |
Output format (table, json, jsonl) |
--raw |
Full API response instead of slim fields |
| Option | Description |
|---|---|
-c, --category |
Category filter (electronics, furniture, sports, etc.) |
| Option | Description |
|---|---|
--year-min / --year-max |
Model year range |
--mileage-min / --mileage-max |
Mileage in Swedish mil (1 mil = 10 km) |
--fuel |
Fuel type (bensin, diesel, el, hybrid-bensin, etc.) |
--transmission |
manuell or automat |
--sort |
Also supports mileage-asc, mileage-desc, year-asc, year-desc |
| Option | Description |
|---|---|
--length-min / --length-max |
Length in feet |
| Option | Description |
|---|---|
--year-min / --year-max |
Model year range |
--mileage-min / --mileage-max |
Mileage in Swedish mil |
--sort |
Also supports mileage-asc, mileage-desc, year-asc, year-desc |
The JSON output is designed for LLM agents and automation:
# Compact car search results
blocket cars "volvo" --year-min 2020 -o json | jq '.results[:3]'
# Stream general listings line by line
blocket search "soffa" -o jsonl
# Price analysis
blocket cars "tesla model 3" --fuel el -o json | python3 -c "
import sys, json
data = json.load(sys.stdin)
prices = [r['price'] for r in data['results'] if r.get('price') and r['price'] > 10]
print(f'Found {data[\"total\"]} listings')
print(f'Price range: {min(prices):,} - {max(prices):,} SEK')
print(f'Average: {sum(prices)//len(prices):,} SEK')
"MIT