Command-line tool
Civic Data from the command line.
civicdata is a zero-dependency Node.js CLI (Node 22+) that calls the public REST API and prints JSON, so people and agents can script lookups without writing an integration.
Install
npm install -g civicdata # or run once without installing npx civicdata resolve "E15 2NE"
Commands
civicdata resolve <postcode> civicdata fire <postcode> [--radius 1000] [--years 5] civicdata crime <postcode> civicdata roads <postcode> [--radius 1000] [--years 5] civicdata planning <postcode> civicdata property-sales <postcode> [--radius 0] [--from 2020-01-01] [--to 2025-12-31] civicdata history <dataset> <identifier> --from 2025-01-01 --to 2025-12-31 civicdata sources civicdata area <identifier> # postcode, ward, local authority or MSOA; paid (x402) civicdata compare <identifier> <identifier> [...] civicdata openapi
Options
--base-url <origin>(defaulthttps://api.civicdata.co.uk, or envCIVICDATA_BASE_URL).--prettyindents JSON output;--headersalso prints rate-limit headers to stderr.- Exit codes: 0 success, 1 usage error, 2 HTTP error (the JSON error body is printed to stdout).