# Directions

Get directions between two locations with route information including distance, duration, and step-by-step navigation. Supports driving, walking, bicycling, and transit modes.

- **Documentation:** [https://scrappa.co/docs/google-maps-api/google_maps_directions](https://scrappa.co/docs/google-maps-api/google_maps_directions)
- **API group:** Google Maps API
- **Endpoint:** `GET https://scrappa.co/api/maps/directions`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `origin` | string | Yes | Starting point - address, place name, or coordinates. |
| `destination` | string | Yes | Ending point - address, place name, or coordinates. |
| `mode` | string | No | Mode: driving, walking, bicycling, or transit. Default: driving |
| `hl` | string | No | Language code for results. Default: en |
| `gl` | string | No | Country/region code for geo-filtering. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/maps/directions?origin=New+York%2C+NY&destination=Boston%2C+MA"
```

## Example response

```json
{
    "directions": [],
    "status": "OK",
    "routes_count": 0
}
```

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
