Google Public API access Key Expiration. 1

Please Share

Google Developers I recently ran across a very intersting question on Stack OverFlow. Stack Overflow is a language-independent collaboratively edited question and answer site for programmers, which I spend a lot of time on.  The question was quite simple How long is the Google API key Valid? . The person who posted this is a new user to stack, but this question was simple and to the point.

Where do I get a Public API key?

You get a Public API key in the same place you get a OAuth2 key and Service account Credentials, The Google Developer console. In order to access most of the Google APIs you need to create a project on the Google Developer console, but why do we need to create a project on the Google Developer Console?

What is the Google Developer Console?

The Google Developer console is where we as developers register our intention to use the Google APIs. There are several reasons why we need to do this before attempting to access the Google APIs the first being, you don’t have a choice in most cases you cant access the API until you have registered your application with Google.


Google needs to know who is accessing there APIs. There are limits to how much information we can request from the Google APIs (Quota). Each of the Google APIs has a different quota limit associated with it.

Analytics quota The Google Analytics API gives you 50,000 requests per day, after this you have to request an extension. Google keeps track of the quota based upon the project you created in Google Developer console. Note: In most cases you can extend the quota, not all of the APIs charge you for extending the quota but some do please check.



Abuse detection

Abuse detection, say someone wanted to really annoy Google they could do a DoS attack using the key to access the API. Google will know who is doing this by the project and be able to shut this person down instantly, there by protecting there servers from damage.

WhiteListed access

Whitelisted access, some of the Google APIs are on beta access you need to apply for permission to use them permission to use them is granted based upon the project id in Google Developer console

What is a Public API key?

The Public API key gives you access to Public data on Googles Servers. Public data is data that is not restricted by user access. When I post a message on Google Plus and set it to Public this is public data. When I post a video on YouTube and set it public this is also public data, anyone can access it with out being Authenticated. My emails, and events in my personal Google calendar are private data you would need my permission to access it.

In the Google Developer console APIs & auths -> credentials at the very bottom you will see this.

That is a public API key and can be used to access Public data.


Expiration of public API Key

Now back to the question from stack OverFlow. The author of the question is correct, I have not been able to find anyplace where it states how long these public API keys are good for. The fact of the matter is Public API keys don’t expire. They are valid for as long as you don’t delete them.

So feel free to request as much public data for as long as you want, with in the limitations of your quota of course. Welcome to the would of Developing with Google!

Please Share

Linda Lawton

About Linda Lawton

My name is Linda Lawton I have more than 20 years experience working as a developer and a database expert. I have been working with several of the Google APIs, since 2012. I helping others in the On-Line community to develop with the Google APIs, by creating my own blog This and my presence on a number of On-Line developer forums lead me to be noticed by the Google Analytics API development team. I was nominated for and recently became one of the first Google Developer Experts for Google Analytics.

Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “Google Public API access Key Expiration.

  • Muhammad Rizwan

    Hi Linda Lawton,

    How are you?
    Your blog is excellent, it has very useful information about Google APIs. I am a freelancer and currently writing a research report on API Product Governance Framework. I am looking for information more specifically on how to manage API calls method, security, their access and procedure for managing APIs by different managers in the same organization. I have already got some useful information, can you please help me and guide me on the above mentioned topics? Looking forward to hear from you.