# ArcGIS Hub

> Find and use the open data that cities, counties, states and organisations publish on ArcGIS Hub: search datasets across all Hub sites or one site, read a dataset's details and download links, and pull, filter, map and summarise its records. No account or API key is required.

App · 6 actions. Web page: https://docs.lodol.com/docs/integrations/arcgis-hub

## Actions

### Find open data sites

Find the ArcGIS Hub sites (open data portals) of a city, county, state or organisation, with each site's address.

**Inputs**

- Search for (`query`, text, required): A place or organisation, for example Washington DC open data.
- Limit (`limit`, number): The most sites to return (up to 100). From 1 to 100. Default: `20`.

**Outputs**

- `site_count` (number)
- `sites` (list)
- `total_count` (number)

**Example output**

```json
{
  "site_count": 1,
  "sites": [
    {
      "created": "2016-03-29T19:31:15Z",
      "domain": "opendata.dc.gov",
      "organization": "City of Washington, DC",
      "site_id": "b907a83b8d3947bb8e318a7b93abadf8",
      "summary": "On this site, the District of Columbia government shares hundreds of datasets.",
      "title": "Open Data DC",
      "updated": "2026-08-20T13:02:47Z",
      "url": "https://opendata.dc.gov"
    }
  ],
  "total_count": 16
}
```

### Find records near a location

Find a dataset's records at a point or within a distance of it, nearest first: which zoning district or parcel a spot is in, or the incidents, stops or facilities around it.

**Inputs**

- Dataset (`dataset`, text, required): The dataset's ID from 'Search datasets', or the address of its page on any ArcGIS Hub site.
- Latitude (`latitude`, number, required): The point's latitude, for example 38.8977. From -90 to 90.
- Longitude (`longitude`, number, required): The point's longitude, for example -77.0365. From -180 to 180.
- Within (`distance`, number): How far from the point to look. 0 finds only what the point is inside or on, such as its zoning area. From 0 to 1000000. Default: `0`.
- Unit (`unit`, text): The unit of the distance. One of: `meters`, `kilometers`, `feet`, `miles`. Default: `meters`.
- Advanced filter (`where`, text): A filter in ArcGIS's SQL style, combined with the filters above, for example POPULATION > 10000 AND STATE = 'TX'.
- Fields (`fields`, list): The fields each record includes. Leave empty for all of them.
- Limit (`limit`, number): The most records to return (up to 5,000). From 1 to 5000. Default: `25`.
- Location (`geometry`, text): Whether each record includes where it is: a latitude and longitude (the middle of a line or area), or its full shape. One of: `none` (Leave it out), `location` (Latitude and longitude), `geojson` (Full shape (GeoJSON)). Default: `location`.

**Outputs**

- `dataset_id` (text)
- `distance_meters` (number)
- `latitude` (number)
- `longitude` (number)
- `record_count` (number)
- `records` (list)
- `title` (text)
- `total_count` (number)

**Example output**

```json
{
  "dataset_id": "f9cc541fc8c04106a05a1a4f1e7e813c_4",
  "distance_meters": 300.0,
  "latitude": 38.8977,
  "longitude": -77.0365,
  "record_count": 1,
  "records": [
    {
      "BLOCK": "600 - 699 BLOCK OF 15TH STREET NW",
      "CCN": "22044596",
      "OFFENSE": "ROBBERY",
      "distance_meters": 246.9,
      "latitude": 38.8978292,
      "longitude": -77.0336521
    }
  ],
  "title": "Crime Incidents in 2022",
  "total_count": 9
}
```

### Get dataset details

Get a dataset's description, publisher, licence, fields, number of records and download links (CSV, GeoJSON, shapefile and KML).

**Inputs**

- Dataset (`dataset`, text, required): The dataset's ID from 'Search datasets', or the address of its page on any ArcGIS Hub site.

**Outputs**

- `attribution` (text)
- `bbox` (list)
- `created` (text)
- `dataset_id` (text)
- `description` (text)
- `downloads` (object)
- `fields` (list)
- `file_url` (text)
- `geometry_type` (text)
- `has_records` (true/false)
- `item_id` (text)
- `layer_id` (number)
- `layer_name` (text)
- `layers` (list)
- `license` (text)
- `owner` (text)
- `page_url` (text)
- `publisher` (text)
- `record_count` (number)
- `service_url` (text)
- `summary` (text)
- `tags` (list)
- `title` (text)
- `type` (text)
- `updated` (text)

**Example output**

```json
{
  "attribution": "Metropolitan Police Department",
  "bbox": [
    -77.1153,
    38.8135,
    -76.9097,
    38.9946
  ],
  "created": "2022-01-03T15:37:50Z",
  "dataset_id": "f9cc541fc8c04106a05a1a4f1e7e813c_4",
  "description": "The dataset contains a subset of locations and attributes of incidents reported in the ASAP crime report database by the Metropolitan Police Department.",
  "downloads": {
    "csv": "https://hub.arcgis.com/api/download/v1/items/f9cc541fc8c04106a05a1a4f1e7e813c/csv?layers=4&spatialRefId=4326",
    "geojson": "https://hub.arcgis.com/api/download/v1/items/f9cc541fc8c04106a05a1a4f1e7e813c/geojson?layers=4&spatialRefId=4326",
    "kml": "https://hub.arcgis.com/api/download/v1/items/f9cc541fc8c04106a05a1a4f1e7e813c/kml?layers=4&spatialRefId=4326",
    "shapefile": "https://hub.arcgis.com/api/download/v1/items/f9cc541fc8c04106a05a1a4f1e7e813c/shapefile?layers=4&spatialRefId=4326"
  },
  "fields": [
    {
      "choices": [],
      "label": "Central Complaint Number",
      "name": "CCN",
      "type": "text"
    },
    {
      "choices": [],
      "label": "Report Date",
      "name": "REPORT_DAT",
      "type": "date_time"
    },
    {
      "choices": [],
      "label": "Offense",
      "name": "OFFENSE",
      "type": "text"
    },
    {
      "choices": [],
      "label": "Ward",
      "name": "WARD",
      "type": "text"
    }
  ],
  "file_url": null,
  "geometry_type": "point",
  "has_records": true,
  "item_id": "f9cc541fc8c04106a05a1a4f1e7e813c",
  "layer_id": 4,
  "layer_name": "Crime Incidents - 2022",
  "layers": [],
  "license": "Creative Commons Attribution 4.0 International",
  "owner": "DCGISopendata",
  "page_url": "https://hub.arcgis.com/datasets/f9cc541fc8c04106a05a1a4f1e7e813c_4",
  "publisher": "Metropolitan Police Department",
  "record_count": 27162,
  "service_url": "https://maps2.dcgis.dc.gov/dcgis/rest/services/FEEDS/MPD/FeatureServer/4",
  "summary": "The dataset contains a subset of locations and attributes of incidents reported in the ASAP crime report database by the Metropolitan Police Department.",
  "tags": [
    "crime",
    "washington dc",
    "mpd"
  ],
  "title": "Crime Incidents in 2022",
  "type": "Feature Layer",
  "updated": "2025-08-13T17:27:07Z"
}
```

### Get records

Pull a dataset's records (its rows), filtered by a field value, a date range or an advanced filter, sorted and with only the fields you choose.

**Inputs**

- Dataset (`dataset`, text, required): The dataset's ID from 'Search datasets', or the address of its page on any ArcGIS Hub site.
- Only where field (`match_field`, text): Keep only records whose value in this field matches the next one.
- Equals (`match_value`, text): The value to keep, picked from the values the field holds or typed. For a date field, every record on that day matches.
- Date field (`date_field`, text): The date the From and To dates apply to.
- From (`from_date`, date): Only records on or after this date, in the date field.
- To (`to_date`, date): Only records on or before this date, in the date field.
- Advanced filter (`where`, text): A filter in ArcGIS's SQL style, combined with the filters above, for example POPULATION > 10000 AND STATE = 'TX'.
- Fields (`fields`, list): The fields each record includes. Leave empty for all of them.
- Sort by (`order_by`, text): The field to sort the records by.
- Order (`order`, text): Which way to sort. One of: `asc` (Ascending (A to Z, oldest first, smallest first)), `desc` (Descending (Z to A, newest first, largest first)). Default: `asc`.
- Limit (`limit`, number): The most records to return (up to 5,000). From 1 to 5000. Default: `100`.
- Skip (`offset`, number): How many records to skip, to get the next batch. Use the previous step's next_offset. From 0 to 10000000. Default: `0`.
- Location (`geometry`, text): Whether each record includes where it is: a latitude and longitude (the middle of a line or area), or its full shape. One of: `none` (Leave it out), `location` (Latitude and longitude), `geojson` (Full shape (GeoJSON)). Default: `none`.

**Outputs**

- `dataset_id` (text)
- `filter` (text)
- `has_more` (true/false)
- `next_offset` (number)
- `offset` (number)
- `record_count` (number)
- `records` (list)
- `title` (text)
- `total_count` (number)

**Example output**

```json
{
  "dataset_id": "f9cc541fc8c04106a05a1a4f1e7e813c_4",
  "filter": "OFFENSE = 'HOMICIDE'",
  "has_more": true,
  "next_offset": 1,
  "offset": 0,
  "record_count": 1,
  "records": [
    {
      "CCN": "22075344",
      "OFFENSE": "HOMICIDE",
      "REPORT_DAT": "2022-11-29T05:00:00Z",
      "WARD": "1",
      "latitude": 38.9350728,
      "longitude": -77.0201289
    }
  ],
  "title": "Crime Incidents in 2022",
  "total_count": 203
}
```

### Search datasets

Search the open data published on ArcGIS Hub by governments and organisations, across all Hub sites or within one, such as opendata.dc.gov.

**Inputs**

- Search for (`query`, text): Words to look for in titles, descriptions and tags.
- Hub site (`site`, text): Search only one Hub site's catalogue, by its address. Leave empty to search all of ArcGIS Hub.
- Type (`dataset_type`, text): Only datasets of this type. One of: `any` (Any kind), `records` (Live tables and map layers (records you can pull)), `csv` (CSV files), `shapefile` (Shapefiles), `geojson` (GeoJSON files), `kml` (KML files), `geodatabase` (File geodatabases). Default: `any`.
- Updated since (`updated_since`, date): Only datasets updated on or after this date.
- Sort (`sort`, text): The order of the results. One of: `relevance` (Best match), `updated` (Recently updated), `created` (Newest). Default: `relevance`.
- Open data only (`open_data_only`, true/false): Only datasets their publishers have shared as open data. Turn off to include every public item on ArcGIS. A Hub site's search is always its open data. Default: `true`.
- Limit (`limit`, number): The most datasets to return (up to 100). From 1 to 100. Default: `20`.
- Skip (`offset`, number): How many results to skip, to get the next page. Use the previous search's next_offset. From 0 to 10000. Default: `0`.

**Outputs**

- `dataset_count` (number)
- `datasets` (list)
- `has_more` (true/false)
- `next_offset` (number)
- `site` (text)
- `total_count` (number)
- `total_is_estimate` (true/false)

**Example output**

```json
{
  "dataset_count": 1,
  "datasets": [
    {
      "created": "2022-01-03T15:37:50Z",
      "dataset_id": "f9cc541fc8c04106a05a1a4f1e7e813c",
      "file_url": null,
      "has_records": true,
      "owner": "DCGISopendata",
      "page_url": "https://opendata.dc.gov/datasets/f9cc541fc8c04106a05a1a4f1e7e813c",
      "publisher": "Metropolitan Police Department",
      "service_url": "https://maps2.dcgis.dc.gov/dcgis/rest/services/FEEDS/MPD/FeatureServer/4",
      "summary": "The dataset contains a subset of locations and attributes of incidents reported in the ASAP crime report database by the Metropolitan Police Department.",
      "tags": [
        "crime",
        "washington dc",
        "mpd"
      ],
      "title": "Crime Incidents in 2022",
      "type": "Feature Service",
      "updated": "2025-08-13T17:27:07Z",
      "views": 98316
    }
  ],
  "has_more": true,
  "next_offset": 1,
  "site": "opendata.dc.gov",
  "total_count": 39,
  "total_is_estimate": false
}
```

### Summarize records

Count a dataset's records, or total, average or find the smallest or largest value of a field, overall or for each value of another field (for example, incidents per ward).

**Inputs**

- Dataset (`dataset`, text, required): The dataset's ID from 'Search datasets', or the address of its page on any ArcGIS Hub site.
- Statistic (`statistic`, text): What to calculate. One of: `count` (Count of records), `sum`, `avg` (Average), `min` (Minimum), `max` (Maximum). Default: `count`.
- Of field (`field`, text): The field to calculate it from. Only when Statistic is Sum, Average, Minimum or Maximum.
- For each value of (`group_by`, text): Calculate it separately for each value of this field. Leave empty for one overall result.
- Only where field (`match_field`, text): Keep only records whose value in this field matches the next one.
- Equals (`match_value`, text): The value to keep, picked from the values the field holds or typed. For a date field, every record on that day matches.
- Date field (`date_field`, text): The date the From and To dates apply to.
- From (`from_date`, date): Only records on or after this date, in the date field.
- To (`to_date`, date): Only records on or before this date, in the date field.
- Advanced filter (`where`, text): A filter in ArcGIS's SQL style, combined with the filters above, for example POPULATION > 10000 AND STATE = 'TX'.
- Limit (`limit`, number): The most groups to return, largest first (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `dataset_id` (text)
- `field` (text)
- `filter` (text)
- `group_by` (text)
- `group_count` (number)
- `groups` (list)
- `statistic` (text)
- `title` (text)
- `value` (number)

**Example output**

```json
{
  "dataset_id": "f9cc541fc8c04106a05a1a4f1e7e813c_4",
  "field": null,
  "filter": "1=1",
  "group_by": "WARD",
  "group_count": 9,
  "groups": [
    {
      "group": "2",
      "value": 4794
    },
    {
      "group": "5",
      "value": 4497
    }
  ],
  "statistic": "count",
  "title": "Crime Incidents in 2022",
  "value": 27162
}
```
