'Reduce the number of times Google places API is called

On a web page, when the user allows to share location, Google places API is called everytime on page load to get the user's city and pincode as I need the exact location everytime.

But since, for each API call Google charges some money, I want to reduce the number of times, it is being called.

I'm thinking of implementing the following solutions but have a question,

Solution: User moves from Point A to Point B, unless the distance between the points is greater than some minimum threshold value, Google places API won't be called.

How do I find this threshold value? Is there a way to find the two pincodes which are closest to each other as compared to any other pincode pair in India, and use the distance between them?

Please suggest if you have any other idea and let me know if I'm thinking in the right direction.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source