Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 348205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:20:34+00:00 2026-05-12T11:20:34+00:00

I want to use Goolge AJAX Feed API in my C# console application to

  • 0

I want to use Goolge AJAX Feed API in my C# console application to save return feeds as C# collection so i can use this .net collcetion in my .net application.

I noticed google give a Java Access Code Snippets but I have no idea how to coding it in C#.
I know there is a very good .net opensource library Json.NET we can use to read and write JSON formatted data.

Can someone give me an exmpale how to use C# and Json.NET play with Google AJAX Feed API?

Final Solution:

public class FeedApiResult
{
    public ResponseData responseData { get; set; }
    public string responseDetails { get; set; }
    public string responseStatus { get; set; }
}

public class ResponseData
{
    public  Feed feed { get; set; }
}

public class Feed
{
    public string title { get; set; }
    public string link { get; set; }
    public string author { get; set; }
    public string description { get; set; }
    public string type { get; set; }
    public List<Entry> entries { get; set; }
}

public class Entry
{
    public string title { get; set; }
    public string link { get; set; }
    public string author { get; set; }
    public string publishedDate { get; set; }
    public string contentSnippet { get; set; }
    public string content { get; set; }

}

var url = "http://ajax.googleapis.com/ajax/services/feed/load?q=http%3A%2F%2Fwww.digg.com%2Frss%2Findex.xml&v=1.0";
var wc = new WebClient();
var rawFeedData = wc.DownloadString(url);

//You can use System.Web.Script.Serialization if you don't want to use Json.NET
JavaScriptSerializer ser = new JavaScriptSerializer();
FeedApiResult foo = ser.Deserialize<FeedApiResult>(rawFeedData);

//Json.NET also return you the same strong typed object     
var apiResult = JsonConvert.DeserializeObject<FeedApiResult>(rawFeedData);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:20:35+00:00Added an answer on May 12, 2026 at 11:20 am

    I’ve just looked at the examples, and here is how I’d go about it.

    1. Construct the feed Url (read the documentation)
    2. Use the WebClient to Download the URL as a String.
    3. Use Json.NET to reads the string.
    4. Use a for-loop to read each entries

    For example, a quick untested hack:

    // 1.
    var url = "'http://ajax.googleapis.com/ajax/services/feed/load?q=http%3A%2F%2Fwww.digg.com%2Frss%2Findex.xml&v=1.0";
    
    // 2.
    var wc = new WebClient();
    var rawFeedData = wc.DownloadString(url);
    
    // 3.
    var feedContent = JObject.Parse(rawFeedData);
    
    // ...
    var entries = feedContent["entries"];
    
    for (int i = 0; i < entries.Length; i++) {
        var entry = entries[i];
    
        // insert entry into your desired collection
    }
    

    If however, you want strongly-typed class, you must first make a class that “looks like” the data that is returned from the feed api first, i.e.

    public class FeedApiResult {
        public FeedApiFeedObj responseData { get; set; }
        // snip ...
    }
    
    public class FeedApiFeedObj {
        public string title { get; set; }
        public string link { get; set; }
        // snip ...
    }
    

    Then in step #3, you can use the deserializing method like this:

    var apiResult = JsonConvert.DeserializeObject<FeedApiResult>(feedContent)
    

    …

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use the Google AJAX Feed API to fetch multiple newsfeeds
I want to use Google spreadsheets to store data online so multiple people can
I want to use google chrome as a control. I think Enso does this
I want to use Powershell to write some utilities, leveraging our own .NET components
I want to use the Web Browser control within an mono application, but when
i have code use googleseach API I want to use Thread to improve speed
I have a currently running PHP application that I want to add real-time feed
I want to use a temp directory that will be unique to this build.
I want to use Google Language Detection API in my app to detect language
you know send a ajax you can use javascript lib like: jquery $.ajax or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.