If i add places by my app - google-maps

My app needs show some places by add javascript.
I read the places api just now,but i had a confusion: if i add many places by my server,can other people see it on my app immediately?and How did google charge for it

Yes, if you have your API KEY people will see the changes immediately.
about the charges for use;
The Google Places API Web Service enforces a default limit of 1,000 free requests per 24 hour period, calculated as the sum of client-side and server-side requests. If your app exceeds the initial limit, the app will start failing. You can increase this limit free of charge, up to 150,000 requests per 24 hour period.
The maximum limit for free usage is 150,000 requests per 24 hour period. If your app exceeds the limit, the app will start failing again. Purchase a Google Maps APIs Premium Plan license to get more than 150,000 requests per 24 hour period.
and more you can read from here.

Related

When does Google Apps Script reset the daily quota?

Daily quotas for Google services are described here. For example 100 email recipients per day. How is "day" defined when evaluating the quota? Does the quota get reset when it's midnight in my time zone? Or in Greenwich? Or do they count the statistics of the past 24 hours with a sliding time window?
For Apps Script it's seems no resource to get such info.
But you can check Google Cloud quotas help page to get an idea on how Google calculates per day quotas:
For per-day rate quotas: The Current usage is the total usage for far in the current 24-hour period for day-rate quotas.
Also see this related questions on when non-Apps Script quotas reset:
When does the daily error limit for the analytics API reset?
Google API: Quota Limit Reset Times and Timezone
The answer you are looking for is currently written here in this reference article:
Limits per day are applied over a rolling 24-hour period, not a set time of day.
So basically, quota limits are restored over a set of 1-24 hours starting from the recent period that it was depleted.
And, aside from that, these quota limits are not subject only to App Script, rather than the service quota it uses by their Google Service is all used by their designated quota reserve as explained here:
Note: In addition to the Apps Script quotas, some features have quotas created by the Google product they're associated with. A use of a product feature in Apps Script depletes all associated quota reserves. A feature becomes unavailable if any of the associated quotas are reached.
Side note:
As mentioned by CizRanger, the two conditions below are the requirements needed for you to increase your quota limits if you are using a Google Workspace account:
Your domain has cumulatively paid at least USD 100 (or equivalent)
At least 60 days have passed since reaching that payment threshold
This is a really good question!
Based on my experience the Quota reset for certain quotas is reset within 24 hours right after the last run of your script.
Moreover, you need to keep in mind that if you have a trial Google Workspace (After you convert from a free trial account to a paid subscription) this means that you need to:
1-Your domain has cumulatively paid at least USD $100 (or equivalent).
2-At least 60 days have passed since reaching that payment threshold.

Google fit API quotas and limitation

Is there a quotas and request limitation when using google fit api? I want to use the google fit api and I'm curious if there is a limitation when using it.
You may check your project's Fitness API current limit of in the Google Developer Console. As I've checked my current project, the default limits are:
86,400 Queries per day
500 Queries per 100 seconds per user
1,000 Queries per 100 seconds
Daily quotas reset at midnight Pacific Time (PT). You can request more quota limits or view quotas for your other services on the Quotas page, found in IAM & admin.

New Google Maps Platform - How do I set my own usage limits?

In their notifications about the new billing system for the Google Maps APIs, Google very clearly state that you "can set usage limits to protect against unexpected increases". However, I haven't found any documentation regarding how to set these usage limits against an API key. Does anyone know how to do this?
To clarify, I would like to set my own daily usage limits against my API key to prevent it ever going over the free threshold for the static maps API.
I understand Google means that you can set your custom daily quota for each individual API in order to stay within free 200$, not a global per API key/project/Billing account daily quota. As far as I know there is no such thing as limit per daily usage in $ per Billing account yet.
There are alerts that you can establish in your Billing account and receive notifications if your usage is close to the defined budget. Have a look at the following document that explain how to set alerts:
https://cloud.google.com/billing/docs/how-to/budgets?hl=en
If your project uses only Static Maps API, it is easy to set daily quota to stay within 200$ per month. The price sheet says that you can have up to 100 000 free requests per month. That means 100 000 / 31 = 3225 free requests per day. You can go to Quota section of Static Maps API in your project
https://console.developers.google.com/google/maps-apis/apis/static-maps-backend.googleapis.com/quotas?project=YOUR_PROJECT_ID&duration=PT1H
and change your daily quota as shown in my screenshots
edit number requests per day
and you are set.
I hope this helps!
OK a bit late for reply, but maybe somebody else can use this.
You do get tons of free map hits etc.
If you don't link a pay account, then you are limited to 1 hit per day (that's google maps) which is useless. All other quotas like 10000 per 100 sec etc are secondary to the 1 hit per day.
Now once you have linked your pay account or a Credit Card etc, to google development console then you get full quota for free user, plus more if you go over your quota covered by your Credit Card.
However don't panic, for first year it's all free and you get $300 (at this moment) worth of free stuff.
Even if you go over this limit Google will first ask you if you wish to change to payment system or continue with free.
If you decide to pay then you will be charged per indicated on google dev site.
If you decide to go with free option then the service to your site will stop until next rotation, i.e. day or month etc depending on service.
see this table.
Unless you have millions of hit on your map page or app, then the free quota is more than enough for normal sites.
Here is a price calculator by google.
As you see you get a lot of unlimited stuff and some paid if you go over your recurring credit of $200 or $300
Google makes it so complicated because it involves people coming from old system and those registering between roll over etc.
perhaps this will help too.
You can also set budgets and alerts just in case you go over budget (via Billing section of dev site)
So in short :) you get tons of free and if you have a lot of visitors the surely you make some money to pay for the services.
Note that google charges for all their API services in 1 place so if you use say Geocoding and firebase and cloud dev etc then you will soon start paying.
Sorry for any typos, I did this fast.
Capping API Usage
Depending on the API, you can explicitly cap requests in a variety of ways, including: requests per day, requests per 100 seconds, and requests per 100 seconds per user.
You might want to limit the billable usage by setting caps. For example, to prevent getting billed for usage beyond the free courtesy usage limits, you can set requests per day caps.
For more info, check this doc: https://cloud.google.com/apis/docs/capping-api-usage

Avoid over_query_limit license

I currently have an application based on phonehap cordova and makes use of the maps and services of google mpas.
Some of these services are the geocoding and Directions service, with the geocoding I had problems about the "Over query limit" when geocoding more than 250 addresses so I had to implement the use of SetTimeout and delays in time not to send more than 10 Or 20 requests per second. As with geocoding is made use of the service Directions Service in which routes are made on the map and which sometimes also throws the error "Over_query_limit" so that also makes a setTimeout or a timeout in each Routing request.
But this timeout or setTimeout causes the application to slow down by doing these processes for what we already know.
According to this problem and the different plans and tariffs that google offers which of them could serve me to cover mainly these two problems?
The client side per session limits are the same for Premium and Standard plans. You can execute 10 initial requests and after that 1 request per second.
The rate limit is applied per user session, regardless of how many users share the same project. When you first load the API, you are allocated an initial quota of requests. Once you use this quota, the API enforces rate limits on additional requests on a per-second basis. If too many requests are made within a certain time period, the API returns an OVER_QUERY_LIMIT response code.
The per-session rate limit prevents the use of client-side services for batch requests, such as batch geocoding. For batch requests, use the Google Maps Geocoding API web service.
https://developers.google.com/maps/documentation/javascript/geocoding#UsageLimits
In order to solve the issue you should create server side code and call web services as suggested in documentation. With web services you will have 50 QPS and 2500 daily request for free (100K daily requests with Billing enabled) in Standard plan. With Premium plan there is no daily limit and you have 50 QPS as well.
Have a look at documentation for further details
https://developers.google.com/maps/documentation/geocoding/usage-limits

Bypass Google Geocoding API IP Rate Limits

We are a division of a large corporation and are running into a MAJOR problem with the Google maps and geocoding API. The problem is that all 70 divisions of our corporation are behind the same IP address. So a customer service agent in India would appear to be coming from the same IP address as a developer in Cleveland, OH who would appear to be coming from the same IP address as a division president in western Europe. With over 130,000 employees, we routinely get blocked for exceeding the IP rate limit.
Aside from individuals just browsing to websites that happen to be using Google maps with client-side geocoding requests, any division that attempts to do batch geocoding or provides their own application for showing maps will all contribute to the same limit! We actually use our own Where To Buy service internally, which is publicly available, (http://www.ridgid.com/Tools/Where-To-Buy/), to give customers information about local distributors.
While we are not running into an API limit (at least not yet, and when we do we can always buy the enterprise license), we are running into the IP rate limit and currently have no workaround. We are already following best practices in terms of caching up geocoding results and reducing wasteful calls. Thankfully this isn't a problem for our customers as they are not on the same IP as users within our corporation.
The question is whether there is ANY way we can get an exception from Google to our specific IP address to improve the IP-based limitations given our setup? This is really a question for Google. Thanks for your help!
A division of a large corporation with tens of thousands of employees should have an enterprise licence.
I don't think there's a limit associated with IP if you are using the client-side geocoding as described here:
https://developers.google.com/maps/articles/geocodestrat
Server-side geocoding through the Geocoding Web Service has a quota
of 2,500 requests per IP per day, so all requests in one day count
against the quota. In addition, the Web Service is rate-limited, so
that requests that come in too quickly result in blocking.
Client-side geocoding through the browser is rate limited per map session, so the geocoding > is distributed across all your users and scales with your userbase.
A "map session" means every time the Javascript Map API is loaded. However there might be a limit on that as well, whether or not it's associated with IP / domain / sub-domain / URL still needs further clarification.
And the "rate limited" on client side doesn't mean there is a daily quota or something, I had tested this method, on a single day, it can geocode more than 2500 addresses. You will have to think and test how the "rate limit" works, my observation is it let you burst to around 10 addresses in no time, then limit you to a rate of around 1 geocode per second for the next 150 request, further request from the same "session" would take exponentially longer time.
One possiblity is to use a batch of reverse geocode instead of a single request. Google allows up to 24 waypoints in a single direction request. Instead of sending a single reverse geocode you can wait until you have 24 reverse geocode accumulated in a batch. Or you can use Yahoo map like in this answer: Issue in displaying static Google maps.
I wondering if there is a lot of overlap in the requests, like everyone keeps looking up that same 50 locations? You write a caching proxy that makes requests to a internal database first then requests from Google when the results arn't found. This could be done at the software level changing the GeoCode call to a InternalGeoCode or maybe at the network level and catch all the requests to the Google Geocode servers and redirect them? I'm not 100% how hard this would be to implement or if it would help maybe the requests are all unique.
If you are doing forward geocoding only, I suggest trying out GeocodeFarm. I just got an email from them the other day saying they would start releasing "reverse" geocoding soon too and that they are still working out the kinks. Maybe it would help you since they have no request rate limits in place and the only limit is your daily 2,500 limit, same as google... IDK. Just a suggestion..
http://www.geocodefarm.com == the link
The limit in standard license is in 50 to 100 QPS (Queries per second) limit depending upon the service (i.e. Elevation service has a 50 QPS limit, Geocoding has a 100 QPS limit).
Despite you may have a higher quota you cannot perform more than 50 requests per second otherwise the server will block your IP for about 2 hours (based on my experience). The solution is to cache the requests and perform them on a scheduled basis and not upon occurrence.