• We have a map of our distributors on our site containing over 200 different “stores”, and as of recently, we have noticed that the store locator has been making an incredibly high amount of Geocode API calls, well over 100,000 in the past month. Following the guide to reduce the number of calls did not help, as those settings were already in place. What could be done to reduce the number of calls? We don’t have the userbase to justify this high amount of calls and our API bills have become astronomically high.
    Thank you!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Can you make sure you have set a referrer restriction in the Google Developers Console for the browser key? If not, set one, and it might be that someone else is using your key.

    You can also check this with Google Maps support, they can see if your API key is used somewhere.

    Does the amount of visits in Google Analytics ( or any other stats service ) kind of match with the amount of requests?

    This suddenly spiked, or have been going up over time?

    In the next major update there will be support for reCaptcha to stop automated abuse. I don’t know if that’s the case here, but if so, then that will prevent it from happening and it will come with support for OpenStreetMaps.

    I will have beta version ready with support for those two soon, and if you like to try, then just open a support ticket here.

    Thread Starter devmozay

    (@devmozay)

    Thanks for the reply, Tijmen.

    We do have referrer restrictions on, so API usage is limited to our live site and one other site that’s still in development.

    It’s been slowly increasing week by week, and I’m trying to track down analytics with our marketing team to see if it matches user sessions on that page. I suspect that each user’s interaction is making more calls than necessary, and I’m wondering if there’s anything else we can do to minimize that.

    I’ve applied for the beta program –?that sounds like a good option. We were looking at another map solution that used OpenStreetMaps, but I was worried that it had an API call limit that we were already surpassing.

    Do you know when the beta version will be available for use? We paid over $500 last month for Google API calls and need to cut down on that cost as soon as we can.

    Thanks!

    Thread Starter devmozay

    (@devmozay)

    Got some more info on this. Hopefully this helps put things in perspective.

    Here are our API stats for the past 30 days
    Geocoding API: 121,176
    Maps JavaScript API: 45,229

    Here are our user session stats for the past 30 days
    map page pageviews: 43,897
    of those, 35,361 were unique pageviews.

    About 8,500 users should have had that page cached since only 43,897 were unique visitors.

    So that means on average, each time that page was loaded (regardless of cache) it was making 2.76 geocoding API calls and a little over 1 javascript call.

    Does that sound right to you? Is there anything we can do here?

    • This reply was modified 4 years, 10 months ago by devmozay.
    • This reply was modified 4 years, 10 months ago by devmozay. Reason: updated pageview data

    I second this. We have only 11 stores for a small regional customer and our Google API for maps calls count – for stores that don’t change location – Was over 32k last month. That is much higher than expected.

    We’ve turned off autocomplete and user geolocation.

    Will this plugin offer cached locations in the map? Store locations won’t change.

    • This reply was modified 4 years, 10 months ago by xyriskenn.
    Plugin Author Tijmen Smit

    (@tijmensmit)

    @xyriskenn how many visitors did the store locator page get over the whole month? If you contact Google Maps support, then they will be able to see if someone is using your API key.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    @devmozay

    So that means on average, each time that page was loaded (regardless of cache) it was making 2.76 geocoding API calls and a little over 1 javascript call.

    2.7 geocoding API calls means that the average user makes 2.7 searches. Page caching won’t make a difference since it still has to load the map itself, and you don’t really know in advance what a user will search for.

    But I’m making good progress with implementing OpenStreetMaps, which does work without API keys, but it does have a fair usage policy, so if you make to many calls, then they can cut you off.

    • This reply was modified 4 years, 10 months ago by Tijmen Smit.

    Across 11 store pages we see around 30 visitors per site per day. Last month the API had 109,000 calls. The API is web site and API restricted.

    In our case we impose a requirement for a customer to choose a store location once a day. Your solution for OpenMaps is welcome.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    @xyriskenn Any chance you can send me the url this happens on, and screenshot of the API usage ( the section that lists the different API’s used ) to support at wpstorelocator.co?

    I just checked my stats, and there are 2200 visits to the demo page a a month, this results in 4000 Geocoding API calls and 3100 JavaScript Maps API calls.

    You didn’t happen to import CSV files that required geocoding?

    • This reply was modified 4 years, 10 months ago by Tijmen Smit.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WPSL making an unreasonably high amount of API calls’ is closed to new replies.