# Driving Distance From New York to Boston on Google Maps

**Use case:** 

Plan a driving itinerary from New York to Boston with a stop in Hartford. Get route alternatives, distance, duration, turn-by-turn steps, and per-leg details. Change the ordered stops input to plan a different trip or add waypoints.

## Input

```json
{
  "mode": "route",
  "stops": [
    "New York, NY",
    "Hartford, CT",
    "Boston, MA"
  ],
  "origins": [
    "Times Square, New York, NY",
    "Grand Central Terminal, New York, NY"
  ],
  "destinations": [
    "Central Park, New York, NY",
    "Brooklyn Bridge, New York, NY",
    "JFK Airport, New York, NY"
  ],
  "maxPairs": 100,
  "travelMode": "driving",
  "avoidTolls": false,
  "avoidHighways": false,
  "avoidFerries": false,
  "maxAlternatives": 1,
  "maxItems": 5,
  "includeSteps": true,
  "includeStreetView": false,
  "language": "en",
  "units": "metric",
  "requestDelayMs": 250
}
```

## Output

```json
{
  "recordType": {
    "label": "Record type"
  },
  "origin": {
    "label": "Origin"
  },
  "destination": {
    "label": "Destination"
  },
  "originResolved": {
    "label": "Origin resolved"
  },
  "destinationResolved": {
    "label": "Destination resolved"
  },
  "routeName": {
    "label": "Route name"
  },
  "routeIndex": {
    "label": "Route index"
  },
  "isRecommended": {
    "label": "Is recommended"
  },
  "travelMode": {
    "label": "Travel mode"
  },
  "distance": {
    "label": "Distance"
  },
  "distanceMeters": {
    "label": "Distance meters"
  },
  "duration": {
    "label": "Duration"
  },
  "durationSeconds": {
    "label": "Duration seconds"
  },
  "durationInTraffic": {
    "label": "Duration in traffic"
  },
  "typicalDuration": {
    "label": "Typical duration"
  },
  "noTrafficDuration": {
    "label": "No traffic duration"
  },
  "trafficRange": {
    "label": "Traffic range"
  },
  "trafficCondition": {
    "label": "Traffic condition"
  },
  "departureTime": {
    "label": "Departure time"
  },
  "arrivalTime": {
    "label": "Arrival time"
  },
  "fare": {
    "label": "Fare"
  },
  "availableModes": {
    "label": "Available modes"
  },
  "googleMapsUrl": {
    "label": "Google maps url"
  },
  "sourceUrl": {
    "label": "Source url"
  },
  "scrapedAt": {
    "label": "Scraped at"
  },
  "steps": {
    "label": "Steps"
  },
  "notes": {
    "label": "Notes"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Google Maps Route & Distance Matrix Scraper Actor is ready to run with the inputs already set for "Driving Distance From New York to Boston on Google Maps". [Sign up or log in](https://console.apify.com/create-task-from-example/HteSUR7bbwvymqeLB) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Driving Distance From New York to Boston on Google Maps" task

The Google Maps Route & Distance Matrix Scraper Actor will start running based on the input automatically. You can also change all the input fields, like mode, stops, and more, to match your specific use case.

### 3. Receive the "Driving Distance From New York to Boston on Google Maps" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as record type, origin, destination, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Driving Distance From New York to Boston on Google Maps" task via API](https://apify.com/vexaloom-labs/google-maps-route-and-distance-matrix-scraper.md).

## FAQ

### What is the driving distance from New York to Boston via Hartford?

The New York to Boston route task is set to drive from New York, NY, through Hartford, CT, to Boston, MA; results include distance in meters and formatted distance.

### How do I get Google Maps driving directions from New York to Boston?

Set the ordered stops in the New York to Boston route task to New York, NY, Hartford, CT, and Boston, MA. It is set to include turn-by-turn steps.

### Can I compare Google Maps route alternatives from New York to Boston?

The New York to Boston route task returns the alternatives Google provides, usually up to 3, with a route name and recommended-route indicator when available.

### What details do Google Maps directions include for the Hartford stop?

Per-leg distance and duration are included in the New York to Boston route task, along with turn-by-turn steps for the route.

### Can I change the stops or add a waypoint to a Google Maps route?

The New York to Boston route task accepts 2–10 ordered stops; the first is the origin, the last is the destination, and middle stops are waypoints.

### How much does it cost to run the New York to Boston route task?

On the Free plan, the New York to Boston route task costs $0.10 per Actor Start event and $0.99 per 1,000 results, plus Apify compute usage.

### Can I download the New York to Boston driving distance results?

Results from the New York to Boston route task land in a dataset downloadable as JSON, CSV, Excel, XML, RSS, or an HTML table.

### Can I schedule Google Maps directions to run regularly?

You can schedule the New York to Boston route task with Apify Schedules, or run it through the Apify API and integrations such as Zapier, Make, and n8n.

## About this Actor

This example demonstrates how to use [Google Maps Route & Distance Matrix Scraper](https://apify.com/vexaloom-labs/google-maps-route-and-distance-matrix-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/vexaloom-labs/google-maps-route-and-distance-matrix-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/vexaloom-labs/google-maps-route-and-distance-matrix-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
