oslew docs
Console
Menu

CompatibilityaddressoperationId compat_locationiq_v1_search_php

GET/compat/locationiq/v1/search.php

LocationIQ's search.php: the Nominatim shape at their path, with key accepted and ignored.

The same two caveats as /compat/nominatim/search: licence is ours, and osm_type and osm_id are null. Part of the address product.

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 search.

curl
curl -G "https://api.oslew.com/compat/locationiq/v1/search.php" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q=Museo Soumaya' \
  --data-urlencode 'format=json' \
  --data-urlencode 'limit=1'
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_search_php(
    "Museo Soumaya",
    format="json",
    limit=1,
)
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_search_php("Museo Soumaya", { format: "json", limit: 1 });
Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 295
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",
    "importance": 0.5,
    "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
q
queryrequired
string
key
query
string
Accepted and ignored.
format
query
string
json | jsonv2
default jsonv2
limit
query
integer
≤ 10
default 10
addressdetails
query
string

Responses

200 — An array in the Nominatim shape.

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.

400No q, 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.