How to get a Google Places API key? - google-places-api

How do I get a Google Places API key? Must I pay or can I get a dummy for free? I want to obtain an API key for the "Find Place" request https://developers.google.com/maps/documentation/places/web-service/search-find-place

Follow the guidelines at Google: https://developers.google.com/maps/documentation/places/web-service/get-api-key
The documents are comprehensive, if not a little difficult to navigate.
From memory it's roughly along the lines of;
Create a Google account
Sign up to the Developer account (click the Get Started button in the top link)
Enter your credit card details (needed even if you are only expecting minimal use...)
Turn on the Google Places API within your account
Create an API key within your account and configure it with relevant restrictions according to your needs

Related

Google Place API, advanced place details: amenities, crowd, accessibility

I'm successfully using Google Places API to get details like name, address, phone, lat/lng, opening hours, etc. No problem with that.
However, the data I can't get a hold of is the deeper data.
For example, if you open up a McDonald's, and click on its short description, it will show things like Amenities, Crowd, Atmosphere, Accessibility.
Question is - is it possible to access this information via Places API?
Thanks
According to the documentation. That information is not returned by the API. You can link directly to that place on Google Maps to show your users that information though.
Remember that APIs like this usually don't return all of the information available to the native service so that the native service (in this case Google Places) retains a competitive advantage.

Google Genomics API

Trying to use Google Genomics, following instructions found here: https://developers.google.com/genomics/
Trying to set up OAuth Client id (Section 4: Authenticate), from the GoogleCloud console, step c tells me: "On the APIs & auth tab, select APIs and make sure Genomics API is set to ON"
... but I can't find Genomics API in the list. How do I "add" Genomics API to the list? (I have been approved for the Google Genomics Preview).
I am a bit late to the party, but anyway.
The best way to communicate with Genomics API developers is the issue tracker
To stay on topic, I just received an invitation to join genomics-api-tt group, and once I accepted the invitation, Genomics API became visible on API & Auth / APIs page in my Google Cloud project.
You should also make sure that the email address that was added to the whitelist (the one that is in this group) is the same address that is logged into the Developer's Console when you try to turn the API on.
If you accidentally asked for access on a non-google account just request access again and that new email will be added.
(And if you have more than one google account, just double check your current login)

Use Google Places API to autocomplete input in subscribe form

For a commercial website, I would like users to fill out a field with their shop name, and if the shop is found by google, fill out the subscription form (for example: phone number, address, logo, etc).
My question: is it possible to use this Api with that? I find that the terms of use are not clear.
PS : Sorry about my english :/
In short a few of the important terms of use are:
http://code.google.com/apis/maps/terms.html#section_9_1
You must not charge access to use your implementation of the Places Autocomplete API and it must be freely accessible to the public. Unless its part of a Mobile Application or you have a Google Enterprise agreement or obtained Google's written permission.
http://code.google.com/apis/maps/documentation/places/autocomplete.html#requirements
You must show a "Powered by Google" logo with any data accessed using the Places Autocomplete API if you do no show this data with a Google Map
If the Places Autocomplete API responses contains Listing provider information it must be displayed to the user.
If your implementation adheres to the terms of use, than it is possible for you to use the Places Autocomplete API for the purpose described.

How can i get list of domain users from Google Apps account without administrative access?

This is a similar question to How can i get list of Domain user's from Google Apps account?
However, I'd like to use a normal account (not an administrative account) to retrieve the user list. It seems like this should be possible as the gmail autocomplete returns domain contacts not listed in the user's contact store. I've looked at the autocomplete Ajax call, but it requires something in the beginning of the string (and no, I don't really want to loop through a-z one by one - that is just way to hacky). For example:
https://mail.google.com/mail/c/u/0/data/contactstore?ac=true&ct=true&gp=true&hl=en&id=domain&max=15&out=js&tok=beginningOfUsersName&type=4
Both versions of the Google contacts API seem to omit domain users unless you have them imported into your own contacts list. I've also looked at querying users in the "Coworkers" system group, all to no avail. I also find it interesting that "add a coworker's calendar" on Google calendar does not provide autocomplete - they use a popup instead.
I'm working on a C# project, but this is a general Google API question, so any pointers in any language would help.
Update
It looks like this is feasible now with admin/directory google api endpoints
see: https://developers.google.com/admin-sdk/directory/v1/guides/manage-users?authuser=0#retrieve_users_non_admin
Original answer
I was able to work around this issue, so I'll document the workaround, even if it doesn't involve Google. I wrote a program (in C#) to query the internal Active Directory (LDAP) store and pick up all the users from there instead. At that point I could get their email addresses and query Google with it. Not the best method, but it worked for my needs.
The C# was roughly patterned from this powershell script, although I pulled out the computers query and added in the capture of the user's email address: http://www.visualbasicscript.com/List-all-users-or-computers-in-the-default-domain-m35650.aspx
The LDAP property I included to get the proper email address for Google was 'proxyAddresses', although this will not be correct for all environments.

Google API Key for translation

what key (if any) do I require for simple text translation from program?
Note: I don't host any website.
Getting a Google Translate API Key
To use the Google API, you first need a Google Cloud account.
Go to https://cloud.google.com/translate/docs/basic/setup-basic
Click Set up a project.
Name the new project in the Enable Cloud Translation API screen. Use this dialog to name your project
They may ask you to create or connect to an existing billing account. Google gives you a $300 credit to use the Cloud Translation API over a year to try it out.
Create a new service account.
This screen will pop up with your new project name and the associated service account. Click Download Private Key. This API key (written in JSON) connects your site to the Google Cloud. To enable API, download the private key.
Upload the Google Translate API key to your site. Check with your hosting company where on your system to place this key.
When you’ve placed the Google API key on your site, tell your system where to find it. Set an environment variable. Again, check with your hosting company if you don’t know how to open a terminal.
API keys are the same for all GCP APIs. Instructions here: https://cloud.google.com/docs/authentication/api-keys
Activate the Google Translate API
Before you can use a Google API in your project, you have to activate it. Go to the side menu and select the APIs & Services option:
Now you will see a screen with statistics about the APIs that you have activated. If you created the project from scratch by following the steps above, you won’t have any data yet, as you can see:
Click on the upper button Enable APIs and services to continue with the activation process of the API. This takes us to a search box where we have to look for the API we’re interested in. In this case, we want to use the Google Translate API. Type translate in the search box and click on the result Cloud Translate API:
This brings us to a screen with the description of the Cloud Translation API. Click on the Enable button to activate the API in our project:
We already have the Google Cloud Translation API activated. We’re almost there…
Create a new API Key for Google Translate
After activating the API, let’s see how to generate a new Key API to be able to use this service. We have to go to the side menu again and select the Credentials option:
On this screen we see a button with a drop-down and the text Create credentials. Don’t click on the button! Instead, open the drop-down by clicking on the arrow to the right of the button and select the API Key option.
This creates the new Key API. You can copy it if you want, although you can access it later:
Google Cloud provides us with a new Key API to use Google Translate with our third-party applications.
How to Restrict Our API Key to Protect and Limit Its Use
To control the cost of Google Cloud by using the Google Cloud Translation API (or Google Translate, which is the same), we can do two things: restrict where you can use the API Key that we just created or limit the allowed quota to use the service itself.
In the screenshot above, if you click on the Restrict Key button you will go to the API Key restriction screen that follows:
There you can select to restrict the API Key by HTTP referrers, which means that you can only make calls to the Google Cloud Translate API using the API Key from certain domain names.
You must add the valid domain names in the text box that appears when selecting the HTTP referrers option. Sample domain name https://google.com/*.
On the other hand, go to the menu API’s & Services → Dashboard → Cloud Translation API → Quotas and there you will find a box called Characters. There you can modify the quota limits of the Google Cloud Translation API and reduce them, if necessary.
The price for Google Cloud Translation API at the time of writing this post is 20 USD per million translated characters, so make your numbers.
And that’s all! You already have your API Key ready to be used with the application you want. The process is a bit cumbersome at first, but following the steps you’ll get the API Key without problems.
An API key is required to use the Google Translate API and you can get yours from the Google APIs Console.
For further details, check the Developer's Guide.

Resources