Migration

Migrating from PositionStack

PositionStack keeps things about as simple as a geocoding API gets: an access_key query parameter, and a JSON data array where each entry carries latitude, longitude, label, and a handful of flat address fields rather than a deeply nested structure. That flatness is often exactly why a small team picked it in the first place, since there is less to learn before the first successful call.

A migration away from a deliberately simple API should not add complexity back in, which is really the core requirement for any compatibility-based approach rather than a full rewrite. The question worth asking before starting is whether the new provider's drop-in host actually keeps that flatness, or whether it just relocates the complexity somewhere else in the process.

My Geocode's PositionStack compatibility host reproduces the data array and its flat field structure exactly, down to the latitude, longitude, and label names, with only the copyright, terms, and privacy text differing from PositionStack's own response. The reference is at /compatibility/positionstack/. For most integrations built against this API, the code that reads data[0].latitude needs no changes beyond the host and the key.

A short list of what to verify before cutting over:

  • Whether your code checks a specific HTTP status code pattern tied to PositionStack's own error responses, since error shapes are documented separately at /docs/errors/ and are worth a direct comparison
  • Whether the access_key parameter name is hardcoded anywhere, since the new host also accepts a key as an X-API-Key header, an Authorization: Bearer header, or HTTP Basic auth if you would rather move away from a query parameter during the migration
  • Whether any client-side code exposes the key directly, which is a good moment to move that call behind a server-side proxy regardless of which provider ends up on the other end

Cost comparison here is genuinely simple because both approaches favor low friction. My Geocode offers 2,500 free requests a day with no key required at all, then 2,500 more free per key per day counted per network, and beyond that prepaid credit at €0.0001 per request or an Unlimited key at €50 a month. Every endpoint, including this compatibility host, is priced identically, so there is no separate calculation needed for a bulk or high-volume PositionStack workload once it moves.

For a small project that grew past what a side account was meant to handle, this kind of migration is usually a single afternoon of testing rather than a project. Point a staging build at the new host, compare a sample of addresses, and if the shape lines up, the switch itself is a configuration change.