data.somervillema.gov
Open data portalsUSdata.somervillema.gov
Socrata open data portal at data.somervillema.gov, publishing 53 public datasets from the publishing organisation, led by the GIS Data category.
Capabilities (5)
GET /v1/data/data-somervillema-gov/catalog-search1 creditKeyword search over the datasets published on data.somervillema.gov: each hit carries the dataset id, name, description, attribution, category, tags, column names and last update time, plus the total match count.
GET /v1/data/data-somervillema-gov/dataset1 creditThe complete metadata document for one dataset: name, description, attribution, licence, category, tags, all column definitions with data types, and the table id used for queries.
GET /v1/data/data-somervillema-gov/datasets1 creditA page of the portal's own dataset records (id, name, description, category, attribution, creation and update timestamps, view count) without the full column metadata.
GET /v1/data/data-somervillema-gov/row-count1 creditOne number: how many rows the dataset currently holds, as a SoQL count aggregate.
GET /v1/data/data-somervillema-gov/rows1 creditThe first 100 rows of a dataset as JSON objects keyed by field name. Column names are the API field names, so they can be used directly in a later SoQL query.
Response example
The shape of data from data-somervillema-gov/catalog-search (Catalogue search). A sample, not live data.
Example truncated, full shape in JSON from the API.
{
"results": [
{
"resource": {
"name": "Police Data: Crime Reports",
"id": "aghs-hqvg",
"resource_name": null,
"parent_fxf": [],
"description": "This dataset contains crime reports from the City of Somerville Police Department's records management system from 2017 to present. Each data point represents an incident, which may involve multiple offenses (the most severe offense is provided here). \n<p>Incidents deemed sensitive by enforcement agencies are included in the data set but are stripped of time or location information to protect the privacy of victims. For these incidents, only the year of the offense is provided. \n\n<p>This data set is refreshed daily with data appearing with a one-month delay (for example, crime reports from 1/1 will appear on 2/1). If a daily update does not refresh, please email data@somervillema.gov.",
"attribution": "Somerville PD",
"attribution_link": null,
"contact_email": "data@somervillema.gov",
"type": "dataset",
"updatedAt": "2026-10-23T06:04:57.000Z",
"createdAt": "2023-12-01T20:49:46.000Z",
"metadata_updated_at": "2025-01-22T21:45:53.000Z",
"data_updated_at": "2026-10-23T06:04:57.000Z",
"page_views": {
"page_views_last_week": 129,
"page_views_last_month": 506,
"page_views_total": 22805,
"page_views_last_week_log": 7.022367813028454,
"page_views_last_month_log": 8.985841937003341,
"page_views_total_log": 14.477125810583123
},
"columns_name": [
"Block Code",
"Offense Definition",
"Offense Code",
"Police Shift",
"Ward",
"Offense Sub-Category",
"Offense Category",
"Day and Month Reported",
"Incident Number",
"Year Reported",
"… 1 more items"
],
"columns_field_name": [
"blockcode",
"incdesc",
"offensecode",
"police_shift",
"ward",
"offensetype",
"category",
"day_and_month",
"incnum",
"year",
"… 1 more items"
],
"columns_datatype": [
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"… 1 more items"
],
"columns_description": [
"Block codes represent the census block where each incident occurred. Somerville is composed of approximately 700 census blocks. Census blocks are numbered uniquely with a four-digit census block number from 0000 to 9999 within census tract code, which nests within state and county codes. ",
"",
"The three-digit data values are used to identify the offenses for submission by law enforcement agencies to the FBI. ",
"The police shift during which an incident occurred. ",
"The Ward where the incident occurred.",
"A sub-category that groups some similar offense types. ",
"The most significant offense types, determined based on the severity of the offense or the frequency with which it occurs, belong in one of three categories: Crimes against Persons, Crimes against Property, and Crimes against Society. Crimes Against Persons, e.g., Murder, Rape, and Assault, are those offenses whose victims are always individuals. The object of Crimes Against Property, e.g., Robbery, Bribery, and Burglary, is to obtain money, property, or some other benefit. Crimes Against Society, e.g., Animal Cruelty, Drug Violations, Gambling, and Prostitution, represent society’s prohibition against engaging in certain types of activity.",
"The day and month the incident was reported to the Somerville Police ",
"A unique identification number associated with each incident report.",
"The year the incident waAsk with this source
A prompt for your agent that names this source and how to call it through the crw MCP.
Catalogue search
Use data.somervillema.gov (data-somervillema-gov) from fastCRW Pergamon, capability "Catalogue search" (catalog-search). You want to find a dataset on this portal by keyword and do not know its four-by-four id. Example options: q=taxi, offset=0, order=page_views_total DESC. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "data-somervillema-gov" and capability "catalog-search". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Dataset metadata
Use data.somervillema.gov (data-somervillema-gov) from fastCRW Pergamon, capability "Dataset metadata" (dataset). You already hold a dataset id and need its columns, licence or description before querying rows. Example options: id=wdn6-62uy. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "data-somervillema-gov" and capability "dataset". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Dataset inventory
Use data.somervillema.gov (data-somervillema-gov) from fastCRW Pergamon, capability "Dataset inventory" (datasets). You need to enumerate what this portal publishes, or page through its newest datasets. Example options: offset=0, order=createdAt, category=Transportation. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "data-somervillema-gov" and capability "datasets". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Row count
Use data.somervillema.gov (data-somervillema-gov) from fastCRW Pergamon, capability "Row count" (row-count). You need to know how large a dataset is before downloading it, or want a cheap liveness check. Example options: id=wdn6-62uy. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "data-somervillema-gov" and capability "row-count". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Licence
Datasets on this portal declare the licence "Open Data Commons Open Database License" in their Socrata metadata; the portal publishes no separate API licence and different datasets may carry different terms. Quoted as found in the portal's own catalogue.
https://data.somervillema.gov/Attribution
Display this wherever you show the data. It arrives on every response as provenance.attribution_text.
Source: data.somervillema.gov. Dataset attribution as stated by each publishing agency.
Cache: up to 3600s
