Skip to main content

Fast CLI for searching Blocket.se — optimized for agents and scripting

Project description

blocket-cli

CI Python 3.10+ License: MIT

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blocket_cli-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blocket_cli-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

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

Hashes for blocket_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f7acf34781bc92fbf2996132bb920282bdb1fa558e96a5ca2bbfba47ed3b390d
MD5 84cd3afc0a5819462d726eebc8abe332
BLAKE2b-256 e1e46d92748f9ee5e18d857f70896fa6a5ee133826f6302512404516e82a4da0

See more details on using hashes here.

Provenance

The following attestation bundles were made for blocket_cli-0.1.0.tar.gz:

Publisher: publish.yml on lennart-johansson/blocket-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for blocket_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62d3bb0a20954e2ab39492e9d9d4a39011a1b5deb756ff0a0d1d8727e60f74c3
MD5 920234932da7cb11e7d2876dc8faa864
BLAKE2b-256 e49882fbe5183ab2ef021a52902bba6ec353846778144143eaa181841d1622b9

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page