Google hasn’t released the official Google Reader API yet. Still it’s possible to fetch and sync Google reader items. Thanks to some unofficial guides available made by reverse engineering the Google Reader Web Requests. There are a lot of apps that are unofficially using the Google Reader API like Reeder for iPhone & iPad and ReadAir for Adobe Air.
The best unofficial Google Reader API documentation I have found is pyrfeed’s unofficial Google Reader documentation. The content in this guide is subject to change as it is not official. After going through this documentation, I was able to access Google Reader API with C#. I have made a small console application on Visual Studio that fetches the XML of the content in the Google Reader Account.
Logging into Google Account:
First you need to sign in using Google Account. Following is the code that lets you to log in the Google Account for fetching reader items. Replace <email address> with Google Account email and <password> with Google Account password for which you are accessing the Google Reader.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create( @"https://www.google.com/accounts/ClientLogin"); string proxy = null; string data = String.Format("service={0}&Email={1}&Passwd={2}&continue={3}", "reader", "<email address>", "<password>", "http://www.google.com/"); byte[] buffer = Encoding.UTF8.GetBytes(data); req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; req.ContentLength = buffer.Length; req.Proxy = new WebProxy(proxy, true); req.CookieContainer = new CookieContainer(); Stream reqst = req.GetRequestStream(); // add form data to request stream reqst.Write(buffer, 0, buffer.Length); reqst.Flush(); reqst.Close(); HttpWebResponse res = (HttpWebResponse)req.GetResponse(); Stream resst = res.GetResponseStream(); StreamReader sr = new StreamReader(resst); string response = sr.ReadToEnd(); string SID=response.Substring((response.IndexOf("SID=")+4), (response.IndexOf("\n")-4));//extracting SID string Auth = response.Substring((response.IndexOf("Auth=") + 5), (response.Length - (response.IndexOf("Auth=") + 5))-1);//extracting Auth Console.WriteLine(response); Console.WriteLine("--------------------"); Console.WriteLine("SID="+SID); Console.Write("Auth="+Auth);
After authentication, now you can send another request to access Google Reader API. In the following case, I am fetching the list of subscription list.
HttpWebRequest request2 = (HttpWebRequest)WebRequest.Create( @"http://www.google.com/reader/api/0/subscription/list"); Cookie c = new Cookie("SID", SID, "/",".google.com"); CookieContainer cc=new CookieContainer(); cc.Add(c); request2.CookieContainer = cc; request2.Method = "GET"; request2.Headers.Add("Authorization", "GoogleLogin auth=" + Auth); StreamReader sr2 = new StreamReader(request2.GetResponse().GetResponseStream()); string items = sr2.ReadToEnd(); Console.WriteLine("--------------------"); Console.WriteLine("ITEMS"); Console.WriteLine(items);
Read pyrfeed’s unofficial Google Reader documentation for more reference of sending Google Reader API requests.

