Fast CLI for searching Blocket.se — optimized for agents and scripting
Project description
blocket-cli
Fast CLI for searching Blocket.se — Sweden's largest marketplace.
Designed for agents, scripts, and quick terminal lookups. Minimal dependencies, structured output.
Install
pip install blocket-cli
Or with uv:
uv tool install blocket-cli
Usage
Search listings
blocket 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]'
Get ad details
blocket ad 20851738
blocket ad 20851738 -o json
Browse filters
blocket categories
blocket locations
Output formats
| 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 |
Search options
| Option | Description |
|---|---|
-l, --location |
Filter by Swedish county (e.g. stockholm, skane) |
-c, --category |
Filter by category (e.g. electronics, furniture) |
--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) |
Agent integration
The JSON output is designed for LLM agents and automation:
# Structured search results
blocket search "cykel" -l stockholm --price-max 5000 -o json
# Stream results line by line
blocket search "soffa" -o jsonl
# Filter by category
blocket search "lampa" -c furniture -o json | jq '[.results[] | {title: .heading, price: .price.amount, location}]'
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blocket_cli-0.1.0.tar.gz.
File metadata
- Download URL: blocket_cli-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7acf34781bc92fbf2996132bb920282bdb1fa558e96a5ca2bbfba47ed3b390d
|
|
| MD5 |
84cd3afc0a5819462d726eebc8abe332
|
|
| BLAKE2b-256 |
e1e46d92748f9ee5e18d857f70896fa6a5ee133826f6302512404516e82a4da0
|
Provenance
The following attestation bundles were made for blocket_cli-0.1.0.tar.gz:
Publisher:
publish.yml on lennart-johansson/blocket-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blocket_cli-0.1.0.tar.gz -
Subject digest:
f7acf34781bc92fbf2996132bb920282bdb1fa558e96a5ca2bbfba47ed3b390d - Sigstore transparency entry: 953513414
- Sigstore integration time:
-
Permalink:
lennart-johansson/blocket-cli@ee41f07d517ea398d13c42584843bbc7bd57a20e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lennart-johansson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee41f07d517ea398d13c42584843bbc7bd57a20e -
Trigger Event:
release
-
Statement type:
File details
Details for the file blocket_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: blocket_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62d3bb0a20954e2ab39492e9d9d4a39011a1b5deb756ff0a0d1d8727e60f74c3
|
|
| MD5 |
920234932da7cb11e7d2876dc8faa864
|
|
| BLAKE2b-256 |
e49882fbe5183ab2ef021a52902bba6ec353846778144143eaa181841d1622b9
|
Provenance
The following attestation bundles were made for blocket_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on lennart-johansson/blocket-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blocket_cli-0.1.0-py3-none-any.whl -
Subject digest:
62d3bb0a20954e2ab39492e9d9d4a39011a1b5deb756ff0a0d1d8727e60f74c3 - Sigstore transparency entry: 953513416
- Sigstore integration time:
-
Permalink:
lennart-johansson/blocket-cli@ee41f07d517ea398d13c42584843bbc7bd57a20e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lennart-johansson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee41f07d517ea398d13c42584843bbc7bd57a20e -
Trigger Event:
release
-
Statement type: