query_dataset

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

Query rows from a data.bts.gov dataset using SoQL. datasetId is the Socrata 4x4 code from

Parameters

NameTypeRequiredDescription
datasetIdstringyesSocrata 4x4 id, e.g. “crem-w557”.
selectstringnoColumns or aggregates, e.g. “date, safety_general_aviation”.
wherestringnoSQL-like filter, e.g. “date > ‘2024-01-01’”.
orderstringnoSort, e.g. “date desc”.
groupstringnoGroup-by field(s) for aggregation.
qstringnoFull-text search across the whole row.
limitnumbernoRows to return (default 50).
offsetnumbernoPagination offset (default 0).

Example call

Arguments

{
  "datasetId": "crem-w557",
  "$select": "date, passenger_count",
  "$order": "date desc",
  "$limit": 50
}

curl

curl -X POST https://gateway.pipeworx.io/bts/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_dataset","arguments":{"datasetId":"crem-w557","$select":"date, passenger_count","$order":"date desc","$limit":50}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('query_dataset', {
  "datasetId": "crem-w557",
  "$select": "date, passenger_count",
  "$order": "date desc",
  "$limit": 50
});

More examples

{
  "datasetId": "crem-w557",
  "$select": "count(*)",
  "$where": "date > '2024-01-01' AND state='TX'",
  "$group": "state"
}

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

See Getting Started for client-specific install steps.

Regenerated from source · build October 15, 2026