TRAVELDISTANCE_API helps spreadsheet users plan trips by finding the distance between two points. This function can calculate the distance for hundreds of address pairs in seconds. This formula is the paid version of TRAVELDISTANCE. It has unlimited daily usage, ignores Google’s quotas and has the “avoid” feature. You can pay through the add-on or using this payment link.
❗This custom function is only available to users of the Travel Formulas add-on from the Google Workspace Marketplace. Travel Formulas uses Google Maps for you while you stay in your spreadsheet.

Purpose
The TRAVELDISTANCE_API
function returns the distance between locations without impacting your daily usage limits.
Syntax
=TRAVELDISTANCE_API(origin, destination, mode, unit, avoid)
origin
– The starting address
destination
– The ending address
mode
– The mode of travel (“driving”, “walking”, “bicycling”, “transit”) [optional, defaults to driving]
unit
– The unit of distance (“mi”, “km”) [optional, defaults to miles]
avoid
– Features to avoid: 0-None, 1–Tolls, 2–Highways, 3–Ferries, 4–Indoors [optional, defaults to 0]
All Paid Travel Functions
TRAVELDISTANCE_API – Find the distance between two locations
TRAVELTIME_API – Find the travel time between two locations
TRAVELTOLLS_API – Returns the estimated tolls for travelling between two locations