oslew docs
Console
Menu

PlacessearchoperationId nearby

GET/v1/nearby

The nearest places to a point, nearest first, optionally of one category.

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

Explained in Nearby places and hours and A store locator.

Example

Restaurants nearest Museo Soumaya.

curl
curl -G "https://api.oslew.com/v1/nearby" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'at=19.4406,-99.2047' \
  --data-urlencode 'category=restaurant' \
  --data-urlencode 'limit=3'
Python
from oslew import Client

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

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

{
  "at": [
    19.4406,
    -99.2047
  ],
  "category": "restaurant",
  "results": [
    {
      "doc": 348326,
      "name": "Comedor Corporativo Carso",
      "lat": 19.440441368738824,
      "lon": -99.20457299255855,
      "distance_m": 22.10178797284887,
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "category": "restaurant",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "formatted": "Comedor Corporativo Carso, Miguel Hidalgo, CMX, MX"
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    },
    {
      "doc": 348330,
      "name": "La Raclette",
      "lat": 19.440998179292325,
      "lon": -99.20448644914455,
      "distance_m": 49.61579035889554,
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Ciudad de México",
        "region": "Ciudad de México",
        "country": "MX",
        "category": "restaurant",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Ciudad de México",
        "region": "Ciudad de México",
        "country": "MX",
        "formatted": "La Raclette, Ciudad de México, Ciudad de México, MX"
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    },
    {
      "doc": 348343,
      "name": "Applebee’s Carso",
      "lat": 19.441099050554577,
      "lon": -99.20431336259566,
      "distance_m": 68.7235865703977,
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "category": "restaurant",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "formatted": "Applebee’s Carso, Miguel Hidalgo, CMX, MX"
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    }
  ],
  "segments": 2,
  "took_us": 465
}

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

Query

NameTypeDescription
at
queryrequired
string
lat,lon.
category
query
string
Matched whole or as a token of the place's category: restaurant matches mexican_restaurant.
q
query
string
Free-text cue (farmacia cerca); resolves a category when category is absent.
open_at
query
string
now or unix seconds: only places an attributes feed says are open then, in the point's time zone.
limit
query
integer
≥ 1, ≤ 50
default 5

Responses

200 — Nearest first.

  • atnumber[]required
  • categorystring | nullrequired
  • resultsNearby[]required
    • distance_mnumberrequired
    • docintegerrequired
    • hierarchyContextrequired
      • categorystring | null
      • countrystring | null
      • localitystring | null
      • postcodestring | null
      • regionstring | null
      • streetstring | null
    • latnumberrequired
    • lonnumberrequired
    • namestringrequired
    • normalizedNormalizedrequired
      The address in parts as well as in a sentence. formatted orders the house number and the street the way that country writes them — Avenida Insurgentes Sur 1602 in Mexico, 1600 Pennsylvania Avenue NW in the United States — and is derived from the parts, so a caller who needs another layout does not have to unpick the sentence.
      • formattedstringrequired
      • countrystring
        ISO code.
      • house_numberstring
        Whatever the source recorded, which is not always a number: 10, 12-B, S/N.
      • localitystring
      • postcodestring
      • regionstring
        Absent for most of the world, and absent from the address layer, which records locality, postcode and country.
      • streetstring
    • precisionPrecisionrequired
      What the position locates, finest first. rooftop is an address point with a house number, as its source recorded it — never a building footprint we snapped to, which would contaminate the permissive bundle. interpolated is a point placed between the two recorded numbers that bracket the one asked for, which is what Google calls RANGE_INTERPOLATED. street is an address row with no number to place along it. precision_m carries the honest radius alongside: the label says what was matched, the metres say how wrong it can be.
      rooftop | interpolated | address | street | postcode | locality | region | country | poi
    • precision_mnumberrequired
    • provenanceSourcerequired
      • licensestringrequired
      • namestringrequired
      • releasestringrequired
    • attributesAttributes | null
      From an attributes feed, when one carries this place.
      • hoursinteger[][]required7 items
        Per weekday, Monday first: [open, close] minutes from midnight; [0,0] closed, [0,65535] all day; a close before its open runs past midnight.
      • priceinteger | nullrequired
        0–4.
      • provenanceSourcerequired
        • licensestringrequired
        • namestringrequired
        • releasestringrequired
      • ratingnumber | nullrequired
        0–5.
      • reviewsintegerrequired
      • photostring
        A photo of the place on Wikimedia Commons, when a feed carries one. The image is the photographer's, not ours: see https://www.oslew.com/licensing
  • segmentsintegerrequired
  • took_usintegerrequired
  • intent_qstring | null

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.

400Bad request.
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.