CEDRUS

Control your API key costs

As already mentioned in the Google key creation tutorial, the services used are charged separately by Google. Como já mencionado no tutorial de criação da chave Google, os serviços utilizados são cobrados a parte pelo Google. When creating the key, however, a bonus of $300.00 ($300.00), valid for 3 months, is awarded by Google. At the end of this period, each month there is still a $200.00 bonus. Depending on the service used, small and medium-sized businesses may never exceed this limit.

In any case, you can keep track of how much you have already spent on services, and how much your current card bill is.

Checking your usage costs

To view costs, go to your Google API Console (if you don't already have an API key, go to our tutorial).

Tutorial custos api Google

This first page shows the number of requests made for each of the services. To know the costs, click on the "Navigation Menu" on the upper left corner, and select "Billing".

Tutorial custos api Google

Then in the left corner click on "Reports".

Tutorial custos api Google

This screen shows the current total cost. In the image above, o custo é de R$119,56. Uma observação importante! Você pode optar por mostrar os custos com ou sem os créditos gratuitos fornecidos pelo google. Simply check or uncheck the box at the bottom right corner "Credits - Discounts". In the image above the costs are being calculated without the discounts, while in the image below the discounts are selected:

Tutorial custos api Google

Note that when you select the discounts, the total costs become 0.

Service suggestion of use by CEDRUS

Cedrus allows the user to choose whether or not to use Google's services, so there is always a free equivalent service built into the router. However, since there are several services used by Google, we encourage a usage with parsimonious settings. In this configuration, the cheapest services are always used from Google, and the more expensive ones only in special cases. All choices are made in the "Settings" screen of the router. Below is an image of the screen, with the three service choices highlighted. highlighted.

Tutorial custos api Google

Below we highlight the 3 services, and our suggested uses in our roadmapper.

1 - Distance matrix fetching :

This service is responsible for collecting information on distances and times between locations. An "OSRM" option fetches data for free, but travel times do not take into account traffic. That is, the distances will be very similar to those collected by Google, however arrival and departure times will be more approximate. Cedrus recommends selecting the OSRM option. When there is a delivery where the arrival and departure times of customers are used for the operation, we recommend selecting the "Google (paid)" option. is an expensive service, so that for large routes, the chance of extrapolating the free usage limit increases.

2 - Lat/long fetching:

In order to collect the distance and time information, it is necessary that each customer is assigned their latitude and longitude. This service makes this collection, from their addresses. Again, there is the option of free collection by "OSRM" (relaxed and exact). There is a possibility that the free search does not find the latitude and longitude for the address. The "OSRM and Google" option makes an initial search for "OSRM" and, only if this fails, activates the search for "Google". As this service is very cheap, we recommend the "OSRM and Google" option. Most likely the free limits will not be extrapolated. Also remembering that it is possible to save recurring customers, in which latitudes and longitudes have already been collected in the Cedrus database.

3 - Routes visualization :

This service defines how routes will be shown. The option "Google (no cost)" opens all points on Google maps. There is a limitation on the number of clients that can be shown on Google maps (20 maximum), in this way, in order for routes with more than 20 customers to be shown, we separate them into several sections, and each section is shown in a Google map. For example, assuming a route with 30 clients: 2 links will be generated, one with the route from client 1 to 20 and a second with the route from client 20 to 30. The second option "Google (paid)" does not have this limitation, all customers are shown at once (different routes, however, are still shown in different links). We suggest leaving the option "Google (free)" selected. When there are many customers on the same route, we suggest changing the value to "Google (paid)", and then return to the original value.

With these configurations, we believe that the use of the router is optimized, as well as the costs to be greatly reduced (or non-existent). In brief, our suggestion for the default settings is as follows:

Parameter Suggested option
Distance matrix fetching OSRM (no costs)
Lat/long fetching OSRM and Google (may have costs)
Routes visualization Google (no costs)