oslew docs
Console
Menu

CompatibilityaddressoperationId compat_locationiq_v1_reverse_php

GET/compat/locationiq/v1/reverse.php

LocationIQ's reverse.php: one object, as theirs is.

Send Authorization: Bearer sk_live_…. The key's plan must include theaddress product; which plans do.

Explained in Migrating from another provider.

Example

A LocationIQ reverse lookup.

curl
curl -G "https://api.oslew.com/compat/locationiq/v1/reverse.php" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'lat=19.4406' \
  --data-urlencode 'lon=-99.2047' \
  --data-urlencode 'format=json'
Python
from oslew import Client

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

answer = client.compat_locationiq_v1_reverse_php(19.4406, -99.2047, format="json")
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.compat_locationiq_v1_reverse_php(19.4406, -99.2047, { format: "json" });
Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 294
ratelimit-reset: 1

{
  "address": {
    "city": "Miguel Hidalgo",
    "country_code": "mx",
    "state": "CMX"
  },
  "boundingbox": [
    "19.440560412001677",
    "19.440681794925386",
    "-99.20472389693853",
    "-99.20459517519265"
  ],
  "display_name": "Museo Soumaya, Miguel Hidalgo, CMX, MX",
  "distance_m": 4.848551852818172,
  "importance": 0,
  "lat": "19.44062110346353",
  "licence": "CDLA-Permissive-2.0 (overture-places)",
  "lon": "-99.20465953606559",
  "osm_id": null,
  "osm_type": null,
  "place_id": 348329,
  "precision_m": 6.756173533775122,
  "provenance": {
    "licence": "CDLA-Permissive-2.0",
    "name": "overture-places",
    "release": "2026-08-19.0",
    "served_by": "geospatial-alt"
  },
  "type": "yes"
}

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

Query

NameTypeDescription
lat
queryrequired
number
lon
queryrequired
number
key
query
string
Accepted and ignored.
format
query
string
json | jsonv2
default jsonv2

Responses

200 — One object, with distance_m added.

object

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.

400Missing coordinates, or an untranslated format.
401No key, or one that is unknown, revoked or suspended.
403The 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.
429This 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.
503The 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.

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