Google Maps Platform

Add directions to your website

Use Directions from Google Maps Platform to help customers plan their visit. Show estimated travel time across different transportation modes—driving, transit, walking, and cycling. Simply copy and paste the code to your website. Get started at no cost.

Transportation modes

Display estimated travel time and routes for the way your visitors get around.

  • Driving

    Estimated drive time and route

  • Transit

    Public transit options and duration

  • Walking

    Walking directions and ETA

  • Cycling

    Bike-friendly routes and time

In the embed code, set mode=driving, transit, walking, or bicycling in the iframe URL.

Copy and paste the code to your website

Replace YOUR_GOOGLE_MAPS_API_KEY with your API key from Google Cloud Console. Enable the Maps Embed API and get a key at no cost (free monthly credit for new users).

HTML embed code
<iframe
  width="600"
  height="450"
  style="border:0;"
  allowfullscreen
  loading="lazy"
  referrerpolicy="no-referrer-when-downgrade"
  src="https://www.google.com/maps/embed/v1/directions?key=YOUR_GOOGLE_MAPS_API_KEY&origin=Las+Vegas+Strip,+NV&destination=Spanish+Trail+Country+Club,+Las+Vegas,+NV&mode=driving"
  title="Directions to Spanish Trail Country Club"
></iframe>

Change origin and destination in the URL to show directions between any two places (addresses or place names).

Get started at no cost

Google Maps Platform offers a free tier so you can add directions and travel time to your site without upfront cost. Create an account, enable the Maps Embed API, and start embedding.