oslew docs
Console
Menu

Serviceno keyoperationId migrate

GET/v1/migrate

Paste a request you already make to another provider; get this service's equivalent, every parameter that does not carry over and why, and what the month costs either way.

Free and unauthenticated, because somebody deciding whether to switch has no key yet. Recognises Mapbox, Google, LocationIQ, Nominatim, Geoapify and Photon by host or by path shape. A credential in the URL is never echoed back. Prices are the vendors' published list prices as of 2026-09, summed across every volume band, and this service cannot verify them; a vendor whose pricing is a daily free tier rather than a per-thousand list price is reported unpriced rather than guessed at. Ours is the cheapest plan whose sustained Address rate carries the busier of the month's average rate and peak_rps.

This route answers without a key.

Explained in Migrating from another provider.

Example

Pricing a Google Geocoding request, with no key.

curl
curl -G "https://api.oslew.com/v1/migrate" \
  --data-urlencode 'url=https://maps.googleapis.com/maps/api/geocode/json?address=Museo+Soumaya&language=es&key=AIzaDOCSEXAMPLE' \
  --data-urlencode 'volume=100000'
Python
from oslew import Client

# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")

answer = client.migrate(
    "https://maps.googleapis.com/maps/api/geocode/json?address=Museo+Soumaya&language=es&key=AIzaDOCSEXAMPLE",
    volume=100000,
)
TypeScript
import { Client } from "@oslew/client";

// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });

const answer = await client.migrate("https://maps.googleapis.com/maps/api/geocode/json?address=Museo+Soumaya&language=es&key=AIzaDOCSEXAMPLE", { volume: 100000 });
Response
HTTP/1.1 200 OK
content-type: application/json

{
  "vendor": "google",
  "recognised": true,
  "direction": "forward",
  "query": "Museo Soumaya",
  "ours": "/v1/geocode?q=Museo%20Soumaya&limit=5",
  "compat": "/compat/google/maps/api/geocode/json?address=Museo%20Soumaya",
  "parameters": [
    {
      "name": "address",
      "value": "Museo Soumaya",
      "carried": true,
      "becomes": "q"
    },
    {
      "name": "key",
      "value": "«redacted»",
      "carried": false,
      "why": "this service authenticates with `Authorization: Bearer sk_live_…`, not a query parameter — which is also why a key in a URL is a key in every log it passes through"
    },
    {
      "name": "language",
      "value": "es",
      "carried": false,
      "why": "answers are in the language their source recorded; no translation layer exists"
    }
  ],
  "pricing": {
    "volume": 100000,
    "their_list_usd_per_1k": 5,
    "their_free_monthly": 10000,
    "their_bands": [
      {
        "up_to": 10000,
        "usd_per_1k": 0
      },
      {
        "up_to": 100000,
        "usd_per_1k": 5
      },
      {
        "up_to": 500000,
        "usd_per_1k": 4
      },
      {
        "up_to": 1000000,
        "usd_per_1k": 3
      },
      {
        "up_to": 5000000,
        "usd_per_1k": 1.5
      },
      {
        "usd_per_1k": 0.38
      }
    ],
    "their_tariff": "geocoding (essentials)",
    "their_price_source": "https://developers.google.com/maps/billing-and-pricing/pricing",
    "their_monthly_usd": 450,
    "our_monthly_usd": 99,
    "compared_plan": "address",
    "saving_usd": 351,
    "required_rps": 0.038580246913580245,
    "planning_rps": 0.038580246913580245,
    "fits_address_plan": true,
    "caveat": "list prices as published in 2026-09, summed band by band; this service cannot verify a price, a free tier or a caching restriction"
  },
  "next": [
    "Point your existing client at the `compat` URL and change only the host and the key: your response parser keeps working.",
    "Or call `ours` and read the `normalized` block, which has the address in parts as well as formatted.",
    "Check the parameters marked `carried: false` above: each one is a real limitation here, not a rename.",
    "Pass `peak_rps` with the rate your busiest stretch holds — an import, a month-start backfill — and the plan is chosen on that rather than on the month's average.",
    "Run `compare` from `geo-bench` on your own addresses before you switch. Our held-out accuracy is published and it is not flattering."
  ]
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

Query

NameTypeDescription
url
queryrequired
string
A request you already make, with its query string.
volume
query
integer
default 100000
Requests a month, for the comparison.
peak_rps
query
number
≥ 0
The busiest sustained rate your traffic reaches — an import, a month-start backfill. The plan is chosen on the busier of this and the month's average.
base
query
string
The base URL to write this service's equivalents against.

Responses

200 — The two URLs that replace theirs, every parameter accounted for, and the bill.

  • directionstringrequired
    forward | reverse | unknown
  • nextstring[]required
  • parametersobject[]required
    Every parameter they sent, carried or not. A parameter that does not carry always says why, because a migration guide that lists only what works is a sales page.
    • carriedbooleanrequired
    • namestringrequired
    • valuestringrequired
      A credential comes back redacted.
    • becomesstring
    • whystring
  • pricingobjectrequired
    • caveatstringrequired
    • compared_planstringrequired
      The cheapest plan whose sustained Address rate carries planning_rps; enterprise when none listed does.
    • fits_address_planbooleanrequired
    • our_monthly_usdnumberrequired
      The list price of compared_plan, whatever the volume: a plan is a rate, not an allowance. When compared_plan is enterprise this is only a floor.
    • planning_rpsnumberrequired
      The busier of required_rps and peak_rps — the number that chose the plan.
    • required_rpsnumberrequired
      What that volume needs if it arrives evenly.
    • volumeintegerrequired
    • peak_rpsnumber
      The peak you passed, echoed.
    • saving_usdnumber
      Absent when the vendor's pricing is not a per-thousand list price, or when the plan that fits is negotiated.
    • their_bandsobject[]
      Every published volume band the bill was summed across.
      • usd_per_1knumberrequired
      • up_tointeger
        Absent on the last band.
    • their_free_monthlyinteger
    • their_list_usd_per_1knumber
      Their first price past the free allowance.
    • their_monthly_usdnumber
      Their bill for the volume, band by band.
    • their_price_sourcestring
      Where the bands were read.
    • their_tariffstring
      Which of their prices: Mapbox's temporary and permanent geocoding differ several times over.
  • recognisedbooleanrequired
  • vendorstringrequired
    mapbox, google, locationiq, nominatim, geoapify, photon, or unknown.
  • compatstring
    The compatibility endpoint, which needs no change to your response parser.
  • oursstring
    This service's own endpoint for the same question.
  • querystring
    The text or point the request was about.

Refusals

Every refusal is a JSON object with an error string, except where noted.

400No url, or one that does not read as a URL.

A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.

More examples

A Mapbox request, at a larger volume
curl
curl -G "https://api.oslew.com/v1/migrate" \
  --data-urlencode 'url=https://api.mapbox.com/geocoding/v5/mapbox.places/Museo%20Soumaya.json?limit=1&proximity=-99.2,19.4&access_token=pk.DOCSEXAMPLE' \
  --data-urlencode 'volume=5000000'
Python
from oslew import Client

# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")

answer = client.migrate(
    "https://api.mapbox.com/geocoding/v5/mapbox.places/Museo%20Soumaya.json?limit=1&proximity=-99.2,19.4&access_token=pk.DOCSEXAMPLE",
    volume=5000000,
)
TypeScript
import { Client } from "@oslew/client";

// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });

const answer = await client.migrate("https://api.mapbox.com/geocoding/v5/mapbox.places/Museo%20Soumaya.json?limit=1&proximity=-99.2,19.4&access_token=pk.DOCSEXAMPLE", { volume: 5000000 });
Response
HTTP/1.1 200 OK
content-type: application/json

{
  "vendor": "mapbox",
  "recognised": true,
  "direction": "forward",
  "query": "Museo Soumaya",
  "ours": "/v1/geocode?q=Museo%20Soumaya&limit=1",
  "compat": "/compat/mapbox/geocoding/v5/mapbox.places/Museo%20Soumaya.json",
  "parameters": [
    {
      "name": "access_token",
      "value": "«redacted»",
      "carried": false,
      "why": "this service authenticates with `Authorization: Bearer sk_live_…`, not a query parameter — which is also why a key in a URL is a key in every log it passes through"
    },
    {
      "name": "limit",
      "value": "1",
      "carried": true,
      "becomes": "limit"
    },
    {
      "name": "proximity",
      "value": "-99.2,19.4",
      "carried": false,
      "why": "not a parameter this service has an equivalent for"
    }
  ],
  "pricing": {
    "volume": 5000000,
    "their_list_usd_per_1k": 0.75,
    "their_free_monthly": 100000,
    "their_bands": [
      {
        "up_to": 100000,
        "usd_per_1k": 0
      },
      {
        "up_to": 500000,
        "usd_per_1k": 0.75
      },
      {
        "up_to": 1000000,
        "usd_per_1k": 0.6
      },
      {
        "usd_per_1k": 0.45
      }
    ],
    "their_tariff": "temporary geocoding",
    "their_price_source": "https://www.mapbox.com/pricing",
    "their_monthly_usd": 2400,
    "our_monthly_usd": 99,
    "compared_plan": "address",
    "saving_usd": 2301,
    "required_rps": 1.9290123456790123,
    "planning_rps": 1.9290123456790123,
    "fits_address_plan": true,
    "caveat": "list prices as published in 2026-09, summed band by band; this service cannot verify a price, a free tier or a caching restriction"
  },
  "next": [
    "Point your existing client at the `compat` URL and change only the host and the key: your response parser keeps working.",
    "Or call `ours` and read the `normalized` block, which has the address in parts as well as formatted.",
    "Check the parameters marked `carried: false` above: each one is a real limitation here, not a rename.",
    "Pass `peak_rps` with the rate your busiest stretch holds — an import, a month-start backfill — and the plan is chosen on that rather than on the month's average.",
    "Run `compare` from `geo-bench` on your own addresses before you switch. Our held-out accuracy is published and it is not flattering."
  ]
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.