la_query

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

Run a raw SoQL query against any Los Angeles open-data resource (data.lacity.org) by its Socrata id (8-char like “2nrs-mtv8”). Full SoQL: where/select/group/order/limit/offset. Use la_datasets to find a resource id, or la_recent for the common ones.

Parameters

NameTypeRequiredDescription
resource_idstringyesSocrata resource id, e.g. “2nrs-mtv8” (crime data).
wherestringnoSoQL $where filter (e.g. “area_name=‘Central’”).
selectstringnoSoQL $select (e.g. “crm_cd_desc, count(*)”).
groupstringnoSoQL $group (e.g. “crm_cd_desc”).
orderstringnoSoQL $order (e.g. “date_occ DESC”).
limitnumbernoMax rows (default 100, max 5000).
offsetnumbernoRow offset for paging.

Example call

Arguments

{
  "resource_id": "2nrs-mtv8",
  "where": "crm_cd_desc='BURGLARY'",
  "limit": 100,
  "_apiKey": "your-data-la-api-key"
}

curl

curl -X POST https://gateway.pipeworx.io/data-la/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"la_query","arguments":{"resource_id":"2nrs-mtv8","where":"crm_cd_desc='\''BURGLARY'\''","limit":100,"_apiKey":"your-data-la-api-key"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('la_query', {
  "resource_id": "2nrs-mtv8",
  "where": "crm_cd_desc='BURGLARY'",
  "limit": 100,
  "_apiKey": "your-data-la-api-key"
});

More examples

{
  "resource_id": "2nrs-mtv8",
  "select": "crm_cd_desc, count(*)",
  "group": "crm_cd_desc",
  "order": "count(*) DESC",
  "limit": 20,
  "_apiKey": "your-data-la-api-key"
}

Connect

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

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

See Getting Started for client-specific install steps.

Regenerated from source · build August 5, 2026