> ## Documentation Index
> Fetch the complete documentation index at: https://docs.justrouting.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get an API key, make your first routing request, and draw the route on a map in under three minutes.

# Quickstart

Three steps, three minutes. No credit card required.

## 1. Get an API Key

1. Sign up at [justrouting.tech/signup](https://justrouting.tech/signup) (email only)
2. Log in and open the [Dashboard](https://justrouting.tech/dashboard), then click **Create API Key**
3. Copy the key — it is shown in full only once

```bash theme={null}
export JUSTROUTING_API_KEY="your-key-here"
```

## 2. Make your first request

Try the route from Marina Bay to Changi Airport in Singapore (replace the key with your own):

<CodeGroup>
  ```bash curl theme={null}
  curl "https://api.justrouting.tech/route/v1/driving/103.708362,1.357371;103.984748,1.352212?overview=full&steps=true" \
    -H "Authorization: Bearer $JUSTROUTING_API_KEY"
  ```

  ```python Python theme={null}
  import justrouting

  client = justrouting.Client("YOUR_API_KEY")

  route = client.routes.get(justrouting.RouteRequest(
      origin=[103.708362, 1.357371],
      destination=[103.984748, 1.352212],
      steps=True,
  ))

  print(f"Distance: {route.distance / 1000:.1f} km")
  print(f"Duration: {route.duration / 60:.0f} min")
  ```

  ```ts JavaScript theme={null}
  import { Client } from '@justrouting/client';

  const client = new Client(process.env.JUSTROUTING_API_KEY);

  const route = await client.routes.get({
    origin: [103.708362, 1.357371],
    destination: [103.984748, 1.352212],
    steps: true,
  });

  console.log(`Distance: ${(route.distance / 1000).toFixed(1)} km`);
  console.log(`Duration: ${Math.round(route.duration / 60)} min`);
  ```

  ```go Go theme={null}
  package main

  import (
      "context"
      "fmt"

      justrouting "github.com/justrouting/go-client"
  )

  func main() {
      client := justrouting.NewClient("YOUR_API_KEY")

      route, err := client.Routes.Get(context.Background(), &justrouting.RouteRequest{
          Origin:      []float64{103.708362, 1.357371},
          Destination: []float64{103.984748, 1.352212},
          Steps:       true,
      })
      if err != nil {
          panic(err)
      }

      fmt.Printf("Distance: %.1f km\n", route.Distance/1000)
      fmt.Printf("Duration: %.0f min\n", route.Duration/60)
  }
  ```
</CodeGroup>

`routes[0].geometry` in the response is the route geometry (encoded polyline). Distances are in **meters**, durations in **seconds**.

## 3. Draw the route on a map

Request with `geometries=geojson` and `routes[0].geometry` is a ready-to-use GeoJSON LineString:

<Tabs>
  <Tab title="Leaflet">
    ```js theme={null}
    const res = await fetch(
      "https://api.justrouting.tech/route/v1/driving/" +
      "103.708362,1.357371;103.984748,1.352212?geometries=geojson&overview=full",
      { headers: { Authorization: "Bearer " + API_KEY } }
    );
    const data = await res.json();
    L.geoJSON(data.routes[0].geometry).addTo(map);
    ```
  </Tab>

  <Tab title="Mapbox GL JS">
    ```js theme={null}
    map.addSource("route", {
      type: "geojson",
      data: { type: "Feature", properties: {}, geometry: data.routes[0].geometry },
    });
    map.addLayer({
      id: "route",
      type: "line",
      source: "route",
      layout: { "line-join": "round", "line-cap": "round" },
      paint: { "line-color": "#4f46e5", "line-width": 5 },
    });
    ```
  </Tab>
</Tabs>

Full examples (waypoints, colors, interactivity): [Draw a Route on a Map](/guides/draw-route-on-map).

## Next steps

<CardGroup cols={2}>
  <Card title="Understand every parameter" icon="route" href="/api-reference/directions">
    Complete Directions API parameter and response reference
  </Card>

  <Card title="Learn the quotas" icon="gauge" href="/rate-limits">
    Free tier: 100 requests/day, 5 req/s — all the rules
  </Card>
</CardGroup>
