Places API

Townhall API

The Townhall API returns OpenStreetMap records for about 72,909 townhall buildings worldwide. Records identify local government places and provide coordinates, names, addresses, and OpenStreetMap tags, alongside settlement and environmental context. Developers and data buyers can use the records to map civic buildings, study local coverage, and connect townhalls with surrounding geographic data.

Spain, United States · JSON, GeoJSON, CSV, Parquet

POSThttps://api.outerview.ai/v1/stream
curl https://api.outerview.ai/v1/stream \
  -X POST \
  -H "Authorization: Bearer $OUTERVIEW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "townhall",
    "region_id": "96792",
    "limit": 50
  }'

Key facts

  • The Townhall API contains about 72,909 records.
  • Spain accounts for 46.3% of listed coverage.
  • The United States accounts for 33.7% of listed coverage.
  • Portugal accounts for 15.5% of listed coverage.
  • Lisbon is among the cities represented in the coverage data.

Quick start

  1. 1. Create an account and generate an API key on the developer platform.
  2. 2. Send it as a Bearer token in the Authorization header.
  3. 3. Query by place, radius or date (the example searches Lisbon).

Bulk download

GET https://api.outerview.ai/api/v1/beacon/townhall/download?format=geojson

Add &region_slug=… to limit to one place. Formats: csv, geojson, parquet.

Sample records

Real records from the data, trimmed to the main fields.

10 records
NameCountryLatitudeLongitude
Mairie de YaguinéMali15.12695-10.72587
GomitradougouMali14.44651-8.37499
Mairie de la commune Urbaine de NionoMali14.24958-5.98897
Mairie de NaraMali15.16423-7.29075
Conseil de Cercle de BankassMali14.08049-3.51793
Mairie de BankassMali14.0825-3.51892
Mairie de Koporo NaMali14.12913-3.36123
Marie commune de Pel-MaoudéMali14.08749-3.27374
Mairie YoudiouMali14.27419-3.17375
MairieMali14.64671-3.11251

Overview

This dataset covers townhalls: buildings used for local government, often containing offices or meeting rooms, or marked by a clock. The records come from OpenStreetMap contributors.

It is intended for developers, mapping teams, researchers, and data buyers building civic-place directories, geographic analyses, or location-based applications.

Geographic coverage

The dataset contains about 72,909 records. Spain accounts for 46.3% of the listed coverage, the United States 33.7%, and Portugal 15.5%; other represented countries include Algeria, Morocco, Canada, Mali, and Cuba.

The state-level coverage includes León, Castilla-La Mancha, and Andalucía. Sampled city coverage includes Lisbon, Oran, Braga, and Guimarães.

Record fields

Each record includes latitude and longitude, OpenStreetMap properties, source dataset, settlement class, and climate group. Names are present on 97% of records and street addresses on 91%.

Additional context includes population within 1 km, flood zone, tree-canopy percentage, median household income, median home value, and land-use categories. Land-use categories are present on 25% of records; tree canopy is present on 93%, income on 87%, and home value on 86%.

  • latLatitude
  • lngLongitude
  • propertiesAll OpenStreetMap tags for the place
  • sourceSource dataset
  • nameName of the place
  • addressStreet address
  • settlement_classCity, town or countryside
  • climate_groupClimate group
  • ghsl_pop_1km_2020How many people live here (people)
  • flood_zoneFlood risk
  • nlcd_tree_canopy_pctTree cover (%)
  • acs_median_household_income_usdTypical household income (USD (2024 dollars))
  • acs_median_home_value_usdTypical home value (USD)
  • land_use_categoriesLand use

Queries and data access

Use geographic criteria such as region or radius, select fields relevant to your application, and apply date filters where applicable. Stream queries for live use or download the whole dataset in bulk.

Available formats are JSON, GeoJSON, CSV, and Parquet. The dataset is sourced from OpenStreetMap contributors under the ODbL.

Use cases

Build a searchable directory or map of townhalls, compare civic-building coverage between regions, and identify towns where mapped local-government buildings are sparse.

Join townhall locations to nearby population, flood-risk, tree-cover, income, or home-value context for planning and research. Use names, addresses, and coordinates to support civic navigation and place-data enrichment.

Pricing and access

The data is available in JSON, GeoJSON, CSV, and Parquet. API access uses an API key, with a free tier and paid plans for higher limits and bulk downloads.

No plan prices are specified here. OpenStreetMap contributor data is provided under the ODbL.

Frequently asked questions

Is there an API for townhall locations?

Yes. The Townhall API provides about 72,909 records for local-government buildings mapped in OpenStreetMap. Records can include coordinates, names, addresses, and other place context, with data available in JSON, GeoJSON, CSV, and Parquet.

Which countries are covered by the Townhall API?

The listed coverage is led by Spain, the United States, and Portugal. Other represented countries include Algeria, Morocco, Canada, Mali, and Cuba. Spain accounts for 46.3% of coverage, the United States 33.7%, and Portugal 15.5%.

Can I find townhalls in Lisbon?

Yes, Lisbon is among the cities represented in the coverage data. The dataset has townhall records with geographic coordinates, so they can be used for location-based mapping and analysis.

What fields does the Townhall API return?

Records include latitude, longitude, OpenStreetMap properties, source, name, address, settlement class, and climate group. They may also include nearby population, flood zone, tree canopy, household income, home value, and land-use categories.

How often is the townhall data updated?

The update frequency is not specified in the available dataset information. The records are sourced from OpenStreetMap contributors, so check the API’s current documentation or dataset metadata for the latest update details.

Can I filter townhall records by region or radius?

The dataset provides coordinates and geographic coverage, which support region- and radius-based analysis. The available information does not specify exact query syntax or filter parameters, so consult the API documentation for supported request details.

Can I download the complete townhall dataset?

Bulk downloads are available on paid plans for higher limits and whole-dataset access. The dataset can be delivered in JSON, GeoJSON, CSV, or Parquet; plan prices are not specified here.

What does the Townhall API consider a townhall?

It covers a building for local government, typically appearing as a civic structure with offices, meeting rooms, or a clock. The records are sourced from OpenStreetMap, where mapped features are represented through place data and tags.

Start building with the Townhall API

Free to try. Paid plans raise limits and unlock bulk downloads.