arcgis_feature_query
Query US-government ArcGIS feature layers (e.g., DC procurement solicitations, contracts, payments) with SQL-like filters, pagination, and precise match counts. Returns raw attributes and honest metadata.
Instructions
Query rows from a curated US-government ArcGIS REST feature layer (keyless) — the QUERY companion to arcgis_hub_discover_datasets (which discovers Hub datasets). A large amount of SLED procurement/GIS data lives on ArcGIS. First payload: the DC Office of Contracting & Procurement 'PASS' layers — dc_pass_solicitations (DC's LIVE open solicitations, ~25k: SOLICITATIONNUMBER, SOLICITATIONTITLE, DUE_DATE, OPENDATE, CLOSEDATE, NIGPCODE, CONTRACTINGOFFICER, AWARD_TO, 46 fields), dc_pass_contracts (~50k), dc_pass_purchase_orders (~275k), dc_pass_payments (~1.55M). Inputs: service (the allowlist ENUM — the SSRF core, never a free host), where (ArcGIS SQL-ish filter, default '1=1', e.g. "SOLICITATIONTITLE LIKE '%security%'"), outFields (default '*'), orderByFields, limit(1..1000)/offset. Returns { service, records:[{…attributes verbatim…}] } + honest _meta. HONESTY: totalAvailable = the layer's EXACT match count (a returnCountOnly companion query, never the page length; a count failure ⇒ null + note, rows still returned); ★ArcGIS date fields are epoch MILLISECONDS and a negative/sentinel (≈1900) is a placeholder — surfaced verbatim, never coerced; a genuine no-match ⇒ complete:true/returned:0; a 429/5xx/timeout THROWS; an ArcGIS {error} body (e.g. a bad where) ⇒ invalid_input/upstream (surfaced, never a fake empty); a non-array features ⇒ schema_drift. SSRF: fixed allowlist base + hostname assertion + redirect:error (where/outFields cannot alter the host).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Records per page (→ resultRecordCount), 1..1000, default 50. | |
| where | No | ArcGIS SQL-ish filter (default '1=1'), e.g. "SOLICITATIONTITLE LIKE '%security%'" or "DUE_DATE > 1750000000000". Filters the read-only layer; a malformed clause ⇒ invalid_input (surfaced). | |
| offset | No | 0-based offset (→ resultOffset). Page with _meta.pagination.nextOffset; totalAvailable = the layer's exact match count. | |
| service | Yes | Service key (SSRF allowlist; 29 services). DC OCP PASS (solicitations/contracts/purchase_orders/payments). US local govs: Asheville NC, Bellevue WA, Miami-Dade FL×2, Suffolk County NY, Mat-Su AK, Las Vegas NV×2, Baltimore MD, Naperville IL, Worcester MA, Topeka KS (FY2015–23), Hennepin County MN (CIP pipeline), Charlotte-Mecklenburg NC (CIP pipeline); TX/AK/IA/OK DOT bid/award registers. ND DOT flex-funding to local agencies (nddot_flex×4 — NOT vendor contracts). | |
| outFields | No | Comma-separated fields to return (default '*' = all). e.g. 'SOLICITATIONNUMBER,SOLICITATIONTITLE,DUE_DATE,NIGPCODE'. | |
| orderByFields | No | ArcGIS orderByFields, e.g. 'DUE_DATE DESC'. Optional. |