query_table

Pack: hagstofa-is · Endpoint: https://gateway.pipeworx.io/hagstofa-is/mcp

Pull data from a table (path includes the “.px” suffix). body is a PxWeb query object. PxWeb limits request size — filter dimensions to keep the cell count small.

Parameters

NameTypeRequiredDescription
pathstringyes
bodyobjectyes{query: [{code, selection: {filter, values}}], response: {format: “json-stat2”}}
selectionunknownno
responseunknownno

Example call

Arguments

{
  "path": "Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannfjolda/MAN00000.px",
  "body": {
    "query": [
      {
        "code": "Ar",
        "selection": {
          "filter": "item",
          "values": [
            "2020",
            "2021",
            "2022"
          ]
        }
      }
    ],
    "response": {
      "format": "json-stat2"
    }
  }
}

curl

curl -X POST https://gateway.pipeworx.io/hagstofa-is/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_table","arguments":{"path":"Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannfjolda/MAN00000.px","body":{"query":[{"code":"Ar","selection":{"filter":"item","values":["2020","2021","2022"]}}],"response":{"format":"json-stat2"}}}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('query_table', {
  "path": "Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannfjolda/MAN00000.px",
  "body": {
    "query": [
      {
        "code": "Ar",
        "selection": {
          "filter": "item",
          "values": [
            "2020",
            "2021",
            "2022"
          ]
        }
      }
    ],
    "response": {
      "format": "json-stat2"
    }
  }
});

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "hagstofa-is": {
      "url": "https://gateway.pipeworx.io/hagstofa-is/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 28, 2026