property price register api
This is a thin API layer on top of the CSV data provided by the Property Services Regulatory Authority. The PSRA’s CSVs have some funny encoding (CP1252), a misconfigured SSL certificate, and are generally a bit annoying to query directly. This service queries the CSVs and provides them here with a more standard JSON API. It doesn’t do any normalising or cleaning of the address or description fields, so any errors present on the register itself will be present here.
There are a bunch of caveats about the data on the PSRA’s price register site, so look for answers there if you’re curious.
The API only covers residential properties. Maybe you want to add commercial properties? Go ahead.
I made a public site primarily to illustrate how one might interact with this API. It’s generally what you'd expect, I hope.
GET /api/sales will return a list of JSON objects.
GET /api/sales/:id will return a single JSON sale object. The
:id is a uuid, so it's not guessable – you'll need to
GET /api/sales to find them.
At the moment, the list endpoint only takes
after params to page around — no filtering or sorting yet. If you want to do that, you can page through the sales and ingest them into your own database. And then go wild. You do you.
You'll need Elixir and PostgreSQL installed.
git clone https://github.com/civictech-ie/price-register.git cd price-register mix deps.get mix ecto.setup cd assets npm install cd .. mix phx.server
Now you can visit
localhost:4000 and it should be working.
It's deployed at Render and I'll keep an eye to make sure it can handle the load the API is getting. If you're planning on making a ton of requests (eg querying directly from a popular client-side app), you might give me a heads up, or, better yet, set up your own deployment. It's very easy...
If you're interested in contributing, put a note in the issues. And make sure the tests pass (
In general, I'm thinking the scope is: let's make the API a bit better for querying and ordering results. But making the public site much better is out of scope – if you want to do that, just make your own service that consumes this API!