# Quickstart

> Send your first request to api.geolith.app in a minute: get a key, call /v1/search with curl, JavaScript or Python, and read the GeoJSON.

1. Sign up at [console.geolith.app/signup](https://console.geolith.app/signup) and create a key. Use a secret key (`gc_sk_…`) for these examples.
2. Send a search request. Replace `YOUR_API_KEY`.
3. Read `features[0].properties.label` and `features[0].geometry.coordinates` (`[longitude, latitude]`).

## curl

```bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.geolith.app/v1/search?text=eiffel%20tower&size=1"
```

## JavaScript

```js
const url = new URL('https://api.geolith.app/v1/search');
url.searchParams.set('text', 'eiffel tower');
url.searchParams.set('size', '1');

const res = await fetch(url, {
  headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
if (!res.ok) throw new Error(`geolith ${res.status}`);
const { features } = await res.json();
const [lon, lat] = features[0].geometry.coordinates;
console.log(features[0].properties.label, lat, lon);
```

## Python

```python
import requests

res = requests.get(
    "https://api.geolith.app/v1/search",
    params={"text": "eiffel tower", "size": 1},
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    timeout=10,
)
res.raise_for_status()
feature = res.json()["features"][0]
lon, lat = feature["geometry"]["coordinates"]
print(feature["properties"]["label"], lat, lon)
```

## The response

```json
{
  "geocoding": {
    "version": "0.2",
    "attribution": "https://console.geolith.app/attribution",
    "query": {
      "text": "eiffel tower",
      "size": 1,
      "ranking": "importance"
    },
    "engine": {
      "name": "geolith-glx",
      "version": "0.1.0"
    }
  },
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "coordinates": [
          2.294496,
          48.858262
        ],
        "type": "Point"
      },
      "properties": {
        "id": "4611686018432401268",
        "gid": "geolith:venue:4611686018432401268",
        "layer": "venue",
        "source": "geolith",
        "name": "Tour Eiffel",
        "street": "Avenue Anatole France",
        "postalcode": "75007",
        "country_code": "FR",
        "country": "France",
        "region": "Île-de-France",
        "county": "Paris",
        "locality": "Paris",
        "neighbourhood": "Paris 7e Arrondissement",
        "category": [
          "attraction"
        ],
        "importance": 0.6206,
        "label": "Tour Eiffel, Paris 7e Arrondissement, Paris, Île-de-France, France",
        "confidence": 1
      },
      "bbox": [
        2.293312,
        48.857475,
        2.29569,
        48.859045
      ]
    }
  ],
  "bbox": [
    2.293312,
    48.857475,
    2.29569,
    48.859045
  ]
}
```

Every response also carries `X-Quota-Limit` and `X-Quota-Remaining` headers. Next: [API keys](/search/hosted/keys), or a guide for [JavaScript](/search/hosted/javascript), [React](/search/hosted/react), [Vue](/search/hosted/vue), [Python](/search/hosted/python) or [MapLibre](/search/hosted/maplibre).
