portal_query

Pack: open-data-portals · 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/portal_query for the schema, then POST the same URL with its arguments for the data.

Read real rows from a dataset on a CKAN, Socrata, DKAN, Opendatasoft or ArcGIS Hub portal using the platform’s own query API (CKAN datastore_search / datastore_search_sql, SoQL, DKAN datastore query, Opendatasoft records, ArcGIS FeatureServer query). where is the platform’s native filter syntax; filters is plain equality that works on every platform. If the resource has no query API, returns queryable:false with its download URL (web-fetch query_table can read a CSV download). Zero rows is an error, not a success. Names the platform and the exact upstream URL called.

Parameters

NameTypeRequiredDescription
idstringyesDataset or resource id: CKAN resource id (or dataset name), Socrata 4x4, DKAN uuid (append /N for the Nth distribution), Opendatasoft dataset_id, ArcGIS Hub item_layer id.
columnsarraynoColumns to return (default all).
itemsstringno
wherestringnoNative filter. Socrata SoQL (“year > 2020”), Opendatasoft ODSQL, ArcGIS SQL, CKAN SQL WHERE clause, DKAN “col = value AND col2 > 5”.
filtersobjectnoEquality filters on every platform, e.g. {“state”:“TX”}.
order_bystringnoSort, e.g. “year desc”.
limitnumbernoRows per call, default 25, maximum 500 (a larger limit is clamped and the response says so; Opendatasoft caps a page at 100). Page with offset and next_offset. A result is capped at about 1.5 million characters and says so when trimmed.
offsetnumbernoRows to skip (default 0).

Example call

Arguments

{
  "domain": "data.texas.gov",
  "id": "9cir-efmm",
  "columns": [
    "taxpayer_name",
    "taxpayer_city"
  ],
  "filters": {
    "taxpayer_city": "AUSTIN"
  },
  "limit": 3
}

curl

curl -X POST https://gateway.pipeworx.io/open-data-portals/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"portal_query","arguments":{"domain":"data.texas.gov","id":"9cir-efmm","columns":["taxpayer_name","taxpayer_city"],"filters":{"taxpayer_city":"AUSTIN"},"limit":3}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('portal_query', {
  "domain": "data.texas.gov",
  "id": "9cir-efmm",
  "columns": [
    "taxpayer_name",
    "taxpayer_city"
  ],
  "filters": {
    "taxpayer_city": "AUSTIN"
  },
  "limit": 3
});

Response shape

FieldTypeDescription
platformstring
domainstring
dataset_idstring
upstream_urlstring
queryableboolean
returnednumber
rowsarray
budgetobject
Full JSON Schema
{
  "type": "object",
  "properties": {
    "platform": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "dataset_id": {
      "type": "string"
    },
    "upstream_url": {
      "type": "string"
    },
    "queryable": {
      "type": "boolean"
    },
    "returned": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "taxpayer_name": {
            "type": "string"
          },
          "taxpayer_city": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "budget": {
      "type": "object",
      "properties": {
        "used": {
          "type": "number"
        },
        "limit": {
          "type": "number"
        },
        "scope": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}

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 open-data-portals pack
{
  "mcpServers": {
    "open-data-portals": {
      "url": "https://gateway.pipeworx.io/open-data-portals/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build December 1, 2026