search_datasets
Find open data across New York's state, county, city and agency portals by searching dataset titles, tags and column names, then filter by topic, place, portal, format or update date.
Instructions
Search dataset titles, descriptions, tags and column names across the harvested Socrata and ArcGIS portals in New York (needs the harvested index). Filter by topic, place, portal, platform family, download format (csv, geojson, shapefile, kml, api, xlsx) or last-updated date. topic is one of 24 shared topics (list_topics), assigned from each dataset's own categories, tags and department; a dataset can have several. Give a query, a topic, or both; a topic alone lists that topic, most-viewed first. Rows carry their topic ids. One call gives the whole answer. total_matches is the true number of matching datasets. When they all fit, the reply lists them. When they do not, the reply counts every match by portal (auto_grouped: true; top titles when room; groups_size_note says what was cut), lists the best-ranked rows that fit, and writes every match to a CSV (export.path, export.rows; also a resource_link). Use group_by to summarize by entity, county or platform_family instead. Rows are compact (id, name, portal, type, update date, link, formats); detail: 'full' adds description, API endpoint, views, column count and, for Socrata, the domain + 4x4 to hand to the socrata MCP. Replies aim for about 20 KB. Each reply also lists registry portals the index does not search, so no result is not proof that no data exists. When the index is more than 14 days old (NY_DATA_INDEX_STALE_DAYS), the reply carries index_note saying so and how to update it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_datasets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Most rows to list in the reply. Default 10. More matches than this are summarized by portal and written to the CSV. Not with group_by | |
| place | No | County, city, borough or region. Statewide portals are always included | |
| query | No | e.g. 'rodent', 'tax parcels', 'lead service lines'. Optional when topic is given | |
| topic | No | One of the 24 shared topics (list_topics has names and counts), e.g. 'housing', 'transportation', 'elections' | |
| detail | No | 'compact' (default) or 'full'. Not with group_by | |
| export | No | 'auto' (default): write the CSV of every match when the reply cannot list them all. 'always' or 'never' | |
| format | No | csv, json, geojson, shapefile, kml, api, arcgis, xlsx, geopackage, pdf | |
| offset | No | Rarely needed: skip this many ranked rows to page by hand (next_offset). Turns off the auto-summary and the automatic CSV. Not with group_by | |
| portal | No | source_id, registry_id (every site of that government) or part of a portal name | |
| group_by | No | Group every match by portal, entity, county or platform_family, with counts and top titles per group, instead of a page of results | |
| top_per_group | No | Titles listed per group with group_by. Default 3 | |
| updated_since | No | YYYY-MM-DD | |
| platform_family | No |