PISO Map API
Tài liệu API

Routing API

Lấy chỉ đường chi tiết giữa hai địa điểm. Trả về các tuyến đường với hướng dẫn từng bước, khoảng cách, thời gian di chuyển (có và không có giao thông), thông tin trạm thu phí, và nhãn hành động trực quan.

I. Endpoint

GET https://api.pisomap.tech/api/maps/direction

II. Headers

NameValueRequired
x-api-keyAPI key của bạn

III. Tham số truy vấn

NameTypeRequiredDefaultMô tả
origin_pidstringPlace ID của điểm xuất phát
originLatnumber10.949642Vĩ độ điểm xuất phát
originLngnumber107.00585Kinh độ điểm xuất phát
dest_pidstringPlace ID của điểm đến
destLatnumber10.771341Vĩ độ điểm đến
destLngnumber106.6956Kinh độ điểm đến
modestringKhôngdrivingPhương thức di chuyển. driving dành cho ô tô/xe máy, walking dành cho đi bộ, cycling dành cho xe đạp

IV. Ví dụ

  • Điểm xuất phát: Ga Tân Cảng - MRT 1 (10.798757, 106.72314809999999)
  • Điểm đến: Bệnh viện Từ Dũ (10.768483699999999, 106.6853651)
  • Phương tiện: driving
curl "https://api.pisomap.tech/api/maps/direction?origin_pid=0x3175290f2b82553d%3A0x21bbb1a653837f25&originLat=10.798757&originLng=106.72314809999999&dest_pid=0x31752f0ea36cbbdf%3A0xe71f8e168d92aad7&destLat=10.768483699999999&destLng=106.6853651&mode=driving" \
  -H "x-api-key: YOUR_API_KEY"

Phản hồi:

{
  "direction_result": {
    "origin": {
      "address": {
        "full": "Ga Tân Cảng - MRT 1, 687 Điện Biên Phủ, Thạnh Mỹ Tây, Hồ Chí Minh, Việt Nam"
      },
      "latitude": 10.798757,
      "longitude": 106.72314809999999,
      "timezone": "Asia/Ho_Chi_Minh",
      "country_code": "VN",
      "place_id": "0x3175290f2b82553d:0x21bbb1a653837f25"
    },
    "destination": {
      "address": {
        "full": "Bệnh viện Từ Dũ, 284 Cống Quỳnh, Bến Thành, Hồ Chí Minh 700000, Việt Nam"
      },
      "latitude": 10.768483699999999,
      "longitude": 106.6853651,
      "timezone": "Asia/Ho_Chi_Minh",
      "country_code": "VN",
      "place_id": "0x31752f0ea36cbbdf:0xe71f8e168d92aad7"
    },
    "routes": [
      {
        "name": "Nguyễn Hữu Cảnh và Nguyễn Du",
        "distance_meters": 6722,
        "distance_text": "6,7 km",
        "duration": {
          "without_traffic": {
            "seconds": 1244,
            "text": "21 p",
            "hours": 0,
            "minutes": 21
          },
          "with_traffic": {
            "seconds": 1299,
            "text": "22 p",
            "hours": 0,
            "minutes": 22
          },
          "range": {
            "min_seconds": 995,
            "min_text": "17 p",
            "text": "17 – 31 phút"
          }
        },
        "has_toll": false,
        "traffic_note": "Tuyến đường nhanh nhất, dù giao thông vẫn như thường lệ",
        "steps": {
          "groups": [
            {
              "distance": { "meters": 31, "text": "31 m" },
              "duration": { "seconds": 11, "text": "11 giây", "hours": 0, "minutes": 0 },
              "steps": [
                {
                  "action": { "text": "Đi thẳng", "type": "STRAIGHT" },
                  "instruction": "",
                  "distance": { "meters": 31, "text": "31 m" },
                  "duration": { "seconds": 11, "text": "11 giây", "hours": 0, "minutes": 0 },
                  "start": { "lat": 10.798575503772271, "lng": 106.72314495616634 },
                  "end": { "lat": 10.798754299999999, "lng": 106.723124 }
                }
              ]
            },
            {
              "description": "Đi theo Nguyễn Hữu Cảnh đến Nguyễn Du tại Sài Gòn",
              "distance": { "meters": 3666, "text": "3,7 km" },
              "duration": { "seconds": 487, "text": "8 p", "hours": 0, "minutes": 8 },
              "steps": [
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Sunwah - One-Bedroom Apartment",
                  "distance": { "meters": 83, "text": "83 m" },
                  "duration": { "seconds": 40, "text": "40 giây", "hours": 0, "minutes": 0 },
                  "landmark": "Sunwah - One-Bedroom Apartment",
                  "start": { "lat": 10.798856203772273, "lng": 106.72311205616634 },
                  "end": { "lat": 10.799035, "lng": 106.72309109999999 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải vào Cầu Vượt Nguyễn Hữu Cảnh",
                  "distance": { "meters": 1337, "text": "1,3 km" },
                  "duration": { "seconds": 153, "text": "3 p", "hours": 0, "minutes": 3 },
                  "road": "Cầu Vượt Nguyễn Hữu Cảnh",
                  "notes": [{ "type": "continue" }, { "type": "pass_by", "name": "Tiệm Trà Sữa INCHA", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.799057831695809, "lng": 106.7236671850363 },
                  "end": { "lat": 10.799033, "lng": 106.72384830000001 }
                },
                {
                  "action": { "text": "Đi thẳng", "type": "STRAIGHT" },
                  "instruction": "",
                  "distance": { "meters": 590, "text": "600 m" },
                  "duration": { "seconds": 55, "text": "55 giây", "hours": 0, "minutes": 0 },
                  "start": { "lat": 10.791594714131636, "lng": 106.71813404909247 },
                  "end": { "lat": 10.7914154, "lng": 106.7181227 }
                },
                {
                  "action": { "text": "Nhập làn", "type": "MERGE" },
                  "instruction": "Nhập vào Cầu Văn Thánh 2",
                  "distance": { "meters": 1198, "text": "1,2 km" },
                  "duration": { "seconds": 158, "text": "3 p", "hours": 0, "minutes": 3 },
                  "road": "Cầu Văn Thánh 2",
                  "notes": [{ "type": "continue" }, { "type": "pass_by", "name": "Thảo Cầm Viên Sài Gòn", "position": "ở bên phải cách 800m" }],
                  "start": { "lat": 10.789275952671893, "lng": 106.71410845472158 },
                  "end": { "lat": 10.7893718, "lng": 106.71395940000001 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Đi bên phải để vào Nguyễn Hữu Cảnh",
                  "distance": { "meters": 106, "text": "110 m" },
                  "duration": { "seconds": 21, "text": "21 giây", "hours": 0, "minutes": 0 },
                  "road": "Nguyễn Hữu Cảnh",
                  "notes": [{ "type": "pass_by", "name": "Language Service Providers", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.783292743935348, "lng": 106.70686443044998 },
                  "end": { "lat": 10.7831529, "lng": 106.7067491 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Saigon Waterbus",
                  "distance": { "meters": 352, "text": "350 m" },
                  "duration": { "seconds": 60, "text": "1 p", "hours": 0, "minutes": 1 },
                  "landmark": "Saigon Waterbus",
                  "notes": [{ "type": "pass_by", "name": "Saigon Trade Center Tower - Office Saigon", "position": "ở bên trái cách 300m" }],
                  "start": { "lat": 10.782691715430081, "lng": 106.70622959273763 },
                  "end": { "lat": 10.7826433, "lng": 106.70606149999999 }
                }
              ]
            },
            {
              "distance": { "meters": 1918, "text": "1,9 km" },
              "duration": { "seconds": 424, "text": "7 p", "hours": 0, "minutes": 7 },
              "steps": [
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Rẽ trái tại Huy Béo Bia Hơi Hà Nội",
                  "distance": { "meters": 1918, "text": "1,9 km" },
                  "duration": { "seconds": 424, "text": "7 p", "hours": 0, "minutes": 7 },
                  "landmark": "Huy Béo Bia Hơi Hà Nội",
                  "notes": [{ "type": "pass_by", "name": "Trường THCS Nguyễn Du", "position": "Quận 1" }],
                  "start": { "lat": 10.784644138832038, "lng": 106.7038132560302 },
                  "end": { "lat": 10.784765, "lng": 106.7036775 }
                }
              ]
            },
            {
              "distance": { "meters": 143, "text": "140 m" },
              "duration": { "seconds": 26, "text": "26 giây", "hours": 0, "minutes": 0 },
              "steps": [
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Professional Records Dept - Department's Criminal Records Office - Receiving and issusing Criminal Record Certificates",
                  "distance": { "meters": 143, "text": "140 m" },
                  "duration": { "seconds": 26, "text": "26 giây", "hours": 0, "minutes": 0 },
                  "landmark": "Professional Records Dept - Department's Criminal Records Office - Receiving and issusing Criminal Record Certificates",
                  "notes": [{ "type": "pass_by", "name": "Ga Tao Đàn", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.772221156000283, "lng": 106.69247053982113 },
                  "end": { "lat": 10.772118299999999, "lng": 106.6923202 }
                }
              ]
            },
            {
              "description": "Đi tiếp Bùi Thị Xuân đến điểm đến của bạn",
              "distance": { "meters": 964, "text": "1,0 km" },
              "duration": { "seconds": 296, "text": "5 p", "hours": 0, "minutes": 5 },
              "steps": [
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Rẽ trái vào Bùi Thị Xuân",
                  "distance": { "meters": 784, "text": "800 m" },
                  "duration": { "seconds": 186, "text": "3 p", "hours": 0, "minutes": 3 },
                  "road": "Bùi Thị Xuân",
                  "notes": [{ "type": "pass_by", "name": "hiệu thuốc", "position": "ở bên phải cách 450m" }],
                  "start": { "lat": 10.77265427387119, "lng": 106.6913382240044 },
                  "end": { "lat": 10.7727417, "lng": 106.6911781 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại chó con",
                  "distance": { "meters": 152, "text": "150 m" },
                  "duration": { "seconds": 36, "text": "36 giây", "hours": 0, "minutes": 0 },
                  "landmark": "chó con",
                  "notes": [{ "type": "pass_by", "name": "Chuỗi cửa hàng embébò", "position": "ở phía bên trái" }],
                  "start": { "lat": 10.76771469047144, "lng": 106.68641700071215 },
                  "end": { "lat": 10.7675846, "lng": 106.68629039999999 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Chillout rooftop_Tropical style homestay in the center of District 1",
                  "distance": { "meters": 28, "text": "28 m" },
                  "duration": { "seconds": 74, "text": "1 p", "hours": 0, "minutes": 1 },
                  "landmark": "Chillout rooftop_Tropical style homestay in the center of District 1",
                  "notes": [{ "type": "annotation" }],
                  "start": { "lat": 10.768093573026322, "lng": 106.68519729954859 },
                  "end": { "lat": 10.768186, "lng": 106.6850401 }
                }
              ]
            }
          ]
        }
      },
      {
        "name": "Nguyễn Hữu Cảnh và Võ Văn Tần",
        "distance_meters": 7344,
        "distance_text": "7,3 km",
        "duration": {
          "without_traffic": {
            "seconds": 1402,
            "text": "23 p",
            "hours": 0,
            "minutes": 23
          },
          "with_traffic": {
            "seconds": 1491,
            "text": "25 p",
            "hours": 0,
            "minutes": 25
          },
          "range": {
            "min_seconds": 1139,
            "min_text": "19 p",
            "text": "19 – 36 phút"
          }
        },
        "has_toll": false,
        "traffic_note": "Giao thông thưa thớt, như thường lệ",
        "steps": {
          "groups": [
            {
              "distance": { "meters": 31, "text": "31 m" },
              "duration": { "seconds": 11, "text": "11 giây", "hours": 0, "minutes": 0 },
              "steps": [
                {
                  "action": { "text": "Đi thẳng", "type": "STRAIGHT" },
                  "instruction": "",
                  "distance": { "meters": 31, "text": "31 m" },
                  "duration": { "seconds": 11, "text": "11 giây", "hours": 0, "minutes": 0 },
                  "start": { "lat": 10.798575503772271, "lng": 106.72314495616634 },
                  "end": { "lat": 10.798754299999999, "lng": 106.723124 }
                }
              ]
            },
            {
              "description": "Đi theo Nguyễn Hữu Cảnh đến Lê Duẩn tại Sài Gòn",
              "distance": { "meters": 3743, "text": "3,7 km" },
              "duration": { "seconds": 507, "text": "8 p", "hours": 0, "minutes": 8 },
              "steps": [
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Sunwah - One-Bedroom Apartment",
                  "distance": { "meters": 83, "text": "83 m" },
                  "duration": { "seconds": 40, "text": "40 giây", "hours": 0, "minutes": 0 },
                  "landmark": "Sunwah - One-Bedroom Apartment",
                  "start": { "lat": 10.798856203772273, "lng": 106.72311205616634 },
                  "end": { "lat": 10.799035, "lng": 106.72309109999999 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải vào Cầu Vượt Nguyễn Hữu Cảnh",
                  "distance": { "meters": 1337, "text": "1,3 km" },
                  "duration": { "seconds": 153, "text": "3 p", "hours": 0, "minutes": 3 },
                  "road": "Cầu Vượt Nguyễn Hữu Cảnh",
                  "notes": [{ "type": "continue" }, { "type": "pass_by", "name": "Tiệm Trà Sữa INCHA", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.799057831695809, "lng": 106.7236671850363 },
                  "end": { "lat": 10.799033, "lng": 106.72384830000001 }
                },
                {
                  "action": { "text": "Đi thẳng", "type": "STRAIGHT" },
                  "instruction": "",
                  "distance": { "meters": 590, "text": "600 m" },
                  "duration": { "seconds": 55, "text": "55 giây", "hours": 0, "minutes": 0 },
                  "start": { "lat": 10.791594714131636, "lng": 106.71813404909247 },
                  "end": { "lat": 10.7914154, "lng": 106.7181227 }
                },
                {
                  "action": { "text": "Nhập làn", "type": "MERGE" },
                  "instruction": "Nhập vào Cầu Văn Thánh 2",
                  "distance": { "meters": 1198, "text": "1,2 km" },
                  "duration": { "seconds": 158, "text": "3 p", "hours": 0, "minutes": 3 },
                  "road": "Cầu Văn Thánh 2",
                  "notes": [{ "type": "continue" }, { "type": "pass_by", "name": "Thảo Cầm Viên Sài Gòn", "position": "ở bên phải cách 800m" }],
                  "start": { "lat": 10.789275952671893, "lng": 106.71410845472158 },
                  "end": { "lat": 10.7893718, "lng": 106.71395940000001 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Đi bên phải để vào Nguyễn Hữu Cảnh",
                  "distance": { "meters": 106, "text": "110 m" },
                  "duration": { "seconds": 21, "text": "21 giây", "hours": 0, "minutes": 0 },
                  "road": "Nguyễn Hữu Cảnh",
                  "notes": [{ "type": "pass_by", "name": "Language Service Providers", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.783292743935348, "lng": 106.70686443044998 },
                  "end": { "lat": 10.7831529, "lng": 106.7067491 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Saigon Waterbus",
                  "distance": { "meters": 429, "text": "450 m" },
                  "duration": { "seconds": 80, "text": "1 p", "hours": 0, "minutes": 1 },
                  "landmark": "Saigon Waterbus",
                  "notes": [{ "type": "pass_by", "name": "Saigon Trade Center Tower - Office Saigon", "position": "ở bên trái cách 300m" }],
                  "start": { "lat": 10.782691715430081, "lng": 106.70622959273763 },
                  "end": { "lat": 10.7826433, "lng": 106.70606149999999 }
                }
              ]
            },
            {
              "description": "Đi theo Võ Văn Tần đến Nguyễn Thị Minh Khai tại Bàn Cờ",
              "distance": { "meters": 3439, "text": "3,4 km" },
              "duration": { "seconds": 761, "text": "13 p", "hours": 0, "minutes": 13 },
              "steps": [
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Rẽ trái tại Galleria New Collection By TrueStay w/ Pool & Gym",
                  "distance": { "meters": 754, "text": "750 m" },
                  "duration": { "seconds": 151, "text": "3 p", "hours": 0, "minutes": 3 },
                  "landmark": "Galleria New Collection By TrueStay w/ Pool & Gym",
                  "notes": [{ "type": "pass_by", "name": "Khoa Dược - Đại học Y Dược TP.HCM", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.78511285653108, "lng": 106.70329582069719 },
                  "end": { "lat": 10.785231999999999, "lng": 106.7031585 }
                },
                {
                  "action": { "text": "Vào vòng xuyến", "type": "ROUNDABOUT_ENTER_AND_EXIT" },
                  "instruction": "Tại vòng xuyến, đi theo lối ra thứ 1",
                  "distance": { "meters": 337, "text": "350 m" },
                  "duration": { "seconds": 80, "text": "1 p", "hours": 0, "minutes": 1 },
                  "notes": [{ "type": "pass_by", "name": "HỢP PHÁP HÓA LÃNH SỰ TEM ĐSQ TẠI HCM", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.780546578894311, "lng": 106.69859545466234 },
                  "end": { "lat": 10.7804048, "lng": 106.69848259999999 }
                },
                {
                  "action": { "text": "Vào vòng xuyến", "type": "ROUNDABOUT_ENTER_AND_EXIT" },
                  "instruction": "Tại vòng xuyến, đi theo lối ra thứ 2",
                  "distance": { "meters": 2203, "text": "2,2 km" },
                  "duration": { "seconds": 488, "text": "8 p", "hours": 0, "minutes": 8 },
                  "notes": [{ "type": "pass_by", "name": "Tyribee", "position": "ở bên trái cách 1,6 km" }],
                  "start": { "lat": 10.782292478276819, "lng": 106.69635984440718 },
                  "end": { "lat": 10.7824173, "lng": 106.69622919999999 }
                },
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Rẽ trái tại LOVE QUALITY",
                  "distance": { "meters": 145, "text": "150 m" },
                  "duration": { "seconds": 42, "text": "42 giây", "hours": 0, "minutes": 0 },
                  "landmark": "LOVE QUALITY",
                  "notes": [{ "type": "pass_by", "name": "Công Ty Cổ Phần Giáo Dục Lvt", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.769182621680548, "lng": 106.68337693913587 },
                  "end": { "lat": 10.769049899999999, "lng": 106.6832532 }
                }
              ]
            },
            {
              "distance": { "meters": 44, "text": "44 m" },
              "duration": { "seconds": 16, "text": "16 giây", "hours": 0, "minutes": 0 },
              "steps": [
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Rẽ trái sau Paris Baguette Cao Thắng Bánh Kem",
                  "distance": { "meters": 44, "text": "44 m" },
                  "duration": { "seconds": 16, "text": "16 giây", "hours": 0, "minutes": 0 },
                  "landmark": "Paris Baguette Cao Thắng Bánh Kem",
                  "notes": [{ "type": "pass_by", "name": "Công Ty Tnhh Foodmate", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.768304897695582, "lng": 106.68411061311767 },
                  "end": { "lat": 10.7681873, "lng": 106.68424929999999 }
                }
              ]
            },
            {
              "description": "Đi tiếp Cống Quỳnh đến điểm đến của bạn",
              "distance": { "meters": 87, "text": "87 m" },
              "duration": { "seconds": 107, "text": "2 p", "hours": 0, "minutes": 2 },
              "steps": [
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại 284 Cong Quynh",
                  "distance": { "meters": 59, "text": "59 m" },
                  "duration": { "seconds": 16, "text": "16 giây", "hours": 0, "minutes": 0 },
                  "landmark": "284 Cong Quynh",
                  "start": { "lat": 10.76825335603005, "lng": 106.68441300484055 },
                  "end": { "lat": 10.768386999999999, "lng": 106.6845357 }
                },
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Rẽ trái tại Chillout rooftop_Tropical style homestay in the center of District 1",
                  "distance": { "meters": 28, "text": "28 m" },
                  "duration": { "seconds": 91, "text": "2 p", "hours": 0, "minutes": 2 },
                  "landmark": "Chillout rooftop_Tropical style homestay in the center of District 1",
                  "notes": [{ "type": "annotation" }],
                  "start": { "lat": 10.768253651452543, "lng": 106.68487033187729 },
                  "end": { "lat": 10.768186, "lng": 106.6850401 }
                }
              ]
            }
          ]
        }
      },
      {
        "name": "Hầm Sông Sài Gòn",
        "distance_meters": 8890,
        "distance_text": "8,9 km",
        "duration": {
          "without_traffic": {
            "seconds": 1366,
            "text": "23 p",
            "hours": 0,
            "minutes": 23
          },
          "with_traffic": {
            "seconds": 1523,
            "text": "25 p",
            "hours": 0,
            "minutes": 25
          },
          "range": {
            "min_seconds": 1180,
            "min_text": "20 p",
            "text": "19 – 37 phút"
          }
        },
        "has_toll": false,
        "traffic_note": "Giao thông thưa thớt, như thường lệ",
        "steps": {
          "groups": [
            {
              "distance": { "meters": 31, "text": "31 m" },
              "duration": { "seconds": 11, "text": "11 giây", "hours": 0, "minutes": 0 },
              "steps": [
                {
                  "action": { "text": "Đi thẳng", "type": "STRAIGHT" },
                  "instruction": "",
                  "distance": { "meters": 31, "text": "31 m" },
                  "duration": { "seconds": 11, "text": "11 giây", "hours": 0, "minutes": 0 },
                  "start": { "lat": 10.798575503772271, "lng": 106.72314495616634 },
                  "end": { "lat": 10.798754299999999, "lng": 106.723124 }
                }
              ]
            },
            {
              "description": "Đi theo Nguyễn Hữu Cảnh, Cầu Thủ Thiêm, Nguyễn Cơ Thạch, Mai Chí Thọ, ... và Võ Văn Kiệt đến Hồ Hảo Hớn tại Cầu Ông Lãnh",
              "distance": { "meters": 7314, "text": "7,3 km" },
              "duration": { "seconds": 939, "text": "16 p", "hours": 0, "minutes": 16 },
              "steps": [
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Sunwah - One-Bedroom Apartment",
                  "distance": { "meters": 83, "text": "83 m" },
                  "duration": { "seconds": 40, "text": "40 giây", "hours": 0, "minutes": 0 },
                  "landmark": "Sunwah - One-Bedroom Apartment",
                  "start": { "lat": 10.798856203772273, "lng": 106.72311205616634 },
                  "end": { "lat": 10.799035, "lng": 106.72309109999999 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải vào Cầu Vượt Nguyễn Hữu Cảnh",
                  "distance": { "meters": 1118, "text": "1,1 km" },
                  "duration": { "seconds": 123, "text": "2 p", "hours": 0, "minutes": 2 },
                  "road": "Cầu Vượt Nguyễn Hữu Cảnh",
                  "notes": [{ "type": "continue" }, { "type": "pass_by", "name": "Tiệm Trà Sữa INCHA", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.799057831695809, "lng": 106.7236671850363 },
                  "end": { "lat": 10.799033, "lng": 106.72384830000001 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Đi bên phải để vào Nguyễn Hữu Cảnh",
                  "distance": { "meters": 498, "text": "500 m" },
                  "duration": { "seconds": 74, "text": "1 p", "hours": 0, "minutes": 1 },
                  "road": "Nguyễn Hữu Cảnh",
                  "notes": [{ "type": "pass_by", "name": "Cà phê Milano", "position": "ở bên phải cách 350m" }],
                  "start": { "lat": 10.793563569828423, "lng": 106.71813957159344 },
                  "end": { "lat": 10.7933836, "lng": 106.7181379 }
                },
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Chếch sang bên trái",
                  "distance": { "meters": 18, "text": "18 m" },
                  "duration": { "seconds": 3, "text": "3 giây", "hours": 0, "minutes": 0 },
                  "start": { "lat": 10.789727054373236, "lng": 106.71676853664536 },
                  "end": { "lat": 10.7896463, "lng": 106.7166048 }
                },
                {
                  "action": { "text": "Vào vòng xuyến", "type": "ROUNDABOUT_ENTER_AND_EXIT" },
                  "instruction": "Tại vòng xuyến, đi theo lối ra thứ 2",
                  "distance": { "meters": 930, "text": "950 m" },
                  "duration": { "seconds": 85, "text": "1 p", "hours": 0, "minutes": 1 },
                  "start": { "lat": 10.7896463, "lng": 106.7166048 },
                  "end": { "lat": 10.789504299999999, "lng": 106.7165266 }
                },
                {
                  "action": { "text": "Nhập làn", "type": "MERGE" },
                  "instruction": "Nhập vào Nguyễn Cơ Thạch",
                  "distance": { "meters": 1016, "text": "1,0 km" },
                  "duration": { "seconds": 164, "text": "3 p", "hours": 0, "minutes": 3 },
                  "road": "Nguyễn Cơ Thạch",
                  "notes": [{ "type": "pass_by", "name": "Căn Hộ Thủ Thiêm Zeit - Thủ Thiêm Zeit - Nguyễn Cơ Thạch - Phường An Khánh", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.7823085899426, "lng": 106.72025147615248 },
                  "end": { "lat": 10.78215, "lng": 106.72033809999999 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải vào Mai Chí Thọ",
                  "distance": { "meters": 670, "text": "650 m" },
                  "duration": { "seconds": 86, "text": "1 p", "hours": 0, "minutes": 1 },
                  "road": "Mai Chí Thọ",
                  "notes": [{ "type": "pass_by", "name": "Empire City View Luxury Apartment", "position": "ở bên phải cách 500m" }],
                  "start": { "lat": 10.77370087757005, "lng": 106.72247101886383 },
                  "end": { "lat": 10.773539099999999, "lng": 106.72255129999999 }
                },
                {
                  "action": { "text": "Đi thẳng", "type": "STRAIGHT" },
                  "instruction": "",
                  "distance": { "meters": 254, "text": "250 m" },
                  "duration": { "seconds": 53, "text": "53 giây", "hours": 0, "minutes": 0 },
                  "start": { "lat": 10.77154746446051, "lng": 106.71697543696484 },
                  "end": { "lat": 10.771501899999999, "lng": 106.7167982 }
                },
                {
                  "action": { "text": "Đường đổi tên", "type": "NAME_CHANGE" },
                  "instruction": "Tiếp tục vào Hầm Sông Sài Gòn",
                  "distance": { "meters": 1780, "text": "1,8 km" },
                  "duration": { "seconds": 156, "text": "3 p", "hours": 0, "minutes": 3 },
                  "road": "Hầm Sông Sài Gòn",
                  "notes": [{ "type": "continue" }, { "type": "pass_by", "name": "[The Tresor] Saigon Luxury AP 2 bedroom Pool Gym Center", "position": "ở bên phải cách 1,5 km" }],
                  "start": { "lat": 10.770898221050821, "lng": 106.71487339380502 },
                  "end": { "lat": 10.770855599999999, "lng": 106.7146954 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Đi bên phải để đi tiếp Võ Văn Kiệt",
                  "distance": { "meters": 117, "text": "120 m" },
                  "duration": { "seconds": 25, "text": "25 giây", "hours": 0, "minutes": 0 },
                  "road": "Võ Văn Kiệt",
                  "notes": [{ "type": "pass_by", "name": "Dịch Vụ In Big", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.765433895449574, "lng": 106.70032614830353 },
                  "end": { "lat": 10.765336, "lng": 106.7001727 }
                },
                {
                  "action": { "text": "Rẽ trái", "type": "TURN", "direction": "LEFT" },
                  "instruction": "Chếch sang trái tại Pixel Hub",
                  "distance": { "meters": 830, "text": "850 m" },
                  "duration": { "seconds": 130, "text": "2 p", "hours": 0, "minutes": 2 },
                  "landmark": "Pixel Hub",
                  "notes": [{ "type": "pass_by", "name": "Jessie Apartment - Infinity pool - Masteri Millennium - Deluxe Apartment", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.765133900465708, "lng": 106.69946164434803 },
                  "end": { "lat": 10.765045299999999, "lng": 106.69930219999999 }
                }
              ]
            },
            {
              "description": "Đi tiếp Hồ Hảo Hớn đến điểm đến của bạn tại Bến Thành",
              "distance": { "meters": 1545, "text": "1,5 km" },
              "duration": { "seconds": 415, "text": "7 p", "hours": 0, "minutes": 7 },
              "steps": [
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Brita",
                  "distance": { "meters": 470, "text": "450 m" },
                  "duration": { "seconds": 110, "text": "2 p", "hours": 0, "minutes": 2 },
                  "landmark": "Brita",
                  "notes": [{ "type": "pass_by", "name": "Dai Tung Manufacturing & Trading Co., Ltd.", "position": "ở phía bên trái" }],
                  "start": { "lat": 10.759940885920296, "lng": 106.6941348969706 },
                  "end": { "lat": 10.759846999999999, "lng": 106.6939786 }
                },
                {
                  "action": { "text": "Đường đổi tên", "type": "NAME_CHANGE" },
                  "instruction": "Tại Ardent Heart Hostel, tiếp tục vào Đ. Cống Quỳnh",
                  "distance": { "meters": 144, "text": "140 m" },
                  "duration": { "seconds": 37, "text": "37 giây", "hours": 0, "minutes": 0 },
                  "road": "Đ. Cống Quỳnh",
                  "landmark": "Ardent Heart Hostel",
                  "notes": [{ "type": "pass_by", "name": "Trà Sữa Gạo Rang - Chipa Chip MilkTea", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.762738721602107, "lng": 106.69111717178284 },
                  "end": { "lat": 10.762877399999999, "lng": 106.6910004 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại CÔNG TY TNHH XÂY DỰNG THƯƠNG MẠI TOÀN THIÊN PHÁT",
                  "distance": { "meters": 49, "text": "49 m" },
                  "duration": { "seconds": 10, "text": "10 giây", "hours": 0, "minutes": 0 },
                  "landmark": "CÔNG TY TNHH XÂY DỰNG THƯƠNG MẠI TOÀN THIÊN PHÁT",
                  "notes": [{ "type": "pass_by", "name": "Mama Masala Indian Cuisine HCMC", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.763791671099025, "lng": 106.69035215993041 },
                  "end": { "lat": 10.7639484, "lng": 106.6902621 }
                },
                {
                  "action": { "text": "Vào vòng xuyến", "type": "ROUNDABOUT_ENTER_AND_EXIT" },
                  "instruction": "Tại vòng xuyến, đi theo lối ra thứ 2",
                  "distance": { "meters": 854, "text": "850 m" },
                  "duration": { "seconds": 184, "text": "3 p", "hours": 0, "minutes": 3 },
                  "notes": [{ "type": "pass_by" }, { "type": "pass_by", "name": "Family Homestay", "position": "ở phía bên phải" }],
                  "start": { "lat": 10.76409518261952, "lng": 106.69047186267852 },
                  "end": { "lat": 10.7641563, "lng": 106.6906441 }
                },
                {
                  "action": { "text": "Rẽ phải", "type": "TURN", "direction": "RIGHT" },
                  "instruction": "Rẽ phải tại Chillout rooftop_Tropical style homestay in the center of District 1",
                  "distance": { "meters": 28, "text": "28 m" },
                  "duration": { "seconds": 74, "text": "1 p", "hours": 0, "minutes": 1 },
                  "landmark": "Chillout rooftop_Tropical style homestay in the center of District 1",
                  "notes": [{ "type": "annotation" }],
                  "start": { "lat": 10.768093573026322, "lng": 106.68519729954859 },
                  "end": { "lat": 10.768186, "lng": 106.6850401 }
                }
              ]
            }
          ]
        }
      }
    ]
  }
}

V. Các trường phản hồi

FieldTypeMô tả
direction_resultobjectPhản hồi chỉ đường cấp cao nhất, chứa điểm xuất phát, điểm đến và danh sách các tuyến đường
originobjectThông tin điểm xuất phát (địa chỉ, tọa độ, múi giờ, place_id)
origin.addressobjectĐịa chỉ của điểm xuất phát
origin.address.fullstringĐịa chỉ đầy đủ của điểm xuất phát
origin.latitudenumberVĩ độ của điểm xuất phát
origin.longitudenumberKinh độ của điểm xuất phát
origin.timezonestringMúi giờ địa phương của điểm xuất phát (vd: "Asia/Ho_Chi_Minh")
origin.country_codestringMã quốc gia hai ký tự của điểm xuất phát (vd: "VN")
origin.place_idstringPlace ID của điểm xuất phát
destinationobjectThông tin điểm đến (địa chỉ, tọa độ, múi giờ, place_id)
destination.addressobjectĐịa chỉ của điểm đến
destination.address.fullstringĐịa chỉ đầy đủ của điểm đến
destination.latitudenumberVĩ độ của điểm đến
destination.longitudenumberKinh độ của điểm đến
destination.timezonestringMúi giờ của điểm đến
destination.country_codestringMã quốc gia của điểm đến
destination.place_idstringPlace ID của điểm đến
routesarrayDanh sách các tuyến đường, mỗi tuyến có khoảng cách, thời gian và chỉ đường từng bước
routes[]objectMột tuyến đường với thông tin chi tiết về lộ trình
routes[].namestringTên tuyến đường mô tả lộ trình (vd: "Nguyễn Hữu Cảnh và Nguyễn Du")
routes[].distance_metersnumberTổng khoảng cách của tuyến tính bằng mét
routes[].distance_textstringKhoảng cách dạng văn bản thân thiện (vd: "6,7 km")
routes[].durationobjectĐối tượng thời gian di chuyển: không giao thông, có giao thông và khoảng ước tính
routes[].duration.without_trafficobjectThời gian trong điều kiện lý tưởng
routes[].duration.without_traffic.secondsintegerThời gian tính bằng giây
routes[].duration.without_traffic.textstringThời gian dạng văn bản (vd: "21 p")
routes[].duration.without_traffic.hoursintegerSố giờ
routes[].duration.without_traffic.minutesintegerSố phút
routes[].duration.with_trafficobjectThời gian với giao thông hiện tại
routes[].duration.with_traffic.secondsintegerThời gian tính bằng giây
routes[].duration.with_traffic.textstringThời gian dạng văn bản
routes[].duration.with_traffic.hoursintegerSố giờ
routes[].duration.with_traffic.minutesintegerSố phút
routes[].duration.rangeobjectKhoảng thời gian ước tính từ tối thiểu đến tối đa
routes[].duration.range.min_secondsintegerThời gian tối thiểu tính bằng giây (khi không có giao thông)
routes[].duration.range.min_textstringThời gian tối thiểu dạng văn bản (vd: "17 p")
routes[].duration.range.textstringKhoảng thời gian dạng văn bản (vd: "17 – 31 phút")
routes[].has_tollbooleantrue nếu tuyến đường có trạm thu phí
routes[].toll_textstringThông báo về phí đường bộ dạng văn bản (nếu có)
routes[].traffic_notestringMô tả tình trạng giao thông bằng tiếng Việt (vd: "Giao thông thưa thớt")
routes[].stepsobjectĐối tượng chứa các bước chỉ đường được nhóm theo từng chặng
routes[].steps.groupsarrayMảng các nhóm bước chỉ đường, mỗi nhóm là một chặng
groups[].descriptionstringMô tả tổng quan chặng đường (vd: "Đi theo Nguyễn Hữu Cảnh đến Nguyễn Du")
groups[].centerobjectĐiểm trung tâm của nhóm
groups[].center.latnumberVĩ độ trung tâm
groups[].center.lngnumberKinh độ trung tâm
groups[].distanceobjectKhoảng cách của nhóm
groups[].distance.metersnumberKhoảng cách tính bằng mét
groups[].distance.textstringKhoảng cách dạng văn bản
groups[].durationobjectThời gian của nhóm
groups[].duration.secondsintegerThời gian tính bằng giây
groups[].duration.textstringThời gian dạng văn bản
groups[].duration.hoursintegerSố giờ
groups[].duration.minutesintegerSố phút
groups[].stepsarrayCác bước chỉ đường trong nhóm
step.actionobjectNhãn hành động trực quan (rẽ trái/phải, đi thẳng, nhập làn, vào vòng xuyến...)
step.action.textstringVăn bản hành động bằng tiếng Việt (vd: "Rẽ phải", "Đi thẳng")
step.action.typestringLoại hành động (vd: TURN, STRAIGHT, MERGE, NAME_CHANGE)
step.action.directionstringHướng rẽ (vd: LEFT, RIGHT)
step.action.modifierstringMức độ điều chỉnh (vd: SLIGHT)
step.instructionstringHướng dẫn lái xe đầy đủ bằng tiếng Việt
step.distanceobjectKhoảng cách của bước
step.distance.metersnumberKhoảng cách tính bằng mét
step.distance.textstringKhoảng cách dạng văn bản
step.durationobjectThời gian của bước
step.duration.secondsintegerThời gian tính bằng giây
step.duration.textstringThời gian dạng văn bản
step.duration.hoursintegerSố giờ
step.duration.minutesintegerSố phút
step.roadstringTên đường hoặc công trình (vd: "Cầu Văn Thánh 2")
step.landmarkstringMốc hoặc địa danh nổi bật gần điểm rẽ (nếu có)
step.notesarrayMảng ghi chú bổ sung: đi tiếp (continue), đi qua (pass_by), chú thích (annotation)
step.notes[].typestringLoại ghi chú (vd: continue, pass_by, annotation, destination_hint)
step.notes[].namestringTên địa danh trong ghi chú
step.notes[].positionstringVị trí tương đối (vd: "ở phía bên phải")
step.startobjectTọa độ bắt đầu
step.start.latnumberVĩ độ bắt đầu
step.start.lngnumberKinh độ bắt đầu
step.endobjectTọa độ kết thúc
step.end.latnumberVĩ độ kết thúc
step.end.lngnumberKinh độ kết thúc
routes[].steps.destination_notearrayMảng ghi chú khi gần đến nơi (vd: "Điểm đến sẽ ở bên trái")

Trong trang này