SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    AdCaliber Magic2K2's Avatar
    Join Date
    Nov 2001
    Location
    Northern Virginia
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inconsistent Results with Google API

    I am working on a script where it is essential that I get nearly the same result each time it is run. The script returns the total number of search results in Google. It seems Google API will return up to about 3 different answers, which may cover a wide range. Is there any way to target one particular datacenter or any other method to ensure getting the same result?

    BTW, the best method I've come up with is to run my query 10 times and take the maximum value I get, which works fine, but those queries will quickly reach 1,000 so I'd prefer a better solution.

  2. #2
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can connect to a specific IP, can't you? As opposed to google.com? Not 100% sure, just guessing.

  3. #3
    AdCaliber Magic2K2's Avatar
    Join Date
    Nov 2001
    Location
    Northern Virginia
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by someonewhois
    You can connect to a specific IP, can't you? As opposed to google.com? Not 100% sure, just guessing.
    I looked at the API Reference (http://www.google.com/apis/reference.html) and don't see anything where you choose what IP to connect to.

  4. #4
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm I just took a look at my rankings-checker. In the GoogleSearch.wsdl file, it has (line 194 for me, could be different if you've got a new version or something):

    Code:
    <soap:address location="http://api.google.com/search/beta2"/>
    That's the only referance to google.com throughout all of it. I'm not sure if it's possible to change that to one of the DC's/search/beta2, but it can't hurt to try. Worst that can happen is it doesn't work.

  5. #5
    AdCaliber Magic2K2's Avatar
    Join Date
    Nov 2001
    Location
    Northern Virginia
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try that. Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •