Skip to main content

CLI for Tradera web endpoints

Project description

tradera-cli

Fast CLI for searching public Tradera listings from the terminal.

Designed for scripts, agents, and quick lookups with structured output.

Install

From PyPI:

pip install tradera-cli

With uv:

uv tool install tradera-cli

With pipx:

pipx install tradera-cli

Upgrade:

pip install --upgrade tradera-cli

Usage

Search listings

tradera search "iphone"
tradera search "pokemon" --page 2 --page-size 20
tradera search "kamera" --sort AddedOn --format json
tradera search "klocka" --country SE --lang sv --format jsonl
tradera search "lego" --item-status Sold --format json
tradera search "lego" --condition "Oanvänt" --format json
tradera search "lego" --item-type FixedPrice --from-price 100 --to-price 500
tradera search "lego" --allowed-buyer-regions eu --counties Stockholm Uppsala
tradera search "lego city" --search-type ExactSearch

Get item details

tradera item 717898129
tradera item 717898129 --format json
tradera item "https://www.tradera.com/item/340186/717885898/iphone-12-pro"

Browse categories

tradera categories --level 1
tradera categories --level 2 --lang sv --format json

Output formats

Format Description Best for
table (default) Human-readable table Interactive terminal use
json Pretty JSON object jq, scripts, integrations
jsonl One JSON object per line Streaming/log pipelines

Common options

Search command (tradera search) supports:

Option Description
--page Page number (default: 1)
--page-size Results per page (default: 50)
--sort Sort mode (default: Relevance)
--lang Language code (default: sv)
--country Shipping country code (default: SE)
--item-status Filter by item status: Active, Sold, Unsold
--condition Filter by condition: Oanvänt, Mycket gott skick, Gott skick, Okej skick, Defekt
--item-type Filter by listing type: All, Auction, FixedPrice, ContactOnly
--from-price Minimum price
--to-price Maximum price
--allowed-buyer-regions Buyer region filter: sweden, eu, international
--counties Pickup counties, passed as one or more values, for example Stockholm Uppsala
--search-type Search mode. Current supported value: ExactSearch
--no-translate Disable automatic translation preference
--format Output format: table, json, jsonl

Development

From source:

git clone https://github.com/Paatsu/tradera-cli.git
cd tradera-cli
pip install -e .[dev]

Build distributions:

python -m build

Check the package metadata before upload:

python -m twine check dist/*

Run tests:

pytest -q

Agent integration

Examples for automation:

# Take first 3 listings as JSON
tradera search "iphone" --format json | jq '.items[:3]'

# Stream listings line-by-line
tradera search "lego" --format jsonl

# Pull one item as machine-readable JSON
tradera item 717898129 --format json

Notes

  • Uses web endpoints from Tradera's frontend.
  • Anonymous client token is fetched automatically when needed.
  • Endpoint behavior can change over time.

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

tradera_cli-0.1.3.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

tradera_cli-0.1.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file tradera_cli-0.1.3.tar.gz.

File metadata

  • Download URL: tradera_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tradera_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 21d38ea82e525998667ffe1cc29b3dd609179c241db2472f691003d45368039a
MD5 9ccf000760b740b33b959e57683a5562
BLAKE2b-256 56eb746e0e2937995c0a0722eb9d44d68af203bad55e7014df08dbf0b22afd32

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradera_cli-0.1.3.tar.gz:

Publisher: publish.yml on Paatsu/tradera-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 tradera_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tradera_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tradera_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a4d483e3b7623c703b331311083322a9f1e7213f1ef487fbcde21131052736fa
MD5 82f1bf88b236df429f8c3536292d4069
BLAKE2b-256 3d455ca718bbca94d2f36b23bbd3f4afcbb56795a90239f514089a6bb77461a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradera_cli-0.1.3-py3-none-any.whl:

Publisher: publish.yml on Paatsu/tradera-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