/api/v1

API docs

Read-only JSON access to published FOI spending data.

Authentication

  1. Sign in and hold an active raw data licence — or be an admin.
  2. Create a token at API tokens (after sign in).
  3. Send it on every request:
Authorization: Bearer pp_…

Missing or invalid tokens return 401. Valid tokens without API access (for example an expired licence) return 403.

Base URL

https://publicpurse.ie/api/v1

Endpoints

Method Path Notes
GET /entities Optional tag
GET /entities/:slug
GET /entities/:slug/publications Published only
GET /entities/:slug/line_items q, sort
GET /publications entity, year, quarter
GET /publications/:slug Includes total
GET /line_items entity, publication, period_code, q, sort
GET /line_items/:unique_code

Pagination

Collection responses use a shared envelope:

{
  "data": [ … ],
  "meta": {
    "page": 1,
    "per_page": 50,
    "total_count": 1234,
    "total_pages": 25
  }
}

Query params: page, per_page (default 50, max 100).

Sort (line items)

date_desc (default), date_asc, amount_desc, amount_asc.

Example

curl -s -H "Authorization: Bearer $TOKEN" \
  "https://publicpurse.ie/api/v1/line_items?q=housing&per_page=10"

Access

API access is included with an active raw data licence. Use of the API is also subject to our terms of use.