Tag: Google APIs

Lean Code and API’s

API Resources

GeocodeResponse-OVER_QUERY_LIMIT

Using an Application Program Interface or API is not a new concept, is relatively simple, and easy to do.  However, developing applications using resources outside of your local controlled environment can present new challenges and opportunities.

In this instance, I was testing one of Google’s API resources and received an “OVER_QUERY_LIMIT” error message.  Although it’s not too often that this happens, apparently it can on occasion.

You have exceeded your daily request for this API.  We recommend registering for a key at the Google Developers Console:  https://console.developers.google.com/apis/credentials?project=

You typically need an API key before you can use an API such as the Google Maps Geocoding API.  For those of you thinking or wondering about security, you can place restrictions on the use of your API key.

Registering an API Key

APIs Credentials

If you already have a Google account, go to the “https://console.developers.google.com/apis/credentials?project=” link as shown in the error message above, sign in to your account and accept the terms and conditions.  You can then begin the process of creating your project and credentials.  Google will then generate an API key for your project to use in your application.

As of this writing, there are at least 184 API’s available where some of the more popular API’s include Google Drive API, Gmail API, Google Maps Android API, Google Cloud Translation API, and Google Maps Geocoding API.

Once you’ve enabled the API’s required for your project and set up your API Key, you can begin using and monitoring the services requested from your GoogleAPIs dashboard. The “Web Services > Geocoding API” page provides a simple example of getting and using the API Key in your application.

API’s can greatly simplify your application development and enables you to deploy features that would otherwise consume a lot of time and effort to implement.  The guides and documents in the API Library describe the scope of the API and provide sufficient information to begin using them to your advantage.

API Access Limits

Be aware that some API’s may have limits to the number of free “access requests” received and/or processed in a given day or over a given time period.  Users may encounter problems if requests from your site exceed this limit.  Increased access requests may be available if you are using a “fee-based” service or premium account.

For example, as of this writing, the Google Maps Geocoding API imposes the following Standard Usage Limits:  2,500 free requests per day and 50 requests per second.  A “pay-as-you-go” billing option or Premium Plan is also available with a maximum of 100,000 daily requests.

API Services

API services or resources may offer significant advantages for your application and are certainly worth an investment of your time to see what is available.  If your programming language, such as JavaScript or Python, provides a means of working with “http” requests, API’s are definitely worthy of your consideration.

API’s enable working with external resources both as a data source and for manipulating data.  The ability to programmatically work with data reduces the possibility of data entry errors and other human fallibilities.

Remember to use API key restrictions to control and prevent unauthorized access requests!  Making an attempt to use an API key from a site other than the one authorized in the restriction settings will return a “REQUEST_DENIED” status as pictured below:

API-Restricted-Access

Until Next Time – STAY lean!

Versalytics

Advertisements