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 597547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:17:33+00:00 2026-05-13T16:17:33+00:00

Right now I am using this code: string url = http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=hey&esrch=FT1; string source =

  • 0

Right now I am using this code:

string url = "http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=hey&esrch=FT1";
string source = getPageSource(url);
string[] stringSeparators = new string[] {
 "<b>",
 "</b>"
};
string[] b = source.Split(stringSeparators, StringSplitOptions.None);
bool isResultNum = false;
foreach(string s in b) {
 if (isResultNum) {
  MessageBox.Show(s.Replace(",", ""));
  return;
 }
 if (s.Contains(" of about ")) {
  isResultNum = true;
 }
}

Unfortunately it is very slow, is there a better way to do it? Also is it legal to query google like this? From the answer in this question it didn’t sound like it was How to download Google search results?

  • 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-13T16:17:33+00:00Added an answer on May 13, 2026 at 4:17 pm

    You already referenced the post mentioning the transition from SOAP API to AJAX.

    The RESTful interface should give you what you need since it limits the returned results sets but gives you estimatedResultCount and doesn’t seem to raise any legal issues (as of now).


    Update

    I followed the link from Googles API page to http://www.json.org and found a link to this library on sourceforge. I did not try it out myself yet but i think it will be helpful for you.

    Update 2

    It looks like Json.Net offers better support than csjson.

    Json.NET sample

    ...
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(googleUri);
    request.Referer = "http://www.your-referer.com";
    HttpWebResponse response = (HttpWebResponse)req.GetResponse();
    Stream responsestream = response.GetResponseStream();
    StreamReader responsereader = new StreamReader(responsestream);
    JObject jo = JObject.Parse(responsereader.ReadToEnd());
    int resultcount = (int)jo.SelectToken("responseData.cursor.estimatedResultCount");
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 302k
  • Answers 302k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes. It's easy to grab 2D chunks: tmp.[10..20,30..40] However, if… May 13, 2026 at 8:26 pm
  • Editorial Team
    Editorial Team added an answer May be it will help you. I've used the same… May 13, 2026 at 8:26 pm
  • Editorial Team
    Editorial Team added an answer You can use an "OR" construct, to define possible forms… May 13, 2026 at 8:26 pm

Related Questions

I'm currently downloading an HTML page, using the following code: Try Dim req As
I'm going to be as specific and verbose as possible and include some of
I have created an Ajax enabled WCF web service that contains this simple method:
I'm using SharpSvn to interact with my svn repository via C# code. I am
At the moment I am using one list to store one part of my

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.