GeolocationplatformoperationId locate
POST/v1/locate
A position from the Wi-Fi access points and cell towers a device sees, against a beacon feed: a weighted centroid, an accuracy radius, and the ids no feed knew.
Send Authorization: Bearer sk_live_…. The key's plan must include theplatform product; which plans do.
Explained in Cell and Wi-Fi location.
Example
Four Mexico City cell towers near the Zócalo.
curl -X POST "https://api.oslew.com/v1/locate" \
-H "Authorization: Bearer $GEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cell":[{"id":"334-20-594-23103747","signal_dbm":-63},{"id":"334-20-595-24889601","signal_dbm":-72},{"id":"334-20-594-24890113","signal_dbm":-81},{"id":"334-20-594-23066114","signal_dbm":-90}]}'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.locate(
{
"cell": [
{"id": "334-20-594-23103747", "signal_dbm": -63},
{"id": "334-20-595-24889601", "signal_dbm": -72},
{"id": "334-20-594-24890113", "signal_dbm": -81},
{"id": "334-20-594-23066114", "signal_dbm": -90},
],
},
)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.locate({
cell: [
{ id: "334-20-594-23103747", signal_dbm: -63 },
{ id: "334-20-595-24889601", signal_dbm: -72 },
{ id: "334-20-594-24890113", signal_dbm: -81 },
{ id: "334-20-594-23066114", signal_dbm: -90 },
],
});HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 290
ratelimit-reset: 1
{
"lat": 19.436397066914306,
"lon": -99.1330676503093,
"accuracy_m": 1205.6181643348004,
"used": 4,
"unknown": [],
"admin": [
{
"doc": 2174,
"id": "7f1f3634-1218-43e7-9538-ac3d1f43fc1c",
"name": "México",
"subtype": "country",
"country": "MX",
"region": null,
"admin_level": null,
"via": "interior",
"provenance": {
"name": "overture-divisions",
"release": "2026-08-19.0",
"license": "ODbL-1.0"
}
},
{
"doc": 61,
"id": "0831989a-c65b-47db-802e-f930af64b9e4",
"name": "México",
"subtype": "country",
"country": "MX",
"region": null,
"admin_level": null,
"via": "interior",
"provenance": {
"name": "overture-divisions-maritime",
"release": "2026-08-19.0",
"license": "ODbL-1.0"
}
},
{
"doc": 1560,
"id": "bc8dbc34-544b-47c4-bdb1-d3f5ecfc6af7",
"name": "Ciudad de México",
"subtype": "region",
"country": "MX",
"region": "MX-CMX",
"admin_level": 1,
"via": "boundary",
"provenance": {
"name": "overture-divisions",
"release": "2026-08-19.0",
"license": "ODbL-1.0"
}
},
{
"doc": 1380,
"id": "b468c7e5-eb6f-44c8-bfeb-c60bce169f25",
"name": "Cuauhtémoc",
"subtype": "county",
"country": "MX",
"region": "MX-CMX",
"admin_level": 2,
"via": "boundary",
"provenance": {
"name": "overture-divisions",
"release": "2026-08-19.0",
"license": "ODbL-1.0"
}
},
{
"doc": 1522,
"id": "2b1d49e2-98ef-4665-b9f6-1ce96c9f015b",
"name": "Ciudad de México",
"subtype": "locality",
"country": "MX",
"region": "MX-CMX",
"admin_level": null,
"via": "interior",
"provenance": {
"name": "overture-divisions",
"release": "2026-08-19.0",
"license": "ODbL-1.0"
}
},
{
"doc": 1423,
"id": "96d18adf-e0bb-473c-affc-758969b272e1",
"name": "Centro",
"subtype": "neighborhood",
"country": "MX",
"region": "MX-CMX",
"admin_level": null,
"via": "boundary",
"provenance": {
"name": "overture-divisions",
"release": "2026-08-19.0",
"license": "ODbL-1.0"
}
},
{
"doc": 147,
"id": "America/Mexico_City",
"name": "America/Mexico_City",
"subtype": "timezone",
"country": null,
"region": null,
"admin_level": null,
"via": "interior",
"provenance": {
"name": "timezone-boundary-builder",
"release": "2026d",
"license": "ODbL-1.0"
}
}
],
"provenance": {
"name": "mls",
"release": "2024-03-27",
"license": "Mozilla Location Service final export (2024-03-27), public domain"
},
"took_us": 111
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Body
application/json, required.
cellSeenBeacon[]idstringrequiredBSSID in any separator or case, ormcc-mnc-lac-cid.signal_dbmnumber | nullRSSI; weights the fix when given.
wifiSeenBeacon[]idstringrequiredBSSID in any separator or case, ormcc-mnc-lac-cid.signal_dbmnumber | nullRSSI; weights the fix when given.
Responses
200 — The fix.
accuracy_mnumberrequiredRadius the true position is expected within.adminHit[]requireddocintegerrequiredOrdinal in the segment.idstringrequiredOverture id.namestringrequiredprovenanceSourcerequiredlicensestringrequirednamestringrequiredreleasestringrequired
subtypestringrequiredcountry | dependency | region | county | localadmin | locality | macrohood | neighborhood | microhood | timezoneviastringrequiredinterior: the point's cell is provably inside, no geometry read;boundary: the polygon decided.interior | boundaryadmin_levelinteger | nullcountrystring | nullISO code.regionstring | nullISO region code,MX-JAL.
latnumberrequiredlonnumberrequiredprovenanceSourcerequiredlicensestringrequirednamestringrequiredreleasestringrequired
took_usintegerrequiredunknownstring[]requiredIds no feed knew, as given.usedintegerrequiredBeacons that contributed.
With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.
Refusals
Every refusal is a JSON object with an error string, except where noted.
| 400 | No beacon given, or none known. |
| 401 | No key, or one that is unknown, revoked or suspended. |
| 403 | The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does. |
| 429 | This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After. |
| 503 | The pod cannot reach the control plane and its entitlements are too old to trust. Retry. |
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
Towers the survey never saw
curl -X POST "https://api.oslew.com/v1/locate" \
-H "Authorization: Bearer $GEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cell":[{"id":"334-20-65000-999999990"},{"id":"334-20-65000-999999991"}]}'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.locate(
{
"cell": [{"id": "334-20-65000-999999990"}, {"id": "334-20-65000-999999991"}],
},
)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.locate({
cell: [{ id: "334-20-65000-999999990" }, { id: "334-20-65000-999999991" }],
});HTTP/1.1 400 Bad Request
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 299
ratelimit-reset: 1
{
"error": "none of the 2 beacons is known"
}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.