Concepts

Place IDs, rank, datasource, the error shape, response formats and how this API differs from Geoapify.

Place IDs

Geoapify's place_id is an opaque blob. Ours is readable and typed: gp:<kind>:<key> (ADR 0006). The gateway routes an ID to the right engine by its prefix, and IDs stay stable across monthly Data Releases while the thing still exists.

KindMeaningExample
gp:addrAddress Point (Canonical Address)gp:addr:canonical:37388970
gp:osmOpenStreetMap node, way or relation (n, w, r plus id)gp:osm:r161816
gp:pcPostcode: US ZIP or Canadian codegp:pc:US-46204, gp:pc:CA-K1A0A1
gp:tzTimezone (IANA name)gp:tz:America/Indiana/Indianapolis
gp:isoStored isolinegp:iso:<id>

You get a Place ID in the place_id property of geocoding results. Where it can be used as input:

  • Boundaries. id on /boundaries/part-of and /boundaries/consists-of accepts gp:osm (administrative) and gp:pc (postal) IDs. Other kinds return an empty FeatureCollection. gp:tz:<tzid> appears as the returned place_id of timezone features (boundaries=timezone) but does not resolve as an id.

  • Isolines. GET /isoline?id=<id> retrieves a stored result.

Geoapify hex place IDs are not accepted.

Rank, confidence and match type

Geoapify returns a rank object on each result. Ours fills the same fields from the Geocoding Waterfall's own scoring (ADR 0002): libpostal parses the input, then an exact Canonical Address match, then interpolation between neighbors, then fuzzy search. All scores are on a 0 to 1 scale.

FieldMeaning
confidenceOverall match score. 1 is a full match.
confidence_city_level, confidence_street_level, confidence_building_levelScore at each level.
match_typeOne of full_match, inner_part, match_by_building, match_by_street, match_by_postcode, match_by_city_or_disrict (sic, as in Geoapify), match_by_country_or_state.
importancePresent on some results. Address Point matches use 1; interpolated points use 0.5.

The X-Geo-Stage response header names the Waterfall stage that produced the first result. bias never changes rank values. rank.popularity is never returned.

Datasource

Every result carries a datasource for the source it actually came from, for provenance as well as licensing.

  • OSM-derived (gp:osm:*): attribution is "© OpenStreetMap contributors" under the Open Database License.

  • Address Point (gp:addr:*): sourcename is the Source Record source (nad, nar, overture) with each licence's attribution. When several sources agree, sourcename joins them with + (for example nad+overture) and sources[] lists each one. This sources[] list is an addition to Geoapify's shape.

  • Interpolated points use sourcename: canonical-neighbours.

Surface the attribution wherever you display results.

Error shape

Errors from the gateway are JSON with three fields:

{ "statusCode": 400, "error": "Bad Request", "message": "Parameter 'text' is required" }
Statuserror
400Bad Request
401Unauthorized
404Not Found
409Conflict
413Payload Too Large
429Too Many Requests (over 60 per minute)
500Internal Server Error
502Bad Gateway
503Service Unavailable
504Gateway Timeout (Database query timed out)

Formats

Many endpoints take a format parameter. Availability, from the spec:

Endpointformat values (default first)
/geocode/search, /geocode/reverse, /geocode/autocompletegeojson, json, xml
/postcode/search, /postcode/listgeojson, json, xml
/routinggeojson, json, xml
/isolinegeojson, topojson, geobuf (binary)
/geodata/elevationjson, geojson

The other endpoints (boundaries, route matrix, map matching, route planner, timezone) have no format parameter. geojson responses are GeoJSON; check each endpoint page for the exact content type.

The x-geo-deviation convention

Wherever this API differs from Geoapify, the spec marks the operation or parameter with an x-geo-deviation list and a matching Deviation (kind) line in the description. Kinds:

KindMeaning
unsupportedGeoapify behavior we do not offer.
emptyField exists but is always empty or null.
extraSomething we add that Geoapify does not have.
approximatedSame field, computed differently or less precisely.
ignoredParameter accepted and ignored.

Treat these as the list of things to re-test when migrating.

On this page