v5

latestOpenAPI 3.1.0Proprietary2026-08-031,5423,1505.5 MB
Public Finance & Government

SoQL row query

Row-level query on a dataset via /resource/{dataset_id}.json. Each supported SoQL parameter maps to a $-prefixed query string arg upstream: $select, $where, $order, $limit, $offset, $q, $group, $having. Column names with spaces or special characters should be wrapped in backticks in SoQL expressions. SoQL string literals use single quotes; escape internal apostrophes by doubling ('O''Brien'). Upstream caps $limit at 50,000 rows per call; Sugra enforces the same bound and defaults to 1,000.

get/api/v1/socrata/{portal}/rows/{dataset_id}

Path parameters

portalstring required

Portal slug (e.g. nyc).

Portal slug (e.g. nyc).

dataset_idstring required

Socrata 4-4 hex dataset identifier.

Socrata 4-4 hex dataset identifier.

Query parameters

selectstring nullable

SoQL $select - column list with optional aliases and expressions.

SoQL $select - column list with optional aliases and expressions.

wherestring nullable

SoQL $where - row filter (e.g. complaint_type='Noise' AND created_date > '2026-01-01').

SoQL $where - row filter (e.g. complaint_type='Noise' AND created_date > '2026-01-01').

orderstring nullable

SoQL $order - sort expression (e.g. created_date DESC).

SoQL $order - sort expression (e.g. created_date DESC).

limitinteger

SoQL $limit - page size. Upstream max 50,000 per call.

SoQL $limit - page size. Upstream max 50,000 per call.

offsetinteger

SoQL $offset - pagination offset.

SoQL $offset - pagination offset.

qstring nullable

SoQL $q - full-text search across all text columns on the dataset.

SoQL $q - full-text search across all text columns on the dataset.

groupstring nullable

SoQL $group - GROUP BY columns for aggregations.

SoQL $group - GROUP BY columns for aggregations.

havingstring nullable

SoQL $having - post-aggregate filter.

SoQL $having - post-aggregate filter.

Response

Row list for the SoQL query, with echoed paging parameters.

Example response

{
  "data": {
    "portal": "nyc",
    "domain": "data.cityofnewyork.us",
    "dataset_id": "erm2-nwe9"
  },
  "meta": {
    "endpoint": "/api/v1/fred/us/cpi",
    "data_time": "2026-04-16T14:30:00Z",
    "response_time": "2026-04-16T14:30:12Z",
    "provider": "Sugra API v1.0.1",
    "source": "sugra_crypto",
    "attribution": "Short interest and Reg SHO daily short volume data is owned by and sourced from FINRA (Financial Industry Regulatory Authority).",
    "fallback_chain": [
      "sugra_crypto",
      "sugra_finance"
    ]
  }
}