# Quickstart

> Send your first requests to a running geolith search server.

These examples assume a server on `localhost:4000`. See [Running](/search/self-hosting/running) to start one. All responses below are real, from a server that serves an India `.glx` file with 6,184,103 places. Each is trimmed to two features.

## Search

```bash
curl 'http://localhost:4000/v1/search?text=gateway%20of%20india%20mumbai&size=2'
```

```json
{
  "bbox": [
    72.8346562,
    18.9218611,
    72.9143285,
    19.0461922
  ],
  "features": [
    {
      "geometry": {
        "coordinates": [
          72.8346562,
          18.9218611
        ],
        "type": "Point"
      },
      "properties": {
        "confidence": 1.0,
        "county": "Mumbai City District",
        "gid": "geolith:venue:730193678945597287",
        "id": "730193678945597287",
        "importance": 0.9453999996185303,
        "label": "Gateway of India, A Ward, Maharashtra",
        "layer": "venue",
        "locality": "A Ward",
        "name": "Gateway of India",
        "region": "Maharashtra",
        "source": "geolith"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          72.9143285,
          19.0461922
        ],
        "type": "Point"
      },
      "properties": {
        "confidence": 1.0,
        "country": "India",
        "country_code": "IN",
        "county": "Mumbai Suburban District",
        "gid": "geolith:venue:4269653558540286727",
        "id": "4269653558540286727",
        "importance": 0.9776999950408936,
        "label": "The Gateway School Of Mumbai, M/E Ward, Maharashtra, India",
        "layer": "venue",
        "locality": "M/E Ward",
        "name": "The Gateway School Of Mumbai",
        "region": "Maharashtra",
        "source": "geolith"
      },
      "type": "Feature"
    }
  ],
  "geocoding": {
    "attribution": "https://console.geolith.app/attribution",
    "engine": {
      "name": "geolith-search",
      "version": "0.1.0"
    },
    "query": {
      "ranking": "importance",
      "size": 2,
      "text": "gateway of india mumbai"
    },
    "version": "0.2"
  },
  "type": "FeatureCollection"
}
```

## Autocomplete

```bash
curl 'http://localhost:4000/v1/autocomplete?text=shaniwar%20wa&size=2'
```

```json
{
  "bbox": [
    73.8490348,
    18.5196488,
    73.855376,
    18.5232435
  ],
  "features": [
    {
      "geometry": {
        "coordinates": [
          73.855376,
          18.5196488
        ],
        "type": "Point"
      },
      "properties": {
        "confidence": 1.0,
        "country": "India",
        "country_code": "IN",
        "county": "Pune",
        "gid": "geolith:venue:5690416219557866379",
        "id": "5690416219557866379",
        "importance": 0.9390000104904175,
        "label": "Shaniwar Wada, Pune, Maharashtra, India",
        "layer": "venue",
        "locality": "Pune",
        "name": "Shaniwar Wada",
        "region": "Maharashtra",
        "source": "geolith"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          73.8490348,
          18.5232435
        ],
        "type": "Point"
      },
      "properties": {
        "confidence": 1.0,
        "country": "India",
        "country_code": "IN",
        "county": "Pune",
        "gid": "geolith:venue:7254043780672488050",
        "id": "7254043780672488050",
        "importance": 0.9943000078201294,
        "label": "Hotel Swan Inn Near Shaniwar Wada, Pune, Maharashtra, India",
        "layer": "venue",
        "locality": "Pune",
        "name": "Hotel Swan Inn Near Shaniwar Wada",
        "region": "Maharashtra",
        "source": "geolith"
      },
      "type": "Feature"
    }
  ],
  "geocoding": {
    "attribution": "https://console.geolith.app/attribution",
    "engine": {
      "name": "geolith-search",
      "version": "0.1.0"
    },
    "query": {
      "ranking": "importance",
      "size": 2,
      "text": "shaniwar wa"
    },
    "version": "0.2"
  },
  "type": "FeatureCollection"
}
```

## Reverse

```bash
curl 'http://localhost:4000/v1/reverse?point.lat=18.5195&point.lon=73.8553&size=2'
```

```json
{
  "bbox": [
    73.85535,
    18.51957,
    73.8553518,
    18.5195709
  ],
  "features": [
    {
      "geometry": {
        "coordinates": [
          73.85535,
          18.51957
        ],
        "type": "Point"
      },
      "properties": {
        "country": "India",
        "country_code": "IN",
        "county": "Pune",
        "distance": 0.009,
        "gid": "geolith:venue:3810173583912348177",
        "id": "3810173583912348177",
        "importance": 0.34360000491142273,
        "label": "Mahindra Automotive, Pune, Maharashtra, India",
        "layer": "venue",
        "locality": "Pune",
        "name": "Mahindra Automotive",
        "region": "Maharashtra",
        "source": "geolith"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          73.8553518,
          18.5195709
        ],
        "type": "Point"
      },
      "properties": {
        "country": "India",
        "country_code": "IN",
        "county": "Pune",
        "distance": 0.01,
        "gid": "geolith:venue:17375909595434777",
        "id": "17375909595434777",
        "importance": 0.8500000238418579,
        "label": "Pathkind Labs, Pune, Maharashtra, India",
        "layer": "venue",
        "locality": "Pune",
        "name": "Pathkind Labs",
        "region": "Maharashtra",
        "source": "geolith"
      },
      "type": "Feature"
    }
  ],
  "geocoding": {
    "attribution": "https://console.geolith.app/attribution",
    "engine": {
      "name": "geolith-search",
      "version": "0.1.0"
    },
    "query": {
      "boundary.circle.radius": 1.0,
      "point.lat": 18.5195,
      "point.lon": 73.8553,
      "size": 2
    },
    "version": "0.2"
  },
  "type": "FeatureCollection"
}
```

## Health

```bash
curl 'http://localhost:4000/health'
```

```json
{
  "places": 6182313,
  "status": "ok"
}
```

size": 1
    },
    "version": "0.2"
  },
  "type": "FeatureCollection"
}
```

## Explore the API

Open `http://localhost:4000/docs` for an interactive reference generated from the handlers, or fetch `http://localhost:4000/openapi.json`.
