data.oce.pr.gov
Open data portalsUSdata.oce.pr.gov
Socrata open data portal at data.oce.pr.gov, publishing 50 public datasets from the publishing organisation, led by the Candidatura category.
Capabilities (5)
GET /v1/data/data-oce-pr-gov/catalog-search1 creditKeyword search over the datasets published on data.oce.pr.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-oce-pr-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-oce-pr-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-oce-pr-gov/row-count1 creditOne number: how many rows the dataset currently holds, as a SoQL count aggregate.
GET /v1/data/data-oce-pr-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-oce-pr-gov/catalog-search (Catalogue search). A sample, not live data.
Example truncated, full shape in JSON from the API.
{
"results": [
{
"resource": {
"name": "Donaciones",
"id": "kdwd-nb6g",
"resource_name": null,
"parent_fxf": [],
"description": "Conjunto de datos: Lista de donaciones recibidas del 2011 al presente.",
"attribution": "Oficina del Contralor Electoral",
"attribution_link": "http://oce.pr.gov",
"contact_email": null,
"type": "dataset",
"updatedAt": "2019-02-15T00:43:05.000Z",
"createdAt": "2016-09-28T19:55:13.000Z",
"metadata_updated_at": "2019-02-15T00:43:05.000Z",
"data_updated_at": "2019-01-30T15:56:14.000Z",
"page_views": {
"page_views_last_week": 74,
"page_views_last_month": 177,
"page_views_total": 13096,
"page_views_last_week_log": 6.22881869049588,
"page_views_last_month_log": 7.475733430966398,
"page_views_total_log": 13.676948765298388
},
"columns_name": [
"Cantidad",
"Location 1 (state)",
"Zip Code",
"Evento",
"Location 1 (city)",
"Location 1 (zip)",
"Candidato",
"Donante",
"Ciudad",
"Location 1",
"… 5 more items"
],
"columns_field_name": [
"cantidad_donacion",
"location_1_state",
"zip_code",
"descripcion_evento",
"location_1_city",
"location_1_zip",
"candidato",
"nombre_completo",
"donante_pueblo",
"location_1",
"… 5 more items"
],
"columns_datatype": [
"Number",
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"Text",
"Point",
"… 5 more items"
],
"columns_description": [
"Cantidad de dinero aportada.",
"",
"Código postal del donante.",
"Descripción del año o evento electoral.",
"",
"",
"Nombre del candidato, partido o comité de campaña.",
"Nombre completo del donante.",
"Ciudad donde reside el donante.",
"Coordenadas de la donación basada en el código postal del donante.",
"… 5 more items"
],
"columns_format": [
{
"precision": "2",
"align": "center",
"aggregate": "sum",
"currencyStyle": "USD",
"humane": "false",
"precisionStyle": "currency"
},
{},
{
"noCommas": "true",
"rdf": "",
"mask": "#####",
"align": "left",
"precisionStyle": "standard"
},
{
"displayStyle": "plain",
"align": "center"
},
{},
{},
{
"displayStyle": "plain",
"align": "left"
},
{
"displayStyle": "plain",
"align": "left"
},
{
"displayStyle": "plain",
"align": "center"
},
{
"view": "coords",
"align": "left"
},
"… 5 more items"
],
"download_count": 4575,
"provenance": "official",
"lens_view_type": "tabular",
"lens_display_type": "table",
"locked": false,
"backend": "nbe",
"blob_mime_type": null,
"hide_from_data_json": false,
"publication_date": "2018-05-03T21:02:13.000Z"
},
"classification": {
"categories": [],
"tags": [],
"domain_category": "Donaciones",
"domain_tags": [
"donativos",
"candidatos",
"dataset",
"donaciones"
],
"domain_metadata": []
},
"metadata": {
"domain": "data.oce.pr.gov",
"license": "Public Domain U.S. GovernAsk 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.oce.pr.gov (data-oce-pr-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-oce-pr-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.oce.pr.gov (data-oce-pr-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=mhzd-5pm7. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "data-oce-pr-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.oce.pr.gov (data-oce-pr-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-oce-pr-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.oce.pr.gov (data-oce-pr-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=mhzd-5pm7. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "data-oce-pr-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 "Public Domain U.S. Government" 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.oce.pr.gov/Attribution
Display this wherever you show the data. It arrives on every response as provenance.attribution_text.
Source: data.oce.pr.gov. Dataset attribution as stated by each publishing agency.
Cache: up to 3600s
