API Model for Google Maps Service

The previous lesson discussed the architectural style, communication protocol, and data formats. Let's define and discuss the input and output of our Google Maps API in this lesson. We’ll cover some important aspects of designing our API, such as defining the base URL and other endpoints, deciding data entities, and defining the request-response format for each API call.

Let's start with the base URL of our Google Maps API.

Base URL and API endpoints

The base URL for our Google Maps API comprises protocol (https), domain (api.googlemaps.com), and version(v1.0). The path for our Google maps services, such as maps, route finder, navigation, places, and so on, is represented in the URL with services. The image below shows the base URL for our API:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.