Showing posts with label apis. Show all posts
Showing posts with label apis. Show all posts

Wednesday, July 24, 2013

Google Calendar API Push notifications: don’t call us, we’ll call you

Author PhotoBy Piotr Stanczyk, Tech Lead, Google Calendar APIs

If you've developed an application integrated with Google Calendar, you know that you need to periodically poll for event changes to ensure your application stays in sync. Today we’re launching Push notifications for Calendar API. This change makes periodic polling unnecessary. Push notifications significantly reduce the amount of time that the app is out of sync with the server. For mobile devices, this can lead to big savings in data usage and power consumption.

The only thing an app needs to do to get the new push functionality is to subscribe to a calendar of interest. When a calendar changes, we’ll notify your app and the app does an API call to get the update. If you use one of the Google API client libraries it’s very easy to utilize push notifications.

As an example, let’s assume you have a calendar my_calendar@my-host.com. Your app is hosted on a server with my-host.com domain and push notifications should be delivered to an HTTPS web-hook https://my-host.com/notification:
Map<String, String> params = new HashMap<String, String>();
params.put("server", "my-host.com");
Channel request = new Channel()
.setId("unique_subscription_ID")
.setType("web_hook")
.setAddress(String.format("https://my-host.com/notification"))
.setParams(params);
service.events().watch("my_calendar@my-host.com", request).execute();
From now on, every time my_calendar@my-host.com changes, Google Calendar server will trigger a web-hook callback at https://my-host.com/notification. All the app needs to do is request an incremental sync as it did before:
changes = service.events().list("my_calendar@my-host.com")
.setUpdatedMin(lastSynchonizationTime).execute();
If you are interested in using this new feature, please refer to Google API v3 documentation for Push.


Piotr Stanczyk is a Tech Lead for Google Calendar APIs. His current focus is to provide the next generation Calendar API which makes lives of developers easier.

Posted by Scott Knaster, Editor

Tuesday, July 9, 2013

40 new data points in Google Analytics API

By Srinivasan Kannan, Google Analytics API Team

Cross-posted from the Google Analytics Blog

Over the past year we’ve added many new features to Google Analytics. Today we are releasing all of this data in the Core Reporting API.


Custom Dimensions and Metrics

We're most excited about the ability to query for custom dimensions and metrics using the API.

Developers can use custom dimensions to send unique IDs into Google Analytics, and then use the core reporting API to retrieve these IDs along with other Google Analytics data.

For example, your content management system can pass a content ID as a custom dimension using the Google Analytics tracking code. Developers can then use the API to get a list of the most popular content by ID and display the list of most popular content on their website.

Mobile Dimensions and Metrics

We've added more mobile dimensions and metrics, including those found in the Mobile App Analytics reports:

  • ga:appId
  • ga:appVersion
  • ga:appName
  • ga:appInstallerId
  • ga:landingScreenName
  • ga:screenDepth
  • ga:screenName
  • ga:exitScreenName
  • ga:timeOnScreen
  • ga:avgScreenviewDuration
  • ga:deviceCategory
  • ga:isTablet
  • ga:mobileDeviceMarketingName
  • ga:exceptionDescription
  • ga:exceptionsPerScreenview
  • ga:fatalExceptionsPerScreenview

Some examples of questions this new data can answer are:

Local Currency Metrics

If you are sending Google Analytics multiple currencies, you now have the ability to access the local currency of the transactions with this new data:

  • ga:currencyCode
  • ga:localItemRevenue
  • ga:localTransactionRevenue
  • ga:localTransactionShipping
  • ga:localTransactionTax

Time Dimensions

We added new time-based dimensions to simplify working with reporting data:

  • ga:dayOfWeekName
  • ga:dateHour
  • ga:isoWeek
  • ga:yearMonth
  • ga:yearWeek

Sample queries:

Traffic Source Dimensions

Finally, we've added two new traffic source dimensions, including one to return the full URL of the referral.

  • ga:fullReferrer
  • ga:sourceMedium

Sample query: the top 10 referrers based on visits (using full referrer).

For a complete list of the new data, take a look at the Core Reporting API changelog.
For all the data definitions, check the Core Reporting API Dimensions and Metrics explorer.
As always, you can check out this new data directly within our Query Explorer tool.



Writen by Srinivasan Kannan, Google Analytics API Team

Posted by Scott Knaster, Editor

Wednesday, June 5, 2013

Making Google’s CalDAV and CardDAV APIs available for everyone

Author PhotoBy Piotr Stanczyk, Tech Lead

In March we announced that CalDAV, an open standard for accessing calendar data across the web, would become a partner-only API because it appeared that almost all the API usage was driven by a few large developers. Since that announcement, we received many requests for access to CalDAV, giving us a better understanding of developers’ use cases and causing us to revisit that decision. In response to those requests, we are keeping the CalDAV API public. And in the spirit of openness, today we’re also making CardDAV – an open standard for accessing contact information across the web – available to everyone for the first time.

Both of these APIs are getting other updates as well:
In addition, the CalDAV API now has a new endpoint:
https://apidata.googleusercontent.com/caldav/v2


Piotr Stanczyk is the Tech Lead of the Google Calendar APIs group. His current focus is to provide next generation Calendar APIs which make developers’ lives easier. He also participates in CalConnect consortium.

Posted by Scott Knaster, Editor


Saturday, May 11, 2013

Find the hidden patterns with YouTube’s new Analytics API

Author PhotoBy Ted Hamilton, YouTube Analytics

Cross-posted from the YouTube API Blog

Trying to figure out how YouTube’s one billion monthly users are interacting with your videos? Try the new YouTube Analytics API to get custom reports of the YouTube statistics you care about in a direct JSON or CSV response, perfect for dashboards and ad hoc reports.

The new API includes all the standard view and engagement metrics you would expect, including views, shares, and subscriber numbers. Compared to the previous Insight Data API, you also get:
  • Watch metrics: Track estimated minutes watched across channel, content owner, or video, and dive into the video details with average view time and average view percentage.
  • Earning performance metrics: Track estimated earnings (net revenue) from select advertising sources across your content.
  • Ad performance metrics: Break down video performance with monetized playbacks, ad impressions, gross revenue, and cost per impression reports.
  • Annotation metrics: Optimize overlays/annotations with click through and close rate metrics.
Client libraries and code samples
You’ll find client libraries for the languages you use most, with nine different languages available today. You can also make HTTP RESTful requests directly, and with our API Explorer, you can try out sample reports before writing any code.

Don’t write your code from scratch! Get started with code examples in Java, JavaScript, Python, and Ruby. If you want a step-by-step walkthrough of building a complete web application, have a look at our JavaScript exercise.

App examples
Check out some apps that are already using the API:

app screen shot

  • Next Big Sound provides analytics and insights for the music industry by tracking billions of social signals including YouTube. This enables record labels, artists, and band managers to make better decisions on everything from promotion strategies to tour locations.
  • vidIQ is an audience development suite that works with global brands to organically grow their views and subscribers. Their features include cross-platform social analytics, advanced comment management, SEO tools, social syndication and influencer identification.
app screen shot
  • Wizdeo’s WizTracker provides in-depth analysis of YouTube channels to help with cross promotion and video comparisons during their initial launch. Users get access to detailed analytics about views, subscriber engagement, traffic sources and demographics.
  • Vidyard is a video marketing platform. With powerful analytics, built-in marketing tools, and integration with key marketing automation platforms, Vidyard helps marketers drive results with video content.
app screen shot
Fullscreen is building a global network of YouTube channels with content creators and brands. Fullscreen provides a full suite of end-to-end YouTube tools and uses the new API for internal, business-intelligence tools.

Learn more
In addition to the documentation, check out our Analytics API playlist to make getting started even easier.



If your goal is to export all statistics for a large number of channels on a recurring basis for your data warehouse, look forward to using the upcoming scheduled reports feature of the API, expected to launch later this year.

To get more info on the YouTube APIs, subscribe to our YouTube for Developers channel and YouTubeDev on Google+.


Ted Hamilton is the Product Manager for YouTube Analytics based out of Zurich, Switzerland. Prior to Google, Ted was a consultant at Bain and Company in London. Ted has a Computer Science degree from Northwestern University and holds an MBA from MIT Sloan.

Posted by Scott Knaster, Editor

Friday, May 10, 2013

Clarifying the deprecation policy for Google APIs and services

Author Photo
By Adam Feldman, APIs Product Manager

We know that deprecation policies can be complex. But it shouldn’t be hard for you to determine which features of our APIs and services are covered by a deprecation policy and which ones aren’t. To date, we’ve often used the label “Experimental” to indicate that certain new versions, features, or functionality don’t have the deprecation policy. But we know you don’t want to hunt through documentation looking for what is “Experimental” and what isn’t.

So starting today, for each API or service that has the deprecation policy, we are creating an explicit list of what is covered by that policy. For instance, here’s what this list will look like for the Google Maps APIs:

We are not adding or subtracting anything, but only changing how we display this information to make it easier to locate and understand. This change will be fully rolled out in the coming weeks. Please refer to each API or service’s terms of service for more information. We hope this will make your life easier so you get back to your code sooner!


Adam Feldman is a Product Manager, focusing on all of Google's APIs and making sure Google provides the best possible platform to developers.

Posted by Scott Knaster, Editor

Friday, May 3, 2013

Google API infrastructure outage incident report

By the Google API Infrastructure Team


As we described in a previous post, earlier this week we experienced an outage in our API infrastructure. Today we’re providing an incident report that details the nature of the outage and our response.

The following is the incident report for the Google API infrastructure outage that occurred on April 30, 2013. We understand this service issue has impacted our valued developers and users, and we apologize to everyone who was affected.

Issue Summary

From 6:26 PM to 7:58 PM PT, requests to most Google APIs resulted in 500 error response messages. Google applications that rely on these APIs also returned errors or had reduced functionality. At its peak, the issue affected 100% of traffic to this API infrastructure. Users could continue to access certain APIs that run on separate infrastructures. The root cause of this outage was an invalid configuration change that exposed a bug in a widely used internal library.

Timeline (all times Pacific Time)
  • 6:19 PM: Configuration push begins
  • 6:26 PM: Outage begins
  • 6:26 PM: Pagers alerted teams
  • 6:54 PM: Failed configuration change rollback
  • 7:15 PM: Successful configuration change rollback
  • 7:19 PM: Server restarts begin
  • 7:58 PM: 100% of traffic back online
Root Cause

At 6:19 PM PT, a configuration change was inadvertently released to our production environment without first being released to the testing enviroment. The change specified an invalid address for the authentication servers in production. This exposed a bug in the authentication libraries which caused them to block permanently while attempting to resolve the invalid address to physical services. In addition, the internal monitoring systems permanently blocked on this call to the authentication library. The combination of the bug and configuration error quickly caused all of the serving threads to be consumed. Traffic was permanently queued waiting for a serving thread to become available. The servers began repeatedly hanging and restarting as they attempted to recover and at 6:26 PM PT, the service outage began.

Resolution and recovery

At 6:26 PM PT, the monitoring systems alerted our engineers who investigated and quickly escalated the issue. By 6:40 PM, the incident response team identified that the monitoring system was exacerbating the problem caused by this bug.

At 6:54 PM, we attempted to rollback the problematic configuration change. This rollback failed due to complexity in the configuration system which caused our security checks to reject the rollback. These problems were addressed and we successfully rolled back at 7:15 PM.

Some jobs started to slowly recover, and we determined that the overall recovery would be faster by a restart of all of the API infrastructure servers globally. To help with the recovery, we turned off some of our monitoring systems which were triggering the bug. As a result, we decided to restart servers gradually (at 7:19 PM), to avoid possible cascading failures from a wide scale restart. By 7:49 PM, 25% of traffic was restored and 100% of traffic was routed to the API infrastructure at 7:58 PM.

Corrective and Preventative Measures

In the last two days, we’ve conducted an internal review and analysis of the outage. The following are actions we are taking to address the underlying causes of the issue and to help prevent recurrence and improve response times:
  • Disable the current configuration release mechanism until safer measures are implemented. (Completed.)
  • Change rollback process to be quicker and more robust.
  • Fix the underlying authentication libraries and monitoring to correctly timeout/interrupt on errors.
  • Programmatically enforce staged rollouts of all configuration changes.
  • Improve process for auditing all high-risk configuration options.
  • Add a faster rollback mechanism and improve the traffic ramp-up process, so any future problems of this type can be corrected quickly.
  • Develop better mechanism for quickly delivering status notifications during incidents.
Google is committed to continually and quickly improving our technology and operational processes to prevent outages. We appreciate your patience and again apologize for the impact to you, your users, and your organization. We thank you for your business and continued support.

Sincerely,

The Google API Infrastructure Team


Posted by Scott Knaster, Editor

Wednesday, May 1, 2013

Google API infrastructure outage yesterday

Author PhotoBy Louis Ryan, Software Engineer

We know that developers around the world depend on our APIs for their apps, sites and businesses every day. Unfortunately, we experienced an outage of the Google API serving infrastructure yesterday, April 30. This outage impacted most Google APIs, resulting in requests failing with a 500 error code. Additionally, users may have experienced missing features or capabilities from some Google services that rely on these APIs.

At 6:26 pm Pacific Time, we pushed a config change that inadvertently caused a widespread outage of our API infrastructure.  Our normal rollback procedure failed, delaying the rollback until 7:22 pm, at which time APIs started to recover. The outage was completely resolved by 8:00 pm.

We are making several changes to help ensure this issue won’t happen again. We’ve identified some key improvements to our release and rollback process that we are implementing immediately. Reliability is a top priority at Google, and we are continuously making improvements to our systems. We apologize to everyone who was affected.


Louis Ryan is an engineer on the API platforms team in Mountain View. Louis is passionate about making APIs faster, more consistent, and reliable.

Posted by Scott Knaster, Editor

Tuesday, March 19, 2013

Build collaborative apps with Google Drive Realtime API

Author PhotoBy Brian Cairns, Software Engineer

Google Drive lets users create Docs, Sheets, and Slides, collaborate on them in real time, and have their changes saved automatically. With the new Google Drive Realtime API, you can now easily add some of the same real-time collaboration that powers Google Drive to your own apps. This new API handles network communication, storage, presence, conflict resolution, and other collaborative details so you can focus on building great apps.

Developing for the Drive Realtime API is almost as simple as working with local objects. The API provides collaborative versions of familiar data objects such as maps, lists, strings, and JSON values and automatically synchronizes and stores modifications to these objects. Your application reads from and writes to these objects like any other local object. Change event handlers can be added to collaborative objects so that your app can react to changes from other collaborators.

Because the Drive Realtime API is based on operational transformation (OT), local changes are reflected instantly, even on high-latency networks. The Drive Realtime API automatically transforms changes to the data model so that every collaborator stays in sync.

If basic collections aren't enough for your application, the Drive Realtime API supports custom objects and references, including trees and arbitrary graph structures. As with other collaborative objects, the Drive Realtime API automatically synchronizes these objects with other collaborators and stores them in Drive.

Because presence is important in collaborative applications, the Drive Realtime API also keeps track of who is connected to your application and provides your app with events for when collaborators join, leave, or make changes.

UI showing 3 collaborators
Widget using the Drive Realtime API and showing the collaborators on a document

Neutron Drive, Gantter and draw.io have enabled realtime collaboration in their apps using the Google Drive Realtime API. Check out these apps to see the Drive Realtime API in action.


Collaborative code editing with Neutron Drive

Neutron Drive is an online editor for text and source code files stored in Google Drive. You can now collaboratively edit any text or source code files stored in Drive and get a realtime collaboration experience—shared typing, a view of active collaborators, cursor positioning, and selected text. This all comes in addition to the syntax highlighting and other advanced features offered by Neutron Drive. To learn more, watch the video:




Collaborative project scheduling with Gantter

Gantter is a free online project scheduling tool and Gantt diagram editor. It now allows you to collaboratively—and in real time— work on your project schedules. It even features an embedded chat powered by the Drive Realtime API. Watch the video below to see Gantter’s new realtime collaboration features in action.




Collaborative diagraming with draw.io

draw.io is a diagraming application that enables you to draw a wide variety of diagrams such as flowcharts, UML diagrams and even electronic circuits. You can now see updates from other collaborators instantaneously, with colored visual cues indicating who has changed the diagram and where that change occurred. Try the new draw.io collaborative beta at rt.draw.io and watch the video below.




Learn more about the Drive Realtime API

We built a collaborative colored cube puzzle so you can have some fun while trying out the Drive Realtime API and a Drive Realtime API Playground to take you through the API step-by-step. Both apps are open source so check out our Github repos.

Have a look at the Google Drive Realtime API technical documentation and start making your app realtime-enabled!


Brian Cairns joined the Google Drive team in 2011 and lives in Boulder, Colorado. He is the lead software engineer for the Drive Realtime API.

Posted by Scott Knaster, Editor

Friday, December 21, 2012

No WebView required, with native YouTube Player API for Android

Author Photo
By Scott Knaster, Google Developers Blog Editor

This post is abridged and cross-posted from the YouTube API Blog.


Adding a high-quality video experience to your Android application just got a whole lot easier. Starting today, you can embed and play YouTube videos in your app using the new YouTube Android Player API.

The API, which was pre-announced at Google I/O 2012, offers these benefits:
We are launching the API as experimental, although we do not expect major interface changes going forward.

The only limit now is your imagination (and ToS)

These instructions explain how to include the API client library in your Android application. The library is supported on Android devices running version 4.2.16 or newer of the Android YouTube app. By including the library in your project, you can create rich video playback experiences through the ability to control and customize the video player. Flipboard, shown below, is a good example. See the full post for more cool app examples.


Flipboard
Flipboard

Learn more

If you would like to learn more about the YouTube Android Player API, read the full post on The YouTube API Blog. The post features several companies already using the API and contains useful links to source code examples and documentation. Alternatively, get started by watching some of the videos from our YouTube Android Player API playlist.




Scott Knaster is the Editor of Google Developers Blog. His programming books have been translated into several languages, including Japanese and Pascal.

Wednesday, December 19, 2012

Putting Zürich before Århus

Author Photo
By Mark Davis, International Software Architect

Until now, it has been very difficult for web application designers to do something as simple as sort names correctly according to the user's language. And it matters: English readers wouldn’t expect Ã…rhus to sort below Zürich, but Danish speakers would.

Because linguistic sorting requires a sophisticated algorithm and lots of data, it was impractical to do this natively in JavaScript. Until now, the only full solution for sorting on the client side was to generate on a server a sortKey for every string that needed to be sorted, and send the sortkeys — base64-encoded — down to the client along with the strings. Pretty ugly! And what’s doubly frustrating is that the underlying operating systems have all been able to handle this, whether through International Components for Unicode (ICU) or Windows APIs.

The new internationalization specification for ECMAScript (the “official” name for JavaScript) changes this picture. It is already in the production version of Chrome, and is on track for other major browsers.

Linguistic sorting is not the only benefit—not only will users be able to see names sorted correctly, but also correct numeric values (“1,234.56” in English, but “1.234,56” in German), dates (“March 10, 2012” vs “10. März 2012”), and so on. While the results might not be precisely the same in every browser, they should be appropriate to the language, and are returned using a uniform API.

On any enabled browser — in its supported languages — web application developers can:
  • compare strings correctly: choosing whether or not to ignore accents, case differences, etc.
  • format numbers correctly: choosing decimal places, currencies, whether to use thousands-separator, etc.
  • format dates and times correctly: choosing decimal places, numeric vs named months, etc.
  • match locales: comparing the user’s desired locales (say Arabic and French) against the supported locales (say French, German, and English), to get the best match.
The API also allows for linguistic support in offline web applications, which wasn’t practical before. It builds on the industry standards BCP47 (for identifying languages and locales) and LDML (part of the Unicode Common Locale Data Repository (CLDR) project). For the gory details of the spec, see ECMA-402: ECMAScript Internationalization API Specification (just approved by the Ecma General Assembly).


Mark Davis is president and cofounder of the Unicode consortium, and founder of ICU and CLDR. Mark is fond of food, film, travel, and RPGs. Mark lived for 4 years in Switzerland, and is moving back in February.

Posted by Scott Knaster, Editor

Tuesday, December 18, 2012

The simpler, yet more powerful new YouTube Data API

Pepijn
Vlad
Raul
By Raul Furnică, Tech Lead; Vladimir Vuskovic, Product Manager; and Pepijn Crouzen, Software Engineer, YouTube API Team

This post is abridged and cross-posted from the YouTube API Blog.

Since its initial launch in 2007, the YouTube Data API has become one of Google’s most popular APIs by request volume, thanks to the awesome apps from developers like you. To help you make better integrated video experiences, you can now use the YouTube API version 3.0. The new API is easy to use thanks to rich client library support, improved tooling, reference documentation and integration with Google’s common API infrastructure. Version 3.0 only returns what you ask for and uses JSON rather than XML encoding for greater efficiency. The API introduces new core functionality including Freebase integration via topics, and universal search. If you develop social media management apps, you’ll love channel bulletin post and full subscriber list management, also new in this release. Version 3.0 of the API constitutes the API's biggest overhaul to date and we’re eager for you to try it today!

New functionality: Topics, universal search, and audience engagement support

Have you ever tried to search for YouTube videos only to find out that keyword search can produce ambiguous results? With the new Topics API, thanks to the power of Freebase, you can find exactly what you’re looking for by specifying Freebase topic IDs rather than search keywords.

For example, if you’re reading this post from outside of the US and you would like to search for content related to football, /m/02vx4 is probably the topic ID you're after. The API's universal search feature lets you retrieve channels, playlists and videos matching the topic with just one request like this one. Find out more in our Topics API Guide.

Version 3.0 introduces better tools to engage and interact with your YouTube audience. Social media management apps can now help content creators communicate with their channel subscribers using bulletin posts.

Learn more

If you would like to learn more about the YouTube API version 3.0, read the full post on The YouTube API Blog. The post covers efficiency improvements, features several companies already using version 3.0 and contains useful links to source code examples and documentation. Alternatively, feel free to get started by watching some of the videos from our YouTube API version 3 playlist.




Raul Furnică is the YouTube API Tech Lead, based in Zürich. He is a believer that API interfaces should be optimized for ease of use, not server implementation.

Vladimir Vuskovic is a Product Manager at Google, and manages YouTube APIs and uploads. He got his Ph.D. from the robotics institute at ETH Zurich.

Pepijn Crouzen is a Software Engineer on the YouTube API Team and he is based in Paris.


Posted by Scott Knaster, Editor

Wednesday, October 3, 2012

More than a Map: a new site to explore the full power of the Google Maps API

Author Photo
By Ken Hoetmer, Product Manager, Google Maps JavaScript APIs

We’re constantly working to build the most comprehensive, accurate and usable maps in the world for our users--no matter where or how they access Google Maps. While millions of people come directly to maps.google.com to search for a nearby business or get directions, many people around the globe experience Google Maps on their favorite website or application thanks to the Google Maps API (and some very talented developers). In fact, today 800,000 active websites and apps are using the Google Maps API to create interesting and useful experiences for you.

MoreThanAMap.com
To demonstrate the capabilities and features of the Google Maps API, today we’re launching a new website called morethanamap.com. This site showcases the unique features of the Google Maps API and how developers are using it.


Visit morethanamap.com to learn more!

Through morethanamap.com you’ll learn how developers can embed popular Google Maps features like Street View, public transit directions, location data, and advanced data visualization capabilities into their website or app. The interactive demos on morethanamap.com show how these features are ready to be added to any website or app.


Developers can use the Google Maps API to embed Street View imagery into their sites

Even if you’re not a developer, the animated London Heathrow flight map or global population heat map are a fun way to visualize data and explore the power of Google Maps.

Google Maps Developers Stories from Around the World
Morethanamap.com also features stories from our community of developers who are using the Google Maps API to start businesses, help improve their communities or save the environment. Starting next week we’ll showcase these stories weekly on the Geo Developers Blog. And follow us on Google+ to learn more.


With just a backpack and a camera Google Maps team member Carlos Cuesta went on a global tour to video blog six distinct developers who are creating thriving applications with the Google Maps API.

Start exploring what’s possible with the Google Maps API today at: morethanamap.com.


Ken Hoetmer is Product Manager of the Google Maps JavaScript APIs, based in Sydney, Australia. A long time Maps API developer, he claims to have been the first external user of JavaScript Maps API v3.

Posted by Scott Knaster, Editor

Thursday, September 20, 2012

Build apps for elections with the Google Civic Information API

Author Photo
By Chetan Sabnis, Google Politics & Elections Team

Cross-posted from the Google Politics & Elections Blog

Google’s mission is to organize the world’s information and make it universally accessible and useful. To make it easier for you to build apps with voting information on the web, we are releasing our new Google Civic Information API. The API enables you to look up comprehensive voting information for an individual U.S. address, including polling place, early vote sites, contests, and local election official contact information. By releasing this API, we hope to unleash the creativity of the Internet and help you build innovative products that push civic information to your communities in interesting ways.

As you know, this type of information can change frequently as we get closer to Election Day, and we will make every effort to ensure we're returning timely and accurate data. We have also included contact information for local election officials in the API so voters can find the most accurate information.

While this API only includes voting information for elections in the U.S., we plan to expand to other countries and include other types of civic information. Please join the Google Civic Information API Forum for updates on the data available and check out the Google Politics & Elections page to find more information about the work we are doing around the election and our international elections programs.


You can get started here through the Google APIs Explorer. The API is available now, but please note that full information isn't yet available for the November 6th General Election. We expect to be able to provide full live data around the middle of October, as it becomes available. For now, we recommend building your applications using the test data we provide. We'll be using the API to power our own election tools over the coming weeks, including an embeddable app anyone can use on their site, and we're looking forward to seeing the applications you come up with!

The Civic Information API replaces our previous Google Election Center API, which will be turned down after January 1, 2013.

For questions, comments, and to showcase your apps using the API, we encourage you to use the Google Civic Information API Forum.


Chetan Sabnis is a software engineer on the Google Politics & Elections team. In his spare time, Chetan enjoys solving logic puzzles and crosswords.

Posted by Scott Knaster, Editor

Tuesday, September 18, 2012

Get social, mobile, and 40+ new data points with the Google Analytics API

Nick
Pete
By Pete Frisella and Nick Mihailovski, Google Analytics API Team

Google Analytics Core Reporting APIs enable a powerful and flexible way to analyze, report on, and ultimately optimize such things as web and mobile experiences, conversions, and sales.

Today we’re adding over 40 new metrics and dimensions that can be queried through the Core Reporting API. This enables developers to create reports that are similar to what is available in the Google Analytics web interface for important areas such as social and mobile. See a full list of additions on the Core Reporting API changelog.


Here’s a rundown of what’s new and a few helpful questions the data can answer.

Social Data
Now you can get data for both on-site interactions with social buttons as well as off-site social data from social data hub partner networks.

Mobile Devices
For mobile visits to your site, get all the good stuff like like brand, model, and input type.

Geo
We added a new dimension to indicate the Designated Market Area (DMA) where traffic came from.

Page Path Rollups
Create your own drill down reports with these new dimensions that allow you to roll-up metrics to hierarchical levels of your property.

App & Exception Tracking
If you’re using the Google Analytics SDK for iOS/Android v2 beta, you can now retrieve App View and Exception metrics.

User Timings
New ways to report on all things related to user timing data.


Related Resources:


Pete Frisella is a Developer Advocate for Google Analytics. He likes to travel and hit the golf course when he can.

Nick Mihailovski is a Senior Developer Programs Engineer working on the Google Analytics API. In his spare time he likes to travel around the world.

Posted by Scott Knaster, Editor

Saturday, September 15, 2012

Retiring the Google Documents List API v3

Author PhotoBy Ali Afshar, Tech Lead, Google Drive Developer Relations

Cross-posted from the Google Apps Developer Blog

With the arrival of the new Google Drive API v2, we are deprecating the Google Documents List API v3. We are confident that the Google Drive API covers all the functionality of the Documents List API, in addition to adding many improvements, including Drive UI Integration, a finer grained security model, and a better client library experience.

What does this mean for your app?

The Documents List API v3 will remain in action for more than a year, as per our deprecation policy, so there’s no rush, but we encourage you to migrate your code to the new platform. Documentation is available with samples in multiple languages and a migration guide outlining some of the major transition points.

If you have any questions or issues, please ask them on StackOverflow.com, where our team is waiting to hear from you.


Ali Afshar is an eternal open source advocate. He contributes to a number of open source applications, and is the author of the PIDA Python IDE. Once an intensive care physician, he has a special interest in all aspects of technology for healthcare.

Posted by Scott Knaster, Editor

Thursday, September 13, 2012

Python Client Library for Google APIs is out of Beta

Antonio
Joe

By Joe Gregorio and Antonio Fuentes, Google Developer Team

We have awesome news for Python developers. The Python Client Library for Google APIs is no longer in Beta! The Python Client Library has been augmented with many great features since its Beta launch. It now supports OAuth 2.0 service accounts, upload of media resources, batching of requests, asynchronous requests, resumable media upload, feed paging and many other features.

We encourage you to check out the new documentation for the client library, which not only has brand new content, but also has a slick new look and is now hosted on developers.google.com.

If you are building a Python application that uses Google APIs, we strongly recommend you use this client library. First, the library makes it simple to call any RESTful Google API and grab the data returned by the call. Also, the client library handles the OAuth 2.0 authentication protocol and all errors for you without the need to write any additional code.

Making a call to a RESTful API using the Google APIs Client Library for Python is simple. You start by constructing an http object to sign all requests with OAuth 2.0 credentials:

http = httplib2.Http()
http = credentials.authorize(http)


You then create a service object that knows how to talk to a Google API. In this example, we use the Google+ API:

service = build("plus", "v1", http=http)

You then access a collection of resources in the API by simply calling its name. The collection object that is returned has all the methods that a collection understands. Here we execute a GET request on the people collection passing the userID parameter:

person = service.people().get(userId='me').execute()
print "Your name is: %s" % person['displayName']


To get started, check out the documentation for the client library, which contains instructions for how to download and install it. As always, your feedback is welcome!


Joe Gregorio is a Software Engineer. In the past five years at Google he’s worked on APIs, Google App Engine, Google Wave, and now has come full circle and is back working on APIs.

Antonio Fuentes is a Product Manager focusing on developer-facing technologies. He has experience launching products in the cloud computing, infrastructure, and virtualization spaces.

Posted by Scott Knaster, Editor

Thursday, August 9, 2012

Access Google APIs with Dart

Author PhotoBy Sam McCall, Software Engineer

Ever since we launched Dart, the structured web programming language, we've heard developers asking for a way to use Dart to connect to Google's most popular APIs and services. Thanks to Google's 20% time policy, I’m working on an open source library that helps Dart developers connect to Google APIs such as Google+, YouTube, URL Shortener, and many more.

My favorite sample showing you how to build web apps with Dart and Google APIs is roulette. This little app will shorten your URL, or if you're lucky, rickroll you.

This library is currently alpha and under active development. Please report all bugs in the issue tracker and ask questions in the discussion forum. Thanks for the feedback, and have fun!


Sam McCall is an engineer in Google’s Corporate Engineering Team in Munich, and is a part-time Dart tinkerer.

Posted by Scott Knaster, Editor

Tuesday, July 31, 2012

Introducing the Multi-Channel Funnels Reporting API

Author PhotoBy John Huang, Software Engineer

Cross-posted from the Google Analytics Blog

Measuring how marketing efforts influence conversions can be difficult, especially when your customers interact with multiple marketing channels over time before converting. Last fall, we launched Multi-Channel Funnels in Google Analytics, a new set of reports that help shed light on the full path users follow to conversion, rather than just the last click. One request we’ve had since the beginning was to make this data available via an API to allow developers to extend and automate use cases with the data. So today we’re releasing the new Google Analytics Multi-Channel Funnels Reporting API.

The API allows you to query for metrics like Assisted Conversions, First Interactions Conversions, and Last Interaction conversions, as well as Top Paths, Path Length and Time Lag, to incorporate conversion path data into your applications. Key use cases we’ve seen so far involve combining this conversion path data with other data sources, such as cost data, creating new visualizations, as well as using this data to automate processes such as bidding.

For example, Cardinal Path used the new Multi-Channel Funnels API, Analytics Canvas ETL (Extract, Transform, Load) and Tableau Software to help their client, C3 Presents, uncover how time and channels affected Lollapalooza ticket sales in an analysis dubbed “MCF DNA.” The outcome was a new visualization, similar to a DNA graph, that helped shed light on how channels appeared throughout the conversion funnel.

MCF DNA Visualization in Tableu Software


In another case, Mazeberry, an analytics company from France, helped their client 123Fleurs decrease customer acquisition costs by 20% by integrating data from the Multi-Channel Funnels API into a new reporting framework. Their application, Mazeberry Express, combines media cost and full conversion path data to provide new Cost Per Acquisition (CPA) and Return on Investment (ROI) metrics that provide a more complete understanding of how online channels are working together to influence conversions.

Mazeberry Express Screenshot - Focus on a Channel


Please note that this functionality only works with the new v3.0 API libraries, so you should upgrade now if you haven’t already (see our migration guide). We look forward to seeing how you make use of this new data source.


John Huang is a Software Engineer working on Google Analytics. John is interested in all things analytics, mobile, and photography.

Posted by Scott Knaster, Editor

Wednesday, May 30, 2012

Upgrade now to the new Google Analytics Core Reporting API

Jeetendra
Nick
Pete
By Pete Frisella, Nick Mihailovski, and Jeetendra Soneja, Google Analytics API Team


Core Reporting API Migration Update

Back in December we launched the Core Reporting API to replace the Data Export API. We also announced that we would be shutting down the old Data Export API and that all applications should migrate to the new version.

The time has come for us to shut down the old version. So this is our last reminder to migrate to the new Core Reporting API.

Starting next week, we’ll begin redirecting a portion of Data Export API requests to the Core Reporting API as we prepare to shut down the Data Export API on July 10th. So you'll begin to see Data Feed requests return a Core Reporting API response, and requests for the Account Feed will produce an error.

If you do not migrate, your application will experience service outages.

For more information, visit:
Reminder: Migrate to the new Core Reporting API
Migration Guide: Moving from v2.3 APIs to v2.4 & v3.0


New Guides To Get You Started Fast

It’s important for the Google Analytics APIs to be open and accessible to all developers. It’s common practice for developers learning a new API to start off with the basics and incrementally build from this foundation.

So with that in mind, we wrote a new Hello Analytics API tutorial to give you that basic foundation. The tutorial includes sample code for Java, PHP, Python, and JavaScript. It also walks you through the basic steps of using the Google Analytics API, including registration, authorizing users, retrieving account and profile information, and querying for a report. Once complete you will have a working example that you can customize.

To make it even easier to build applications, we’ve also updated the developer guides for both the Core Reporting API and Management API. Examples for a variety of programming languages have been included, but more importantly the basic concepts have been highlighted.

So whether you’re just starting, updating, or migrating to the new version, you should check out the Hello Analytics API tutorial and Developer Guides before settling down to write that awesome application.


Pete Frisella is a Developer Advocate for Google Analytics, interested in encouraging and promoting awesome Google Analytics integrations. Pete loves to talk tech, travel, and hit the golf course when he can.

Nick Mihailovski is a Senior Developer Programs Engineer working on the Google Analytics API. In his spare time he likes to travel around the world.

Jeetendra Soneja is the Technical Engineering Lead on the Google Analytics API team. He's a big fan of cricket – the game, that is. :)

Posted by Scott Knaster, Editor

Wednesday, May 23, 2012

The Google APIs Explorer has a new look

Jake
Antonio
By Antonio Fuentes and Jake Moshenko,
Google Developer Team


Last March we introduced the Google APIs Explorer, an interactive tool that enables you to try out a Google API in minutes and explore its supported methods. When we launched it, the APIs Explorer supported over a half dozen APIs.

Starting today, the APIs Explorer has a brand new look to make it easier and more fun to navigate. We are also adding new features, including an indexed history of your API calls, a better editor for the body of a request, and a search box so you can search for APIs and methods easily.


screen shot

Moreover, we have been busy adding support for more APIs to the Explorer. The Explorer now supports over two dozen Google APIs, and the list continues to grow! We have also added an indicator to show which methods require authenticated requests.

To get started, here are some sample requests you can try in the Explorer:

The APIs Explorer will help you get started using Google APIs in minutes. If you need more information, visit the documentation. We always welcome your feedback in the Public Forum.


Antonio Fuentes is a Product Manager focusing on developer-facing technologies.

Jake Moshenko is a Software Engineer working on the Google APIs developer experience. He believes that Google APIs should be easy to use, especially from Google platforms.


Posted by Scott Knaster, Editor