Google Places API: Basic Data Only Query - google-maps

Google Places changed its pricing model last summer and the additional costs are pretty step and I might have to discontinue a research project on mine. Is it possible to query just the basic information for a place and not be charged for a place details request? My query is:
https://maps.googleapis.com/maps/api/place/details/json?key=MYCOMPANYKEY&placeid=ChIJMfEXesb724ARlhTq8RBG5jY&fields=name,place_id,permanently_closed
The only bit of information I need is if the place is permanently closed. Reading the documentation, it looks like this is a basic field and should be free (link here to the basic data sku), however when I run the query I am charged $17 / 1000 queries. Is there anyway to query this without paying for a Place Details query?

The Places API price consists of two parts: price of request you executed and the data price. The price of request is $17 / 1000. In addition you can get some data for free and some data for additional cost depending on the list of fields that you provided. There is no Google Places API for free, you always pay at least the request.
Have a look at Google Maps Platform pricing sheet for more details:
https://cloud.google.com/maps-platform/pricing/sheet/
Also official documentation states:
Data requests generate a charge in addition to the cost of the Places request. Data charges are always in tandem with the Places requests.
source: https://developers.google.com/maps/billing/understanding-cost-of-use#data-skus
I hope this clarifies your doubt.

In addition to the answer of Xomena, you may cap your request up until your free credits are consumed, upon setting up your billing account, you will be entitled to have one time $300 free credit (Usable for any Google Cloud Platform products) and a monthly recurring $200 free credit (Exclusive for Google Maps API only), so you can still use the API without being billed.
Capping API Usage:
Go to the GCP Console APIs & Services Dashboard
page.
From the projects list, select a project.
Click the name of the API you're interested in.
Click Quotas.
On the quota line you want to change, click the edit icon, then enter your preferred total quota, up to the limit specified by Google.
Based on my calculation, assuming that you are only using Place Details, you can call up to 11764 requests(w/ basic data) per month using your $200 free credit, I did not include the $300 credit in my computation as this is not recurring every month and this will be up to you on how you will spread the $300 free credit.

Related

SKU Usage Per Session Or Per Object/Point On My Map?

I wish Google can break it down explaining this.
Says, if I was a manager with no developing code experience, there is no way that I could get the answer from Google support with the information provided for everyone.
I just don't understand how SKU usage work. Is it per point on a map that need SKU? Is it per whole set of points? If I have 30 points on my road destination, does that means that I used 30 SKU?
Can someone explain this?
If you are using Google Maps Platform APIs, please know that it uses a pay-as-you-go pricing model - meaning all APIs under Google Map Platform are billed by SKU. SKU is a combination of 'Product API' and 'Service or Function you used'. Each combination has a price and cost is calculated by SKU Usage x Price per each use.
So you will be billed depending on which services you are using. You can learn more about this on this link.
If you have more specific question with your project and to open a more personalized channel, I suggest that you create a support case to reach out with the support team.

How much request is free with geocoding api?

I want to get the address from latitude/longitude using Google Geocoding API. For that, I want to know, how many no of hit can be done with a free account?
Bellow link showing the 2,500 requests per 24 hour period free.
Google Geocoding API, free?
Kindly clear me, it is still free hit exist with Google Geocoding API or not.
If no, then how many hits are free with this API?
Upon setting up your billing account, you will be entitled to have one time $300 free credit (Usable for any Google Cloud Platform products) and a monthly recurring $200 free credit (Exclusive for Google Maps API only), the Geocoding API is currently priced at 0.005 USD, with that said, you may have the following requests as follows:
300 USD / 0.005 USD = 60,000 requests
200 USD / 0.005 = 40,000 requests
If you haven't used your one time $300 free credit, then you may have 100,000 geocoding requests for the first month, then for the succeeding months, you may have 40,000 geocoding requests that will be covered by the monthly recurring $200 free credit.
You may learn more about the pricing by visiting the pricing sheet
You may also use the Pricing Calculator if you'd wish to compute for other SKUs as well, note that this also take your free credit(monthly recurring $200 only) into account.
Google has changed their billing policy a while ago you should consult Usage and billing
Pay-As-You-Go Pricing
The Geocoding API uses a pay-as-you-go pricing model.
How usage and billing work under the pay-as-you-go model
The Google Maps Platform APIs are billed by SKU.
Usage is tracked for each Product SKU, and an API may have more than one Product SKU.
Cost is calculated by: SKU Usage x Price per each use.
For each billing account, for qualifying Google Maps Platform SKUs, a $200 USD Google 1. Maps Platform credit is available each month, and automatically applied to the qualifying SKUs.
See guide to understanding billing for more information.
Pricing for the Geocoding API
Under the pay-as-you-go pricing model, requests for the Geocoding API are billed using the SKU for Geocoding.
When you create a new account and connect a credit card to it you will be given $300 credit that you can use to test your application before you bring it live.
It is expensive. It costs $5 per 1000 hits up to 100,000 hits. And onwards up to 500,000 hits, it will cost $4 per 1000 hits.
Google gives initial $200 credit but you must have to restrict your APIs. Otherwise, your free credit will be exhausted within a week.
To use Google's Geocoding service you need an account on the Google Maps Platform. The trial account as well as the Pay-as-you-go priced account which you will be forced to upgrade to after one year both feature ≥ 200 USD/month worth of service.
For both types of account a CreditCard is required.
200 USD worth of service allow for 40'000 Geocoding requests per month (see pricelist). Any additional request is billed at 0.005 USD/request.
The service for Geocoding has the SKU "Geocoding" and is part of the "Geocoding API" which in term is part of the product "Places" of the "Google Maps Platform".
The Geocoding service has a limit of 50 requests per second, but there is no (longer a) limit per day.

Is it possible to only avail Google's Geocoding Serve?

Ever since the new pricing took place, I've been confused with their documentation. I don't know where to see the details about this. (Or I'm not really looking properly, pardon me.)
So is it possible to only avail Google's Geocoding Service? Without the other services as a package.
Here is a link to the new billing documentation.
And here is the pricing page.
If I may try to simplify:
The Geocoding service you want to use now costs money to use.
The price is US $5 per 1,000 usage per month.
Google is freely giving every user 200$ worth of usage per month.
That means you can use the Geocoding approximately 40,000 times in a month and not have to pay anything.

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

Is Google map mobile SDK no longer free?

According to this link :
Google price guide
Google has changed it's prices from 11 June.
Is that mean using google map SDK for mobile devices is no longer free ?
Yes and no.
You'll need an API key and a valid billing method. That being said, the first 200$ (I assume USD) of usage is free
We’ve heard that you want simple, easy to understand pricing that
gives you access to all our core APIs. That’s one of the reasons we
merged our Standard and Premium plans to form one pay-as-you go
pricing plan for our core products. With this new plan, developers
will receive the first $200 of monthly usage for free. We estimate
that most of you will have monthly usage that will keep you within
this free tier.
From https://mapsplatform.googleblog.com/2018/05/introducing-google-maps-platform.html
After that, your credit card will be charged. To estimate your usage you can refer to this pricing table: https://cloud.google.com/maps-platform/pricing/sheet/
All the below points are taken from the official documentation.
#Marco's answer is correct on one point: you need an API key to have full access to the service.
Also, in June 2016 we announced that we would stop supporting keyless usage, meaning any request that doesn’t include an API key or Client ID. This will go into effect on June 11th, and keyless access will no longer be supported. At that time, keyless calls to the Maps JavaScript API and Street View API will return low-resolution maps watermarked with “for development purposes only.” Keyless calls to any of the following APIs will return an error: Maps Static API (including Static Street View), Directions API, Distance Matrix API, Geocoding API, Geolocation API, Places API, Roads API, and Time Zone API.
Here they are talking about the Javascript API but I could not find contradictory information about other APIs (iOS, Android) so I believe this applies to all APIs.
About billing
This page says the following:
Is a credit card or billing account required?
Yes. Even though the first $200 a month is free, we ask for your credit card or billing account to cover any amount you spend over this free credit. When you’re billed, we'll credit your account for the first $200 of monthly usage. If your estimated usage will be above $200 a month and you don’t have a credit or debit card to set up a billing account, a local Google Maps Partner may be able to help.
In other words: YES, you need a billing account and a credit card (or a Google Maps Partner).
This page is the guide for existing users and it says:
Is a credit card or billing account required?
Even though your first $200 of monthly usage is free, all Google Cloud Platform services require a credit card and billing account, to cover any amount you spend over this free credit. If you are billed, we'll credit your account for the first $200 of monthly usage. If you choose not to add a billing account, there is a risk that if your usage exceeds $200 in a given month, your Maps API implementation will be degraded or other API requests will return an error. If your estimated usage will be above $200 a month and you don't have a credit or debit card to set up a billing account, a local Google Maps Partner may be able to help.
In other words: NO, existing users don't need a billing account although it's strongly advised to have one.
Clarification is needed from Google! Hopefully this topic will get updated soon.
To add to the other answers, pricing is different for the "google map SDK for mobile devices", aka Mobile Native Dynamic/Static Maps for Android and iOS (which you mentioned in your question, and it's tagged with).
From the Google Maps pricing sheet, it seems that all use of the Mobile Native APIs is free, while the traditional (web based) Dynamic and Static maps are chargeable as others described above.
$200 MONTHLY CREDIT EQUIVALENT FREE USAGE: Unlimited loads
0—100,000 MONTHLY VOLUME RANGE (PRICE PER THOUSAND CALLS): $0.00
100,001-500,000 MONTHLY VOLUME RANGE (PRICE PER THOUSAND CALLS): $0.00
And it's possible to add usage caps to force your usage of the web-based (chargeable) APIs to stay within the free tier. This does mean that your maps will stop working if your users cause you to exceed the usage caps, but at least you won't be charged.
There is a free tier for up to $200 of usage, which most users won't pass I believe. So, small businesses won't be affected.
Read more here: https://cloud.google.com/maps-platform/user-guide/pricing-changes/
However, there's still no clarity on whether a Billing Account has to be set up with a valid Credit/Debit Card to get a new API Key. Google has a transition tool in place for those who already have the API key and are using it in their projects.
I'm a web developer and many of my clients are using GMaps on their website to show their business address. Not sure what Billing Account I'll have to use for all of them, because they're all finished projects and the client expects the maps to continue working as is. I can't possibly set the billing in my name and risk getting a huge bill some day. The current clients and the future clients have to be made aware of this new update. I concur it's like setting up a GSuite / Adwords account for your client.
OpenLayers is a good alternative for google maps sdk, if you absolutely want a map.
It is free and does not require any account. It worked for me!
You can refer to the below link: https://openlayers.org/en/latest/doc/quickstart.html