How to Migrate from Google Maps API in Under 2 Hours

6 min read

Why Migration Takes Under 2 Hours

Beta Maps API covers the same use cases as Google Maps — directions, geocoding, places search, nearby search, place detail, and autocomplete. The API uses POST with JSON body and Basic Auth, so migration involves updating your API calls rather than just swapping a URL. Most teams complete the switch in under 2 hours.

Step 1: Get Your Beta Credentials

Sign up at beta.vn/maps-api. You'll receive a username and password for Basic Authentication instantly.

Step 2: Update Your API Calls to POST

Switch from Google's GET requests with query params to Beta's POST requests with JSON body:

// Before (Google Maps)
fetch(`https://maps.googleapis.com/maps/api/geocode/json?address=Saigon&key=${API_KEY}`)

// After (Beta Maps)
fetch("https://api.beta.vn/v1/mapapi/geocode", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Basic " + btoa(username + ":" + password)
  },
  body: JSON.stringify({ address: "Saigon" })
})

Step 3: Map Your Endpoints

Each Google endpoint has a Beta equivalent:

  • GET /maps/api/geocode/jsonPOST /v1/mapapi/geocode
  • GET /maps/api/directions/jsonPOST /v1/mapapi/direction
  • GET /maps/api/place/textsearch/jsonPOST /v1/mapapi/textsearch
  • GET /maps/api/place/nearbysearch/jsonPOST /v1/mapapi/nearbysearch
  • GET /maps/api/place/details/jsonPOST /v1/mapapi/detail
  • GET /maps/api/place/autocomplete/jsonPOST /v1/mapapi/search

Step 4: Test Your Integration

Run your existing test suite against Beta's endpoints. The response data is equivalent to Google's, so your parsing logic should work with minimal adjustment.

Key Differences to Note

Geocoding: Forward and reverse geocoding both supported. Send address or location as JSON body fields.

Directions: Pass origin and destination as lat/lng objects or text addresses in the JSON body.

Places: Text search, nearby search, and place details all supported via POST with JSON body.

Autocomplete: Use /v1/mapapi/search with search_text parameter. Supports country filtering via componentRestrictions.

What About Client-Side Libraries?

Beta Maps API is a server-side REST API, not a JavaScript SDK. If you currently use @googlemaps/js-api-loader for client-side rendering, you'll call Beta's endpoints from your backend instead. Check our documentation for integration examples.

Rollback Plan

Since migration is a URL change, rollback is equally simple. Keep your Google API key active during the transition period. If anything goes wrong, switch back in seconds.