BYTETOOLS

CSO Ireland PxStat API

Free Central Statistics Office Ireland API with no key: census, population and economic tables as JSON-stat 2.0, addressed by matrix code. Tested curl example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the CSO Ireland PxStat API?

The Central Statistics Office of Ireland publishes its statistical tables through PxStat, a free API needing no key. Each table has a matrix code such as CDD01, and `Cube_API.ReadDataset` returns it as JSON-stat 2.0 with full dimension labels, units and decimal precision.

PxStat is built on PxWeb, the Nordic statistical publishing stack, and exposes it as a clean RESTful path: `/PxStat.Data.Cube_API.ReadDataset/{matrix}/JSON-stat/2.0/{lang}`. Irish is a supported language alongside English, so `/ga` returns Irish-language labels for the same numbers. Matrix codes are short and memorable — CDD01 is population by sex and industry, EP001 covers employment — and they appear directly in the CSO's own data explorer URLs.

Do not start with `ReadCollection`. It returns the entire catalogue in one document and runs to tens of megabytes, which will hang a naive client; go straight to `ReadDataset` for the matrix you want. The response carries a genuinely useful extra that most JSON-stat producers omit: each statistic's `unit` block gives its label, decimal places and whether the unit belongs before or after the number, so you can format figures exactly as the CSO intends without hard-coding anything.

Quick facts

Base URL
https://ws.cso.ie/public/api.restful
Authentication
No API key. A POST variant of the same API accepts JSON-RPC bodies for complex filtering, but the RESTful GET path needs nothing.
Rate limit
No published limit. Avoid `ReadCollection`, which is very large; individual matrices are small.
Pricing
Free. CSO data is published under Creative Commons Attribution 4.0.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the CSO Ireland PxStat API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch an Irish statistical table as JSON-stat

GET https://ws.cso.ie/public/api.restful/PxStat.Data.Cube_API.ReadDataset/CDD01/JSON-stat/2.0/en

curl
curl 'https://ws.cso.ie/public/api.restful/PxStat.Data.Cube_API.ReadDataset/CDD01/JSON-stat/2.0/en'
JavaScript (fetch)
const res = await fetch("https://ws.cso.ie/public/api.restful/PxStat.Data.Cube_API.ReadDataset/CDD01/JSON-stat/2.0/en");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://ws.cso.ie/public/api.restful/PxStat.Data.Cube_API.ReadDataset/CDD01/JSON-stat/2.0/en", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "class": "dataset",
  "dimension": {
    "STATISTIC": {
      "category": {
        "index": [
          "CDD01"
        ],
        "label": {
          "CDD01": "Population"
        },
        "unit": {
          "CDD01": {
            "decimals": 0,
            "label": "Number",
            "position": "end"
          }
        }
      },
      "label": "Statistic"
    },
    "C02199V02655": {
      "category": {
        "index": [
          "-",
          "1",
          "2"
        ],
        "label": {
          "-": "Both sexes",
          "1": "Male",
          "2": "Female"
        }
      },
      "label": "Sex"
    },
    "C02779V03348": {
      "category": {
        "index": [
          "-",
          "A",
          "01",
          "02",
          "03",
          "04",
          "05",
          "06",
          "07",
          "08",
          "09",
          "10",
          "11",
          "12",
          "B",
          "13",
          "14",
          "15",
          "16",
          "171",
          "172",
          "18",
          "C",
          "19",
          "20",
          "21",
          "22",
          "23",
          "D",
          "24",
          "25",
          "26"
        ],
        "label": {
          "-": "State",
          "A": "Leinster",
          "01": "Carlow",
          "02": "Dublin",
          "03": "Kildare",
          "04": "Kilkenny",
          "05": "Laois",
          "06": "Longford",
          "07": "Louth",
          "08": "Meath",
          "09": "Offaly",
          "10": "Westmeath",
          "11": "Wexford",
          "12": "W

Parameters

ParameterTypeRequiredDescription
{matrix}pathRequiredMatrix code identifying the table, for example `CDD01`. CDD01
{format}pathRequiredOutput format — `JSON-stat` is the documented one. JSON-stat
{version}pathRequiredFormat version, `2.0`. 2.0
{lang}pathRequired`en` for English or `ga` for Irish labels. en

Response fields

classstring
`dataset`, marking this as a JSON-stat dataset document.
dimensionobject
One entry per dimension, keyed by its CSO code such as `C02199V02655` for sex.
dimension.STATISTIC.category.unitobject
Per-statistic unit with `label`, `decimals` and `position` — everything needed to format the number correctly.
dimension.<code>.category.indexarray
Ordered category codes. `-` conventionally means the total across that dimension.
dimension.<code>.category.labelobject
Code-to-label map, for example `1` to `Male`.
valuearray or object
The figures, positioned against the flattened dimension order.
dimension.<code>.labelstring
Human name for the dimension, such as `Sex` or `Census Year`.

What you can build with the CSO Ireland PxStat API

  • Pull Irish census population figures for a report or dashboard
  • Build an Irish-language statistics interface using the `ga` labels
  • Compare Irish indicators against Eurostat's JSON-stat output with one parser
  • Format figures exactly as published using the per-statistic unit metadata

Common errors and how to fix them

Client hangs or runs out of memory

You called `ReadCollection`.

Fix: Skip the catalogue endpoint — it is tens of megabytes. Call `ReadDataset` with a specific matrix code.

404 on the matrix code

Wrong code or a retired table.

Fix: Find the code in the CSO data explorer; it appears in the table's own URL.

Cannot locate a figure

JSON-stat positions values against flattened dimensions.

Fix: Use a JSON-stat library, or read `size` and `id` and compute the offset yourself.

A category labelled `-` looks like missing data

`-` is the conventional code for the total across a dimension.

Fix: Treat it as an aggregate row, not a null, and exclude it when summing.

CSO Ireland PxStat API — frequently asked questions

Is the CSO Ireland API free?

Yes. No key, no registration, and the data is licensed CC BY 4.0, so commercial reuse is allowed with attribution.

What is a matrix code?

PxStat's identifier for a table — a short code such as CDD01 or EP001 that appears in the CSO data explorer URL. Every API call addresses a table by this code.

Can I get the data in Irish?

Yes. Change the final path segment from `en` to `ga` and the same figures come back with Irish-language dimension and category labels.

Why should I avoid ReadCollection?

It returns the entire catalogue in a single document that runs to tens of megabytes and will stall a client with a modest read buffer. Go directly to `ReadDataset` for the matrix you need.

Tools that pair with this API

CSO Ireland PxStat is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.