Compare
Geocode AI vs. raw OpenStreetMap
Every boundary we serve comes from OpenStreetMap. The question is whether you want to run the lookups, polygon assembly, caching and validation yourself.
| Doing it yourself | Geocode AI | |
|---|---|---|
| Data source | OpenStreetMap | OpenStreetMap |
| Look up by name | Nominatim search | search_boundaries (free) |
| Polygon by id | Nominatim polygon_geojson or Overpass, then assemble the relation | get_boundary, one call |
| Reverse: every boundary at a point | Several Overpass or Nominatim calls | reverse_boundaries, one call |
| Subdivisions of a boundary | Overpass area query, filter neighbours yourself | list_children (free) |
| Point-in-polygon batches | Your own PostGIS or Turf | contains_points |
| Simplified for maps | Simplify yourself | low / medium / high / full |
| Formats | GeoJSON or OSM XML | GeoJSON, KML, WKT, GML, SVG |
| Usage limits | Public Nominatim: about 1 request a second, no heavy use | Plan limits; cached for everyone |
| Cost | Free (your servers and time) | Free tier, then per unit |
| Describe an area in words |
What doing it yourself involves
OpenStreetMap stores an administrative boundary as a relation: a list of ways that together form outer and inner rings. To get a usable polygon you find the relation (usually with Nominatim), fetch its member ways (Nominatim's polygon_geojson, Overpass or a polygon service), stitch them into closed rings, repair self-intersections, and decide what to do with exclaves and enclaves.
Then you need the hierarchy: which county a city is in, or which districts a city has. Overpass area queries answer that, but they also return neighbours that share a border, so you filter them by geometry. Finally the public servers ask for light use: the Nominatim usage policy allows about one request per second and no bulk downloads, so a product that geocodes its users' data needs a cache in front.
Geocode AI is that cache and pipeline as an API: each boundary is fetched once, validated, stored in PostGIS and served to everyone after that, with the hierarchy, exports and point checks on top. Upstream requests go through a single rate-limited lease, so we stay within the policy for you.