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.2.tar.gz (15.3 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.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tradera_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 56ebc97656aecab8076847fd47d152d70b4f438e6c9379e1078968225e1455e5
MD5 8bc8e82f34613a1869eda52f18164e82
BLAKE2b-256 c8ebe0c987a3388fec6f0a26eb024595e999cfd718ff59f1cd61fbecf00ecc1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradera_cli-0.1.2.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.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for tradera_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5aa52e3ccf6c8850c5c3708219e71029d9f4402a1b51edf36296488665d63737
MD5 aaa74522ffe90699294a89bd0727fb3b
BLAKE2b-256 dee320c3e8e4312cf0f47ef0397ce787ad160b24dae5c5b041964b0ff3679a9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradera_cli-0.1.2-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