1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Google API On Non-API Servers

Discussion in 'Google API' started by digitalpoint, Mar 15, 2004.

  1. #1
    I noticed a few weeks ago that Google made a change so that you can actually make API requests to www.google.com instead of api.google.com if you wish.

    It didn't always used to work that way... so maybe it means that the Google API is finally coming out of beta or possibly a new beta version?

    - Shawn
     
    digitalpoint, Mar 15, 2004 IP
  2. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Interesting - implies maybe API will be pretty mainstream, since if one can query www.google.com, then aren't you able to take advantage of the whole distributed she-bang ... i.e. (tens of) thousands of computers?

    I haven't looked closely, but I'm assuming that api.google.com isn't a hugely distributed "server farm"

    I wonder if they bother to track number of requests per license key with www.google.com requests, since this would require some sort of tracking/synchronization if answered by different servers, and Google may decide it's just easier not to bother with this.

    alek

    P.S. Shawn: Have you seen any differences in the results using www.google.com versus api.google.com?
     
    hulkster, Mar 21, 2004 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    As far as I can tell, it's all the same... api.google.com still appears to be routed to a non-specific data center on the backend. So the data appears to be coming from the same place. I'm guessing the request made to www.google.com still counts as a query, and ultimately is still routed the same way as a request to api.google.com

    - Shawn
     
    digitalpoint, Mar 21, 2004 IP
  4. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Shawn,

    As we have discussed in the past, I also have a program (Perl based - I recall yours is PHP) that also does API queries for keyword tracking. I started to look into using www google.com instead of api.google.com for API queries and have a dumb question.

    In the Google supplied GoogleSearch.wsdl, the actual setup/call to api.google.com looks like this:
    <soap:address ocation="http://api.google.com/search/beta2"/>
    So I tried changing that to www.google.com (and various combinations of the remaining path), but none seemed to work - I hope that buried in your PHP code is a similar string and was hoping you could point me toward what the correct URL path should be.

    I did look at the download .zip from api.google.com (hasn't changed), didn't see anything mention in the FAQ, and also checked out the newgroup, so sorry if I missed this somewhere obvious.

    Thanx,
    alek

    P.S. I still wonder about the license keys being tracked if you are truly able to "directly" query www.google.com. I.e. even if the current model through api.google.com ends up querying one of the data centers, api.google.com can still keep track/count of your number of queries, and cut you off when you exceed the 1000/day ... but if you are going "directly" against www.google.com, I doubt they would be keeping track - my guess is there is very little (if any) interaction between the data-center machines since they just basically churn out requests - sure would be interesting to see how some of this works on the inside. Gotta wonder if this change dramatically increases the scalability of the API services too.
     
    hulkster, Mar 21, 2004 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    There are no API specific data centers like everyone seems to think. The requests to api.google.com are still hitting a data center that the public uses. Which one the request is routed to on the backend is of course up to Google.

    I double checked my PHP code to see if you can still hit www.google.com directly, and you still can, although you have to leave the "Host:" HTTP header within the request as "api.google.com". I'm guessing www.google.com is simply routing it on the backend to the API gateway.

    - Shawn
     
    digitalpoint, Mar 21, 2004 IP
  6. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ahhhhh ... so it sounds like not really a "direct to www.google.com" and there still is a choke point there were they can check on 'ya and make sure you haven't exceeded 1000 queries/day, etc.

    As implied above, I doubt there is any cross-coordination between the "mainstream" data-center machines when responding to any queries, since my guess is this would just add complication, so I was thinking that if they were actually answering API calls "directly" (as they do with generic web queries), then this would be a pretty big change I think.

    As always, thanx for the info Shawn.
    alek
     
    hulkster, Mar 21, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Uhm, how about your API key as a checking point? :)

    API calls on their end all pass through a central system (your key needs to be validated for example). I'm pretty sure if they did allow direct API calls to a specific data center, they are smart enough to still only allow you 1,000 total per day...

    - Shawn
     
    digitalpoint, Mar 21, 2004 IP
  8. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Actually, that was exactly what I was interested in doing, but from what I can gather from how your PHP code handles things and how you still have to leave api.google.com in the headers, I can't change the .wdsl entry, although I certainly did try various combinations of www.google.com.

    On a semi-related note, is there any authoritative answer on what time period the 1,000 queries/day are for - i.e. is it a rolling limit, or does it reset at a certain time?

    The reason I ask is that during my testing yesterday, I got some data that perhaps suggests it resets at midnight GMT - NOT California time, as I thought I had read somewhere.

    alek
     
    hulkster, Mar 22, 2004 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    My guess is that it is a rolling window. So it resets at different times for different users. But I have no authoritative answer on it...

    - Shawn
     
    digitalpoint, Mar 22, 2004 IP
  10. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #10
    OK - give me a few days to do some testing and I'll see if I can spot a trend.

    I have a nightly cronjob at midnight that runs my own keytracker and "burns" up several hundred API keys (more on the weekly & monthly runs) ... but I still got about a 1,000 queries in my evening testing the other day before I ran out, so that's why I suspect maybe a midnight GMT reset.

    alek

    P.S. On an unrelated note, I saw a couple position upward movement in a LOT of my keywords just a few days ago. My keyword tracker isn't as sophisticated/nice as yours Shawn, but I can feed it Analog output from my server web logs, so easy to query data for all keywords used to hit my site. There's the normal up/down, and I usually don't pay much attention to this, but I had quite a few keywords that were in the top-10 move up a few positions ... even got a new number 1! ;-)

    No changes in my HTML, but "something" bumped me up across the board.
     
    hulkster, Mar 22, 2004 IP
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #11
    I had a ton of movement last night (much more than usual). Mostly in the right direction, so that's good. :)

    - Shawn
     
    digitalpoint, Mar 22, 2004 IP
  12. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #12
    WRT bump in rankings: I use mostly underscores to seperate my keywords in the directory path, and I know it's been debated what is the "best" seperator ... but a casual/informal look at my bump-ups might suggest that the increased keyword rankings had some corellation with the use of those underscored seperated keywords in the directory path ... so I wonder if there was some change in that area possibly, although I did see increases for keywords that are not in the directory path too.

    Very difficult to pin down any type of exact cause/effect with this SEO stuff, but I thought I pass that on in case others have seen anything like this. There was no changes in the HTML, link structure, PR, etc.

    There does seem to be a nice overall bump-up in traffic and resultant increase in Adsense traffic! ;-)
    alek

    P.S. Back to the "when do the 1,000 API keys expire/reset" question, I'd say with a high degree of certainity that it is NOT midnight Pacific time ... since I exhausted my key at 2000 PST last night, and it still fails this morning - next up is to see if it resets at midnight GMT this evening - details to follow.
     
    hulkster, Mar 23, 2004 IP
  13. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #13
    hulkster, Mar 23, 2004 IP