CivicIQ API

Open data for agents and developers

CivicNZ is the public watchdog desk. CivicIQ operates the API. Start with the free public desks — NZ Index, health, promises, affordability, wellbeing, GETS tenders and government stats. High-volume and officer-graph calls use pay-per-call x402 in USDC. Charity lookup remains available; it is not the product.

Copy-paste

curl -s "https://civiciq-api-production.up.railway.app/index"
curl -s "https://civiciq-api-production.up.railway.app/health-outcomes/summary"
curl -s "https://civiciq-api-production.up.railway.app/promises/summary"
curl -s "https://civiciq-api-production.up.railway.app/affordability/summary"
curl -s "https://civiciq-api-production.up.railway.app/wellbeing/summary"
curl -s "https://civiciq-api-production.up.railway.app/affordability/findings"
curl -s "https://civiciq-api-production.up.railway.app/wellbeing/findings"
curl -s "https://civiciq-api-production.up.railway.app/government/procurement/tenders?limit=5"
curl -s "https://civiciq-api-production.up.railway.app/government/stats"

Paid x402

Try it

Paid routes settle in Solana USDC. An unpaid call returns HTTP 402. An x402 client signs the challenge and retries. Use a disposable funded wallet — never paste a receiving address from this page.

Pricing

RoutePriceWhat you get
GET /paid/tenders/searchUS$0.01GETS tender / award search
GET /paid/officers/{id}/connectionsUS$0.02Officer board connections

Network and payTo come from the live 402. Amounts are USDC (6 decimals); US$0.01 is 10000 atomic units.

// npm i @x402/fetch @x402/svm @solana/kit @scure/base
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactSvmScheme } from "@x402/svm/exact/client";
import { createKeyPairSignerFromBytes } from "@solana/kit";
import { base58 } from "@scure/base";

const signer = await createKeyPairSignerFromBytes(
  base58.decode(process.env.SOLANA_PRIVATE_KEY!)
);
const client = new x402Client();
client.register("solana:*", new ExactSvmScheme(signer));

const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment(
  "https://civiciq-api-production.up.railway.app/paid/tenders/search?search=software&limit=5"
);
console.log(await response.json());

Sample 402 response

curl above prints this challenge. Copy payTo, network, and asset from the live response, not from this sample.

{
  "x402Version": 1,
  "error": "X-PAYMENT header is required",
  "accepts": [
    {
      "scheme": "exact",
      "network": "solana",
      "price": "$0.01",
      "maxAmountRequired": "10000",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "payTo": "<payTo from the live 402>",
      "resource": "https://civiciq-api-production.up.railway.app/paid/tenders/search?search=software&limit=5",
      "description": "Government tender / procurement award search",
      "mimeType": "application/json",
      "outputSchema": {
        "input": {
          "type": "http",
          "method": "GET",
          "discoverable": true
        },
        "output": { "type": "object" }
      }
    }
  ]
}

Sample paid response

{
  "provided_by": "the CivicIQ team",
  "license": "CC-BY 4.0",
  "attribution": "Contains New Zealand government source data, including Charities Services and GETS, reused under CC-BY 4.0.",
  "data": {
    "total": 1,
    "tenders": [
      {
        "id": "1",
        "description": "Managed software services",
        "award_value": 125000,
        "date_kind": "awarded"
      }
    ],
    "awards": [
      {
        "id": "1",
        "description": "Managed software services",
        "award_value": 125000,
        "date_kind": "awarded"
      }
    ]
  }
}
  • NZ Index — Health, Housing, Safety, Affordability and Wellbeing. Free public JSON at /index
  • Affordability desk — house prices, rents, living costs, food, electricity. Free /affordability/summary
  • Wellbeing desk — GSS and Ngā Tūtohu Aotearoa. Free /wellbeing/summary
  • Tenders desk — GETS notices with closing vs awarded dates
  • Pricing — what the public site includes
  • Promises Tracker — free list and summary at /promises and /promises/summary
  • Health desk — free official series at /health-outcomes/summary
  • Paid routes live under /paid/ and return HTTP 402 until a valid USDC payment is presented. Discovery: /.well-known/x402. This launch does not add paid promises, health, affordability, or wellbeing routes.