query

Pack: data-ny · Endpoint: https://gateway.pipeworx.io/data-ny/mcp

SoQL query on a single resource.

Parameters

NameTypeRequiredDescription
resource_idstringyesSocrata 4x4, e.g. “xj2p-gjci”
wherestringnoSoQL WHERE clause (without “WHERE”).
selectstringno
groupstringno
orderstringno
limitnumberno
offsetnumberno

Example call

Arguments

{
  "resource_id": "xj2p-gjci",
  "where": "year = 2023",
  "limit": 100
}

curl

curl -X POST https://gateway.pipeworx.io/data-ny/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query","arguments":{"resource_id":"xj2p-gjci","where":"year = 2023","limit":100}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('query', {
  "resource_id": "xj2p-gjci",
  "where": "year = 2023",
  "limit": 100
});

More examples

{
  "resource_id": "8n3z-qvya",
  "select": "complaint_type, count(*) as total",
  "group": "complaint_type",
  "order": "total DESC",
  "limit": 50
}

Response shape

Always returns: items, count

FieldTypeDescription
itemsarrayArray of rows returned from SoQL query
countintegerNumber of items returned.
Full JSON Schema
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "description": "Array of rows returned from SoQL query",
      "items": {
        "type": "object",
        "description": "Row object with column values"
      }
    },
    "count": {
      "type": "integer",
      "description": "Number of items returned."
    }
  },
  "required": [
    "items",
    "count"
  ]
}

Connect

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

{
  "mcpServers": {
    "data-ny": {
      "url": "https://gateway.pipeworx.io/data-ny/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026