Lodestar API 2.4

Maps, routes and places in one API

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

npm install @lodestar/sdk

See it work

From install to a route in one terminal

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

Open the playground
Terminal
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?

Quickstart

Your first request in three steps

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

  1. Install the SDK

    Terminal

    One package, no peer dependencies.

    npm install @lodestar/sdk
  2. Create a client with your key

    client.ts

    Keys are scoped per project. Keep yours out of the browser.

    import { Lodestar } from "@lodestar/sdk";
    const lodestar = new Lodestar({ key: process.env.LODESTAR_KEY });
  3. Ask for a route

    route.ts

    Distances are in metres, durations in seconds.

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

Guides

Learn the parts you need

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.

Changelog

What shipped lately

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

  1. v2.4

    Alternative routes

    Ask for up to three alternatives, each with its own duration and distance.

  2. v2.3

    Faster geocoding

    Median latency down from 90 to 41 milliseconds. No code changes needed.

  3. v2.2

    Signed webhooks

    Verify every payload with a shared secret. Unsigned webhooks are deprecated.

  4. v2.1

    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.