Skip to content

Commit 0711495

Browse files
Update README with vehicle search commands
1 parent 0d8cb64 commit 0711495

File tree

1 file changed

+73
-11
lines changed

1 file changed

+73
-11
lines changed

README.md

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Fast CLI for searching [Blocket.se](https://www.blocket.se) — Sweden's largest marketplace.
88

9-
Designed for agents, scripts, and quick terminal lookups. Minimal dependencies, structured output.
9+
Search the general marketplace, cars, boats, and motorcycles. Designed for agents, scripts, and quick terminal lookups. Minimal dependencies, structured output.
1010

1111
## Install
1212

@@ -22,7 +22,7 @@ uv tool install blocket-cli
2222

2323
## Usage
2424

25-
### Search listings
25+
### Search general marketplace
2626

2727
```bash
2828
blocket search "soffa"
@@ -31,6 +31,28 @@ blocket search "mountainbike" -c sports --sort price-asc -n 10
3131
blocket search "ps5" -c electronics -o json | jq '.results[:3]'
3232
```
3333

34+
### Search cars
35+
36+
```bash
37+
blocket cars "volvo xc60" --year-min 2018 --mileage-max 12000
38+
blocket cars "tesla model 3" --fuel el --sort price-asc
39+
blocket cars "vw alltrack" -l stockholm --price-max 300000 -o json
40+
```
41+
42+
### Search boats
43+
44+
```bash
45+
blocket boats "segelbat" --length-min 30
46+
blocket boats "bayliner" --sort price-asc -o json
47+
```
48+
49+
### Search motorcycles
50+
51+
```bash
52+
blocket mc "yamaha mt-07" --year-min 2020
53+
blocket mc "harley" --sort price-desc -o json
54+
```
55+
3456
### Get ad details
3557

3658
```bash
@@ -41,8 +63,9 @@ blocket ad 20851738 -o json
4163
### Browse filters
4264

4365
```bash
44-
blocket categories
45-
blocket locations
66+
blocket categories # general marketplace categories
67+
blocket locations # Swedish counties
68+
blocket fuels # fuel types for car search
4669
```
4770

4871
## Output formats
@@ -53,32 +76,71 @@ blocket locations
5376
| `-o json` | Compact JSON | Piping to `jq`, API consumption |
5477
| `-o jsonl` | One JSON object per line | Streaming, log processing |
5578

56-
## Search options
79+
## Common options
80+
81+
All search commands support these shared options:
5782

5883
| Option | Description |
5984
|--------|-------------|
6085
| `-l`, `--location` | Filter by Swedish county (e.g. `stockholm`, `skane`) |
61-
| `-c`, `--category` | Filter by category (e.g. `electronics`, `furniture`) |
6286
| `--price-min` | Minimum price in SEK |
6387
| `--price-max` | Maximum price in SEK |
6488
| `--sort` | Sort order (`relevance`, `price-asc`, `price-desc`, `date`) |
6589
| `-n`, `--limit` | Max results to display |
6690
| `-p`, `--page` | Page number |
6791
| `-o`, `--output` | Output format (`table`, `json`, `jsonl`) |
92+
| `--raw` | Full API response instead of slim fields |
93+
94+
### General marketplace options
95+
96+
| Option | Description |
97+
|--------|-------------|
98+
| `-c`, `--category` | Category filter (`electronics`, `furniture`, `sports`, etc.) |
99+
100+
### Car options
101+
102+
| Option | Description |
103+
|--------|-------------|
104+
| `--year-min` / `--year-max` | Model year range |
105+
| `--mileage-min` / `--mileage-max` | Mileage in Swedish mil (1 mil = 10 km) |
106+
| `--fuel` | Fuel type (`bensin`, `diesel`, `el`, `hybrid-bensin`, etc.) |
107+
| `--transmission` | `manuell` or `automat` |
108+
| `--sort` | Also supports `mileage-asc`, `mileage-desc`, `year-asc`, `year-desc` |
109+
110+
### Boat options
111+
112+
| Option | Description |
113+
|--------|-------------|
114+
| `--length-min` / `--length-max` | Length in feet |
115+
116+
### Motorcycle options
117+
118+
| Option | Description |
119+
|--------|-------------|
120+
| `--year-min` / `--year-max` | Model year range |
121+
| `--mileage-min` / `--mileage-max` | Mileage in Swedish mil |
122+
| `--sort` | Also supports `mileage-asc`, `mileage-desc`, `year-asc`, `year-desc` |
68123

69124
## Agent integration
70125

71126
The JSON output is designed for LLM agents and automation:
72127

73128
```bash
74-
# Structured search results
75-
blocket search "cykel" -l stockholm --price-max 5000 -o json
129+
# Compact car search results
130+
blocket cars "volvo" --year-min 2020 -o json | jq '.results[:3]'
76131

77-
# Stream results line by line
132+
# Stream general listings line by line
78133
blocket search "soffa" -o jsonl
79134

80-
# Filter by category
81-
blocket search "lampa" -c furniture -o json | jq '[.results[] | {title: .heading, price: .price.amount, location}]'
135+
# Price analysis
136+
blocket cars "tesla model 3" --fuel el -o json | python3 -c "
137+
import sys, json
138+
data = json.load(sys.stdin)
139+
prices = [r['price'] for r in data['results'] if r.get('price') and r['price'] > 10]
140+
print(f'Found {data[\"total\"]} listings')
141+
print(f'Price range: {min(prices):,} - {max(prices):,} SEK')
142+
print(f'Average: {sum(prices)//len(prices):,} SEK')
143+
"
82144
```
83145

84146
## License

0 commit comments

Comments
 (0)