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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Dataset 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. |
columns | array | no | Columns to return (default all). |
items | string | no | |
where | string | no | Native filter. Socrata SoQL (“year > 2020”), Opendatasoft ODSQL, ArcGIS SQL, CKAN SQL WHERE clause, DKAN “col = value AND col2 > 5”. |
filters | object | no | Equality filters on every platform, e.g. {“state”:“TX”}. |
order_by | string | no | Sort, e.g. “year desc”. |
limit | number | no | Rows 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. |
offset | number | no | Rows 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
| Field | Type | Description |
|---|---|---|
platform | string | |
domain | string | |
dataset_id | string | |
upstream_url | string | |
queryable | boolean | |
returned | number | |
rows | array | |
budget | object |
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.