# Maps, routes and places in one API

Lodestar API 2.4

Geocoding, routing and tiles with one key and one client library. Typed, documented, and fast from the first request.

```
npm install @lodestar/sdk
```

[Read the quickstart](#quickstart)

[API reference](https://example.com/reference)

## From install to a route in one terminal

See it work

Every call is a typed function, and every response is documented down to the field.

[Open the playground](https://example.com/playground)

```
npx lodestar route Göteborg Malmö
```

Route found in 41 ms: 283 km, 2 h 52 min, via E6

Ask the docs

How do I avoid tolls on a route?

## Your first request in three steps

Quickstart

Takes about five minutes. You need Node 20 or later.

- **Install the SDK**: One package, no peer dependencies.: Terminal

  ```
  npm install @lodestar/sdk
  ```
- **Create a client with your key**: Keys are scoped per project. Keep yours out of the browser.: client.ts

  ```
  import { Lodestar } from "@lodestar/sdk";
  const lodestar = new Lodestar({ key: process.env.LODESTAR_KEY });
  ```
- **Ask for a route**: Distances are in metres, durations in seconds.: route.ts

  ```
  const route = await lodestar.route({ from: "Göteborg", to: "Malmö" });
  ```

## Learn the parts you need

Guides

Short guides, each with a runnable example.

- **Geocoding**: Turn an address into coordinates and back, in forty languages.
- **Routing**: Fastest, shortest and avoiding tolls, with alternatives.
- **Map tiles**: Vector tiles for any client, styled in one JSON file.
- **Authentication**: Keys, scopes, rotation and signed requests.
- **Rate limits**: Quotas, retries and how to stay under them.
- **Webhooks**: Get told when a long job finishes, with signed payloads.

## What shipped lately

Changelog

Every release, with the breaking changes called out first. Subscribe below to get them by email.

- **Alternative routes**: Ask for up to three alternatives, each with its own duration and distance.
- **Faster geocoding**: Median latency down from 90 to 41 milliseconds. No code changes needed.
- **Signed webhooks**: Verify every payload with a shared secret. Unsigned webhooks are deprecated.
- **Vector tiles**: Tile styles in JSON, with a live editor in the dashboard.

## Built on Lodestar

Teams that ship maps with it.

- **Fraktia**
- **Cykelkollen**
- **Vägvisaren**
- **Rutten**
- **Kartlabbet**
- **Hamnguiden**

## Get a key and make your first call

Free up to 50,000 requests a month. No card.

[Get an API key](#start)

[Read the reference](https://example.com/reference)
