Getting started

REST API use api_key for all apis

Hostname

https://api-ss1.goong.io/rs

Params need for all

api_key={your_api_key}

Direction

Routing from A to B

URL: /Direction

Method: GET

Params:

{
 origin: required (string), //Example: 20.981971,105.864323
 destination: required (string), //Example:20.994531,105.849663
 alternatives: (boolean),
 vehicle: (string)//Example: car | bike | taxi
}

Response

application/json

{
    "geocoded_waypoints": [],
    "routes": [
        {
            "bounds": {},
            "legs": [
                {
                    "distance": {
                        "text": "3 km",
                        "value": 3350
                    },
                    "duration": {
                        "text": "6 phut",
                        "value": 343
                    }
                }
            ],
            "overview_polyline": {
                "points": "a`a_C{qceSq@L}@LY@}@H{CR@P@z@@VIZAN@xE@~B?jA@nBBzD@pC?hD@hC@vD?`MD`DAhCC|CClBG|ACb@AzBA`C?`D@vC@nE?fCQCiAMEAEAQCKAe@GAAq@KOC_BYA?AAIAEAWEoAUi@IgASAAQCq@KaBWa@EcAKG?UCq@GIAMAQAYEc@EOCq@IE?i@IOCA?QEC?MCOE[GGAKCMEICAAEAACC?EEMKCCIGIKKKAAIIMMEEQWKKACW[GIm@o@e@g@]_@MOCCCCKIYSMGQGGCQEEAQEQEE?GAOCUE_@Ea@EEAM???WCYAc@CSAK?WA_@C]AKAG?CAm@ESA"
            },
            "warnings": [],
            "waypoint_order": []
        }
    ]
}

Distance Matrix

Get matrix off distance for routing from A to B

URL: /DistanceMatrix

Method: GET

Params:

{
 origin: required (string), //Example: 20.981971,105.864323
 destinations: required (string), //Example: 21.031011,105.783206|21.022328,105.790480|21.016665,105.788774
 alternatives: (boolean),
 vehicle: (string)//Example: car | bike | taxi
}

Response

{
    "rows": [
        {
            "elements": [
                {
                    "status": "OK",
                    "duration": {
                        "text": "4 phút",
                        "value": 248
                    },
                    "distance": {
                        "text": "2 km",
                        "value": 2140
                    }
                },
                {
                    "status": "OK",
                    "duration": {
                        "text": "1 phút",
                        "value": 75
                    },
                    "distance": {
                        "text": "486 m",
                        "value": 486
                    }
                },
                {
                    "status": "OK",
                    "duration": {
                        "text": "2 phút",
                        "value": 109
                    },
                    "distance": {
                        "text": "726 m",
                        "value": 726
                    }
                }
            ]
        }
    ]
}

Place

Get points by keyword

URL: /Place/AutoComplete

Method: GET

Params:

{
  input: required (string), //Example: hoang dao thuy ha noi, keyword of you need
  location: (string), //Example: 20.981971,105.864323, Your location in map
  limit: (int), //Example: 5, Limit rows for results
  radius: (int), //Example: 50, Default: 50, Distance round from your location by kilometers, required if your use location params
}

Response

application/json

{
    "predictions": [
        {
            "description": "Bệnh viện Đa khoa Vũ Anh, 15 Phan Văn Trị, Phường 7, Gò Vấp, Hồ Chí Minh",
            "matched_substrings": [],
            "place_id": "ryOv6PqB4gRMAQqbXld9eLNZ0mp1w7WE",
            "structured_formatting": {
                "secondary_text": "15 Phan Văn Trị, Phường 7, Gò Vấp, Hồ Chí Minh"
            },
            "terms": []
        },
        {
            "description": "Bệnh viện Vũ Anh, 15-16 Phan Văn Trị, Phường 7, Gò Vấp, Hồ Chí Minh",
            "matched_substrings": [],
            "place_id": "lWqwMrV0POGEzKb68z3KZgD5Rnobp2ad",
            "structured_formatting": {
                "secondary_text": "15-16 Phan Văn Trị, Phường 7, Gò Vấp, Hồ Chí Minh"
            },
            "terms": []
        }
    ],
    "status": "OK"
}

Get point detail by Id

URL: /Place/Detail

Method: GET

Params:

{
 placeid: required (string) // Example: 0WmA4vbeody2J9AEvVM9YE3ZN85z7Mrw
}

Response

application/json

{
    "result": {
        "formatted_address": "President Place, 93 Nguyễn Du, Bến Nghé, Quận 1, Hồ Chí Minh",
        "geometry": {
            "location": {
                "lat": 10.7770166397095,
                "lng": 106.698272705078
            }
        },
        "name": "Glow Skybar"
    },
    "status": "OK"
}

Geocode

Get point by Latlng

URL: /Geocode

Method: GET

Params:

{
 latlng: required (string) //Example: 20.981971,105.864323
}

Response

application/json

{
    "plus_code": {},
    "results": [
        {
            "address_components": [
                {
                    "long_name": "Com Nieu",
                    "short_name": "Com Nieu"
                },
                {
                    "long_name": "",
                    "short_name": ""
                },
                {
                    "long_name": "Phường 7",
                    "short_name": "Phường 7"
                },
                {
                    "long_name": "Quận 3",
                    "short_name": "Quận 3"
                },
                {
                    "long_name": "Thành phố Hồ Chí Minh",
                    "short_name": "Thành phố Hồ Chí Minh"
                }
            ],
            "name": "Com Nieu",
            "formatted_address": "Phường 7, Quận 3, Hồ Chí Minh",
            "geometry": {
                "location": {
                    "lat": 0,
                    "lng": 0
                }
            },
            "place_id": "lWqwMrV0POGEzKbZ5V4KZgD5Rnobp2ad",
            "plus_code": {},
            "types": []
        }
    ],
    "status": "OK"
}