Documentation

Quickstart

Base URL: https://api.geolabel.dev  ·  Auth: X-API-Key header on every request  ·  Get a free key →

The one endpoint you need

GET /label?lat={latitude}&lng={longitude}
ParameterTypeRequiredDescription
latfloatLatitude (-90 to 90)
lngfloatLongitude (-180 to 180)
radiusintSearch radius in metres (default 100, max 500)

Response

{
  "place":            "Crunch Fitness - Edmond",
  "label":            "Crunch Fitness",
  "category":         "gym",
  "distance_meters":  12.1,
  "coordinates":     { "lat": 35.4617, "lng": -97.5149 },
  "cached":           false
}
FieldTypeDescription
placestring | nullRaw venue name from OpenStreetMap
labelstringClean, friendly name — use for display
categorystringStable type — use for automation logic
distance_metersfloat | nullDistance from your coordinates to the matched place
coordinatesobjectThe lat/lng you sent, echoed back
cachedbooltrue if served from 10-minute in-memory cache

Code samples

curl -H "X-API-Key: your_key_here" \
  "https://api.geolabel.dev/label?lat=35.4617&lng=-97.5149"
import httpx

API_KEY = "your_key_here"

def get_location_label(lat: float, lng: float, radius: int = 100) -> dict:
    response = httpx.get(
        "https://api.geolabel.dev/label",
        headers={"X-API-Key": API_KEY},
        params={"lat": lat, "lng": lng, "radius": radius},
    )
    response.raise_for_status()
    return response.json()

result = get_location_label(35.4617, -97.5149)
print(result["category"])  # → "gym"
print(result["label"])     # → "Crunch Fitness"
const API_KEY = "your_key_here";

async function getLocationLabel(lat, lng, radius = 100) {
  const url = new URL("https://api.geolabel.dev/label");
  url.searchParams.set("lat", lat);
  url.searchParams.set("lng", lng);
  url.searchParams.set("radius", radius);

  const res = await fetch(url, {
    headers: { "X-API-Key": API_KEY },
  });
  if (!res.ok) throw new Error(`GeoLabel error: ${res.status}`);
  return res.json();
}

const { category, label } = await getLocationLabel(35.4617, -97.5149);
console.log(category); // → "gym"
import fetch from "node-fetch"; // remove on Node 18+

const API_KEY = "your_key_here";

const res = await fetch(
  `https://api.geolabel.dev/label?lat=35.4617&lng=-97.5149`,
  { headers: { "X-API-Key": API_KEY } }
);
const data = await res.json();
console.log(data.label);    // → "Crunch Fitness"
console.log(data.category); // → "gym"
struct LabelResponse: Decodable {
    let place: String?
    let label: String
    let category: String?
    let distanceMeters: Double?
    let cached: Bool

    enum CodingKeys: String, CodingKey {
        case place, label, category, cached
        case distanceMeters = "distance_meters"
    }
}

var components = URLComponents(string: "https://api.geolabel.dev/label")!
components.queryItems = [
    URLQueryItem(name: "lat", value: "35.4617"),
    URLQueryItem(name: "lng", value: "-97.5149"),
]
var request = URLRequest(url: components.url!)
request.setValue("your_key_here", forHTTPHeaderField: "X-API-Key")

let (data, _) = try await URLSession.shared.data(for: request)
let result = try JSONDecoder().decode(LabelResponse.self, from: data)
print(result.category ?? "")  // → "gym"
── Step 1 ──────────────────────────────────────
Action:  Get Current Location
Output:  Current Location (lat + lng)

── Step 2 ──────────────────────────────────────
Action:  Get Contents of URL
URL:     https://api.geolabel.dev/label
Method:  GET
Headers: X-API-Key → your_key_here
Params:  lat → Latitude (from step 1)
         lng → Longitude (from step 1)

── Step 3 ──────────────────────────────────────
Action:  Get Dictionary Value
Key:     category
From:    Contents of URL (step 2)

── Step 4 ──────────────────────────────────────
Action:  If [Dictionary Value] equals "gym"
         → your actions here
         End If

Rate limit headers

Every response includes these headers so you always know where you stand.

HeaderDescription
X-RateLimit-TierYour plan (free / pro / enterprise)
X-RateLimit-Limit-MinuteRequests allowed per minute
X-RateLimit-Remaining-MinuteRequests left this minute
X-RateLimit-Limit-DayRequests allowed per day
X-RateLimit-Remaining-DayRequests left today
PlanPer MinutePer Day
Free10100
Pro10010,000
Enterprise5001,000,000

Error reference

StatusMeaning
200Success
401Missing or invalid X-API-Key
422Invalid parameters (e.g. lat out of range)
429Rate limit hit — check Retry-After header
502OpenStreetMap temporarily unavailable, retry shortly

Full interactive Swagger UI → api.geolabel.dev/docs