Socrata
App · 8 actions
Read open data from any Socrata portal (Tyler Data & Insights), used by hundreds of cities and governments: search datasets across portals, read rows with filters and sorting, and count them.
Actions
| Action | What it does |
|---|---|
| Count rows | Count how many of a dataset's rows match a filter, or all of them. |
| Count rows by value | Count how many rows hold each value of a column, such as complaints per borough, most common first. |
| Find portals | Find the Socrata portals that publish data about a place or topic, with how many matching datasets each has. |
| Get a dataset | Get a dataset's details and its columns, with each column's field name and type for filtering and sorting. |
| Get rows | Read a dataset's rows: choose columns, filter, search, sort and page through them. |
| List categories | List a portal's dataset categories, with how many datasets are in each. |
| List tags | List a portal's most used tags, with how many datasets carry each. |
| Search datasets | Search the datasets of every Socrata portal at once, or of one portal, by words, category and tag. |
Count rows
Count how many of a dataset's rows match a filter, or all of them.
Inputs
- Portal
portaltextRequired - The portal's web address, such as data.cityofnewyork.us. A link to any page on the portal works too.
- Dataset
datasettextRequired - Pick a dataset, or enter its id (such as erm2-nwe9), or paste a link to its page. The list shows the portal's most viewed datasets.
- Exact matches
filtersobject - Only rows whose column holds exactly this value, by field name, such as borough = BRONX.
- Filter
wheretext - Only rows meeting this condition, written in SoQL with column field names, such as created_date > '2026-01-01' AND borough = 'BRONX'.
- Search words
querytext - Only rows containing these words in any text column.
Outputs
countnumber- How many rows match.
dataset_idtext- The dataset that was counted.
Example output
{
"count": 140327,
"dataset_id": "erm2-nwe9"
}Count rows by value
Count how many rows hold each value of a column, such as complaints per borough, most common first.
Inputs
- Portal
portaltextRequired - The portal's web address, such as data.cityofnewyork.us. A link to any page on the portal works too.
- Dataset
datasettextRequired - Pick a dataset, or enter its id (such as erm2-nwe9), or paste a link to its page. The list shows the portal's most viewed datasets.
- Column
columntextRequired - The column whose values to count.
- Exact matches
filtersobject - Only rows whose column holds exactly this value, by field name, such as borough = BRONX.
- Filter
wheretext - Only rows meeting this condition, written in SoQL with column field names, such as created_date > '2026-01-01' AND borough = 'BRONX'.
- Search words
querytext - Only rows containing these words in any text column.
- Values
limitnumber - How many of the most common values to return.From 1 to 1000. Default:
20.
Outputs
columntext- The column whose values were counted.
countnumber- How many values are listed.
dataset_idtext- The dataset that was counted.
groupslist- Each value and how many rows hold it, most common first.
Example output
{
"column": "borough",
"count": 3,
"dataset_id": "erm2-nwe9",
"groups": [
{
"count": 45952,
"value": "BROOKLYN"
},
{
"count": 33583,
"value": "QUEENS"
},
{
"count": 29824,
"value": "MANHATTAN"
}
]
}Find portals
Find the Socrata portals that publish data about a place or topic, with how many matching datasets each has.
Inputs
- Search words
querytextRequired - A place or topic, such as chicago or restaurant inspections.
- Region
regiontext - Which catalogue to search. Portals in Europe are listed only in the European one.One of:
us(North America and worldwide),eu(Europe). Default:us. - Results
limitnumber - How many portals to return.From 1 to 200. Default:
20.
Outputs
countnumber- How many portals are listed.
datasets_searchednumber- How many matching datasets were grouped (at most the first 1,000).
portalslist- The portals, the one with most matching datasets first.
Example output
{
"count": 2,
"datasets_searched": 1000,
"portals": [
{
"example_dataset": "Chicago Street Names",
"example_dataset_id": "i6bp-fvbx",
"matching_datasets": 906,
"portal": "data.cityofchicago.org",
"url": "https://data.cityofchicago.org"
},
{
"example_dataset": "Assessor [Archived 05-11-2022] - Residential Modeling Characteristics (Chicago)",
"example_dataset_id": "8f9d-wy2d",
"matching_datasets": 46,
"portal": "datacatalog.cookcountyil.gov",
"url": "https://datacatalog.cookcountyil.gov"
}
]
}Get a dataset
Get a dataset's details and its columns, with each column's field name and type for filtering and sorting.
Inputs
- Portal
portaltextRequired - The portal's web address, such as data.cityofnewyork.us. A link to any page on the portal works too.
- Dataset
datasettextRequired - Pick a dataset, or enter its id (such as erm2-nwe9), or paste a link to its page. The list shows the portal's most viewed datasets.
Outputs
api_endpointtext- The address its rows can be read from, for datasets.
attributiontext- Who the data is credited to.
categorytext- The portal's category for it.
columnslist- Its columns. Map-join columns are left out.
created_attext- When it was published (ISO 8601, UTC).
descriptiontext- The dataset's description, which may contain HTML.
downloadsnumber- How many times it has been downloaded.
idtext- The dataset's id, two groups of four characters such as erm2-nwe9.
licensetext- The licence the data is published under, when it names one.
nametext- The dataset's name.
page_urltext- The dataset's page on the portal.
portaltext- The portal that publishes it, such as data.cityofnewyork.us.
tagslist- The portal's tags for it.
typetext- What it is: dataset, map, chart, filter, file, href or story.
updated_attext- When its data last changed (ISO 8601, UTC).
viewsnumber- How many times its page has been viewed.
Example output
{
"api_endpoint": "https://data.cityofnewyork.us/resource/erm2-nwe9.json",
"attribution": "311",
"category": "Social Services",
"columns": [
{
"description": "Unique identifier of a Service Request (SR) in the open data set",
"field_name": "unique_key",
"name": "Unique Key",
"type": "text"
},
{
"description": "Date SR was created",
"field_name": "created_date",
"name": "Created Date",
"type": "calendar_date"
},
{
"description": "Provided by the submitter and confirmed by geovalidation.",
"field_name": "borough",
"name": "Borough",
"type": "text"
}
],
"created_at": "2011-10-10T05:52:17Z",
"description": "311 responds to thousands of inquiries, comments and requests from customers every single day.",
"downloads": 608960,
"id": "erm2-nwe9",
"license": null,
"name": "311 Service Requests from 2020 to Present",
"page_url": "https://data.cityofnewyork.us/d/erm2-nwe9",
"portal": "data.cityofnewyork.us",
"tags": [
"311",
"311 service requests",
"city government",
"pothole",
"rodent"
],
"type": "dataset",
"updated_at": "2026-10-15T01:38:22Z",
"views": 1327802
}Get rows
Read a dataset's rows: choose columns, filter, search, sort and page through them.
Inputs
- Portal
portaltextRequired - The portal's web address, such as data.cityofnewyork.us. A link to any page on the portal works too.
- Dataset
datasettextRequired - Pick a dataset, or enter its id (such as erm2-nwe9), or paste a link to its page. The list shows the portal's most viewed datasets.
- Columns
columnslist - The columns to return. Leave empty for all.
- Exact matches
filtersobject - Only rows whose column holds exactly this value, by field name, such as borough = BRONX.
- Filter
wheretext - Only rows meeting this condition, written in SoQL with column field names, such as created_date > '2026-01-01' AND borough = 'BRONX'.
- Search words
querytext - Only rows containing these words in any text column.
- Sort by column
sort_columntext - The column to sort the rows by.
- Sort direction
sort_directiontext - Which way to sort.One of:
asc(Ascending (A to Z, oldest or smallest first)),desc(Descending (Z to A, newest or largest first)). Default:asc. - Rows
limitnumber - How many rows to return.From 1 to 5000. Default:
100. - Skip
offsetnumber - How many rows to skip first, to page through them.From 0 to 10000000. Default:
0.
Outputs
countnumber- How many rows are on this page.
dataset_idtext- The dataset the rows came from.
has_moretrue/false- True when this page was full, so more rows may follow.
rowslist- The rows, each keyed by column field name. Socrata sends numbers and dates as text.
Example output
{
"count": 2,
"dataset_id": "erm2-nwe9",
"has_more": true,
"rows": [
{
"borough": "BRONX",
"complaint_type": "Noise - Residential",
"created_date": "2026-10-14T01:49:14.000",
"unique_key": "70739944"
},
{
"borough": "BRONX",
"complaint_type": "Noise - Residential",
"created_date": "2026-10-14T01:45:37.000",
"unique_key": "70749193"
}
]
}List categories
List a portal's dataset categories, with how many datasets are in each.
Inputs
- Portal
portaltextRequired - The portal's web address, such as data.cityofnewyork.us. A link to any page on the portal works too.
Outputs
categorieslist- The portal's categories, largest first.
countnumber- How many categories there are.
Example output
{
"categories": [
{
"count": 906,
"name": "City Government"
},
{
"count": 653,
"name": "Education"
},
{
"count": 369,
"name": "Transportation"
}
],
"count": 3
}List tags
List a portal's most used tags, with how many datasets carry each.
Inputs
- Portal
portaltextRequired - The portal's web address, such as data.cityofnewyork.us. A link to any page on the portal works too.
- Results
limitnumber - How many tags to return.From 1 to 1000. Default:
100.
Outputs
countnumber- How many tags are listed.
tagslist- The portal's most used tags, most used first.
Example output
{
"count": 3,
"tags": [
{
"count": 149,
"name": "doe"
},
{
"count": 122,
"name": "dcp"
},
{
"count": 105,
"name": "parks"
}
]
}Search datasets
Search the datasets of every Socrata portal at once, or of one portal, by words, category and tag.
Inputs
- Search words
querytext - Words to look for in names, descriptions and columns. Leave empty to list a portal's datasets.
- Portal
portaltext - Only this portal's datasets, such as data.cityofnewyork.us. Leave empty to search every portal.
- Category
categorytext - Only datasets in this category of the portal.
- Tag
tagtext - Only datasets with this tag on the portal.
- Type
asset_typetext - What kind of item to find.One of:
dataset(Datasets),map(Maps),chart(Charts),filter(Filtered views),file(Files and documents),href(External datasets (links)),story(Stories),all(Everything). Default:dataset. - Sort by
ordertext - The order of the results. Best match needs search words; without them the most viewed come first.One of:
relevance(Best match),most_viewed(Most viewed),recently_updated(Recently updated),name(Name A to Z). Default:relevance. - Region
regiontext - Which catalogue to search. Portals in Europe are listed only in the European one.One of:
us(North America and worldwide),eu(Europe). Default:us. - Results
limitnumber - How many to return.From 1 to 100. Default:
10. - Skip
offsetnumber - How many matches to skip first, to page through them.From 0 to 9999. Default:
0.
Outputs
countnumber- How many match in all, beyond this page.
datasetslist- The matches on this page.
has_moretrue/false- True when more matches follow; raise Skip to see them.
Example output
{
"count": 23,
"datasets": [
{
"api_endpoint": "https://data.cityofnewyork.us/resource/erm2-nwe9.json",
"attribution": "311",
"category": "Social Services",
"columns": [
{
"description": "Incident location zip code, provided by geo validation.",
"field_name": "incident_zip",
"name": "Incident Zip",
"type": "text"
},
{
"description": "Provided by the submitter and confirmed by geovalidation.",
"field_name": "borough",
"name": "Borough",
"type": "text"
}
],
"created_at": "2011-10-10T05:52:17.000Z",
"description": "311 responds to thousands of inquiries, comments and requests from customers every single day.",
"downloads": 608960,
"id": "erm2-nwe9",
"license": null,
"name": "311 Service Requests from 2020 to Present",
"page_url": "https://data.cityofnewyork.us/Social-Services/311-Service-Requests-from-2020-to-Present/erm2-nwe9",
"portal": "data.cityofnewyork.us",
"tags": [
"311",
"311 service requests",
"city government",
"pothole",
"rodent"
],
"type": "dataset",
"updated_at": "2026-10-15T01:38:22.000Z",
"views": 1327802
}
],
"has_more": true
}