Read public Imobiliare.ro listings and compare local asking-price observations.
Unofficial, not affiliated with Imobiliare.ro. Automated use may breach its terms and get the account suspended. This tool uses anonymous public GETs. Local commands work without an account.
Live verification has been limited by a browser challenge on listing pages. Offline checks use synthetic examples.
From a checkout, on Linux or macOS with Python 3.11 or later:
git clone https://github.com/mihailmariusiondev/imobiliare-cli.git && cd imobiliare-cli
python3 -m pip install .Use an activated virtual environment if your system manages its Python installation.
| Command | Purpose | Flags |
|---|---|---|
imobiliare |
Read public Imobiliare.ro listings. | --help, --json |
imobiliare doctor |
inspect local configuration, paths, cooldown and robots status | --help, --json, --live |
imobiliare drift |
check packaged shapes or one live search or detail page | --help, --json, --live, --url |
imobiliare selftest |
check read commands offline or on public pages | --help, --json, --live |
imobiliare search |
search listings with local filters | --help, --json, --transaction, --category, --county, --city, --min-price, --max-price, --min-surface, --max-surface, --rooms, --floor, --seller, --currency, --fresh, --max-age, --format, --limit, --cursor, --all-pages, --details |
imobiliare detail |
read one listing by its public URL | --help, --json, --fresh, --max-age, --format |
imobiliare raw |
GET a public route and inspect its redacted page payload | --help, --json, --fresh, --max-age |
imobiliare history |
work with local listing observations | --help, --json |
imobiliare history snapshot |
observe one complete search and save it locally | --help, --json, --format, --transaction, --category, --county, --city, --min-price, --max-price, --min-surface, --max-surface, --rooms, --floor, --seller, --currency, --details |
imobiliare history show |
read the local observation series for one listing ID | --help, --json, --format |
imobiliare diff |
compare the latest two snapshots of the same search | --help, --json, --transaction, --category, --county, --city, --min-price, --max-price, --min-surface, --max-surface, --rooms, --floor, --seller, --currency, --format |
imobiliare search --county Bihor --city Oradea --json
imobiliare search --transaction rent --county Bihor --city Oradea --rooms 2 --max-price 550 --currency EUR --all-pages --details --format jsonl
imobiliare detail 'https://www.imobiliare.ro/oferta/example-100000001' --json
imobiliare history snapshot --county Bihor --city Oradea --details --json
imobiliare history show 100000001 --format csv
imobiliare diff --county Bihor --city Oradea --json
imobiliare raw /robots.txt --json
imobiliare doctor --live --json
imobiliare selftest
imobiliare selftest --live --json
imobiliare drift --json
imobiliare drift --live --url /vanzare-apartamente/judetul-bihor/oradea --jsonUse the actual public URL returned by search for detail. Apartments and sale are the category and transaction defaults. County and city have no defaults. Other category choices are houses and land. Use county and city together to select the county-qualified route. Search filters compare exact rooms and floor, inclusive price and surface bounds, currency, and private or agency seller type. Numeric price filters compare the amount in the listing currency. Supply --currency if the distinction matters. The CLI obtains detail when a filter is active and omits listings that lack the field needed for that filter.
Each search returns one page by default, with a 50-row cap and a next_cursor when a continuation is known. Pass it back with the same query. --all-pages follows the reported continuation, subject to robots rules. It has no row cap unless --limit is provided. The returned pages counts parsed search pages. requests counts site GET attempts, including robots and detail, and excludes cache hits. site_total is the site's reported number when available. complete means the end was confirmed for the selected span. Export clients that need metadata should use the JSON envelope and convert the returned items locally.
Snapshot fetches a complete search from page one with a fresh cache policy and saves it in one local SQLite transaction. Matching snapshots use the same normalized search URL and active filters. Diff reads the last two snapshots of that scope. A removed row was absent from the newer observation. A change in the asking amount, currency or period counts as a repricing when both prices and currencies are present. Missing amounts remain unknown. Snapshots and caches are local files. The server receives zero mutation requests, so there is no preview or execute flag.
Settings are resolved in this order. Environment variables take precedence over the optional non-secret ${XDG_CONFIG_HOME:-~/.config}/imobiliare/config file (example), then generic defaults. The file accepts KEY=VALUE lines, full-line # comments, and quoted values. No secrets are required.
IMOBILIARE_MAX_AGEsets cache age in seconds. The default is 900. On supported commands,--max-ageoverrides it and--freshbypasses cache.- Cache lives under
${XDG_CACHE_HOME:-~/.cache}/imobiliare. The request clock and cooldown live under${XDG_STATE_HOME:-~/.local/state}/imobiliare. - SQLite history lives under
${XDG_DATA_HOME:-~/.local/share}/imobiliare/history.sqlite3.
--json before or after a command prints one envelope with schema_version (2), ok, outcome, exit_code, data, and error. An error has code, message, retryable, write_happened (always false for site writes), and next_step. empty means a complete query matched nothing. not_found is a missing lookup or missing snapshot pair. partial means an empty page or span was inconclusive.
--format jsonl or --format csv prints rows only and is an alternative to --json. Nested CSV fields are JSON text. Rows carry source_url and retrieved_utc. Missing fields are null in JSON. When price per m² is derived, price_per_m2_source reads computed.
| Exit | Meaning |
|---|---|
| 0 | Read succeeded, lookup was missing, or a query was empty or partial |
| 1 | Local failure |
| 2 | Usage error |
| 3 | Upstream requested authentication |
| 4 | Upstream unavailable or unverified response or pagination |
| 5 | Robots exclusion, HTTP block, rate limit, challenge or active cooldown |
doctor --json is offline. It reports cached robots rules for representative paths, cache and state paths, and the current cooldown record. doctor --live issues at most one robots.txt request. Requests are serialized and spaced at least 10 seconds apart, or longer with a server delay. HTTP 403, 429 or a browser challenge stops the run and sets a durable cooldown, with Retry-After honored when supplied. A server error delays the next attempt. The HTTP client uses direct connections.
The observed robots file disallows /api/ and many query parameters, and permits bare ?page=2 through ?page=10. It also disallows sort= and sortby= (robots.txt read 28/11/2026), so there is no --sort: sort the returned rows locally, for example with --format jsonl | jq -s 'sort_by(.price)'. A larger search can stop with exit 5. The CLI refuses an unverified pagination end with exit 4. raw accepts public search and listing routes and robots.txt. It returns redacted page data to help diagnose parser drift. drift uses packaged synthetic fixtures, and drift --live compares one page after checking robots. It reports the web build identifier when present.
selftest checks local diagnostics and packaged parser fixtures without HTTP. selftest --live adds a robots read, a one-page search, and detail, raw and drift checks using a listing discovered by that search. It also checks the local read commands and reports when local observations are missing. It never takes a snapshot. A public-site block stops further requests and the command exits nonzero. Without --json it prints a status table.
Every parsed search and detail, including reads used by snapshots, checks that the page contains a results array with usable listing URLs or a listing matching the requested ID. A required structure failure returns exit 4 and outcome drift, with data.command and data.field also shown in the diagnostic message. Failing selftest rows identify the command and field. Missing, null, empty or unrecognized optional listing and pagination values are reported as field paths in data.warnings. The read returns data with exit 0 when its required structure is valid. Full pagination and snapshots still require a verified end. These checks use synthetic fixtures because the site blocked attempts to obtain first-party parser responses.
Run uv sync --locked --group dev and uv run --locked pytest to exercise the offline suite. The suite disables sockets with pytest-socket.
Version 0.2.0. See the changelog, MIT licence and security reporting instructions.