oecd_query

Pack: oecd · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/oecd_query for the schema, then POST the same URL with its arguments for the data.

Fetch OECD observations by NAMED dimensions instead of a positional key. filters maps dimension id to a code or a name (or an array): {REF_AREA:“Korea”, SECTOR:“S13”, STANDARD_REVENUE:“T_1100”, UNIT_MEASURE:“PT_B1GQ”, FREQ:“A”}. Unmentioned dimensions are wildcards. Names resolve against the flow’s own code list; an unknown dimension, an unmatched or ambiguous value is refused with the valid dimensions and candidates, nothing is queried. Copy these flow_refs exactly. Tax revenue (tax as % of GDP) flow_ref “OECD.CTP.TPS,DSD_REV_COMP_OECD@DF_RSOECD,2.0”: dims REF_AREA, MEASURE (TAX_REV), SECTOR (S13), STANDARD_REVENUE (T_1100 personal income tax), CTRY_SPECIFIC_REVENUE, UNIT_MEASURE (PT_B1GQ = % of GDP), FREQ. Quarterly sector accounts “OECD.SDD.NAD,DSD_NASEC1@DF_QSA,1.1”: dims FREQ, ADJUSTMENT, REF_AREA, SECTOR (S11 non-financial corporations), COUNTERPART_SECTOR, ACCOUNTING_ENTRY, TRANSACTION (B9 net lending/borrowing), INSTR_ASSET, UNIT_MEASURE. Merchandise trade (goods imports/exports, G20/OECD/World aggregates) “OECD.SDD.TPS,DSD_IMTS@DF_IMTS,1.0”: dims REF_AREA (G20), COUNTERPART_AREA (W), TRADE_FLOW (M imports, X exports), FREQ (Q), UNIT_MEASURE (USD_EXC). Services trade incl. G20 aggregate “OECD.SDD.TPS,DSD_BOP@DF_BOP,1.1”: dims REF_AREA (G20), MEASURE (S services), ACCOUNTING_ENTRY (C exports, D imports), FREQ, UNIT_MEASURE (USD_EXC). A wrong agency/version of a known flow id is corrected and reported as flow_ref_resolved; obvious dimension-name aliases (COUNTRY, FLOW, ENTRY) are mapped and reported. start_period like “2007”, “2021-Q2”.

Parameters

NameTypeRequiredDescription
flow_refstringyesSDMX dataflow reference, e.g. “OECD.CTP.TPS,DSD_REV_COMP_OECD@DF_RSOECD,2.0”
filtersobjectyesDimension id -> code, name, or array of either, e.g. {“REF_AREA”:“KOR”,“UNIT_MEASURE”:“PT_B1GQ”}
start_periodstringnoe.g. “2007”, “2021-Q2”, “2020-01”
end_periodstringnoInclusive end period
limitnumbernoCap rows returned (default 200)

Example call

Arguments

{
  "flow_ref": "OECD.CTP.TPS,DSD_REV_COMP_OECD@DF_RSOECD,2.0",
  "filters": {
    "REF_AREA": "South Korea",
    "MEASURE": "TAX_REV",
    "SECTOR": "S13",
    "STANDARD_REVENUE": "T_1100",
    "UNIT_MEASURE": "PT_B1GQ",
    "FREQ": "A"
  },
  "start_period": "2007",
  "end_period": "2007"
}

curl

curl -X POST https://gateway.pipeworx.io/oecd/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"oecd_query","arguments":{"flow_ref":"OECD.CTP.TPS,DSD_REV_COMP_OECD@DF_RSOECD,2.0","filters":{"REF_AREA":"South Korea","MEASURE":"TAX_REV","SECTOR":"S13","STANDARD_REVENUE":"T_1100","UNIT_MEASURE":"PT_B1GQ","FREQ":"A"},"start_period":"2007","end_period":"2007"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('oecd_query', {
  "flow_ref": "OECD.CTP.TPS,DSD_REV_COMP_OECD@DF_RSOECD,2.0",
  "filters": {
    "REF_AREA": "South Korea",
    "MEASURE": "TAX_REV",
    "SECTOR": "S13",
    "STANDARD_REVENUE": "T_1100",
    "UNIT_MEASURE": "PT_B1GQ",
    "FREQ": "A"
  },
  "start_period": "2007",
  "end_period": "2007"
});

More examples

{
  "flow_ref": "OECD.SDD.TPS,DSD_IMTS@DF_IMTS,1.0",
  "filters": {
    "REF_AREA": "G20",
    "COUNTERPART_AREA": "World",
    "TRADE_FLOW": "Imports",
    "FREQ": "Quarterly",
    "UNIT_MEASURE": "USD_EXC",
    "ADJUSTMENT": "N"
  },
  "start_period": "2021-Q2",
  "end_period": "2021-Q2"
}

Response shape

FieldTypeDescription
flow_refstring
key_usedstring
resolved_filtersobject
columnsarray
countnumber
truncatedboolean
rowsarray
source_urlstring
errorstring
messagestring
dimensionsarray
problemsarray
empty_reasonstring
notestring
Full JSON Schema
{
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "flow_ref": {
      "type": "string"
    },
    "key_used": {
      "type": "string"
    },
    "resolved_filters": {
      "type": "object",
      "additionalProperties": true
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "count": {
      "type": "number"
    },
    "truncated": {
      "type": "boolean"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "source_url": {
      "type": "string"
    },
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "dimensions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "problems": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "empty_reason": {
      "type": "string"
    },
    "note": {
      "type": "string"
    }
  }
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the oecd pack
{
  "mcpServers": {
    "oecd": {
      "url": "https://gateway.pipeworx.io/oecd/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 21, 2026