1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to find Keyword Rank Position In Goole

Discussion in 'C, C++, C#' started by SEOboss, Jul 19, 2012.

  1. SEOboss

    SEOboss Junior Member

    Joined:
    Nov 23, 2009
    Messages:
    166
    Likes Received:
    38
    Occupation:
    IM
    Location:
    India
    Hi

    I am willing to find keyword ranking position in Google how to achieve in .net
    I tried by searching keyword in Google search box and then tried to count position using regx but its now showing proper result

    Thanks
     
    Last edited: Jul 19, 2012
  2. lisper

    lisper Newbie

    Joined:
    Aug 23, 2012
    Messages:
    44
    Likes Received:
    24
    Occupation:
    Lead developer of some German research project
    Location:
    Currently Brussels, Belgium
    Thats pretty easy to do...
    First make sure your requests look valid (have a look at regular google URLs to get a feel for that). Make sure URLs are encoded correctly (tip: google does not encode the + sign, so keep that in mind). Adjust your useragent string accordingly. Use some mozilla string and keep rotating them.

    Once you got a valid response, parse it with the following regex (from the top of my head, might be wrong... see if it works):

    Code:
    href="\/url\?q=([^]*?)\&amp
    obviously you'd need to do a global match...

    That should give you all the URLs present. You might need to parse them out further and decode them (if I remember correctly, they are URL encoded in the source, so you might need to take care of that).

    Then you just go ahead, iterate through your loop or your recursive function (not sure what you are using) and just change the Google search result page (or &start=) URL parameter.

    Make sure you got some cool down period in between your requests present. Don't spam the server or Google will ban your IP. If you multithread, make sure you got some valid proxies to proxy your requests through. Your IP will be banned.

    Obviously, to check the ranking itself, you just iterate through all the link that you have scraped from the page and setup some return condition. Could be done with regex if you like.

    Thats about it.
    Hope it helps.
     
  3. SEOboss

    SEOboss Junior Member

    Joined:
    Nov 23, 2009
    Messages:
    166
    Likes Received:
    38
    Occupation:
    IM
    Location:
    India
    hi every one thanks for your suggestion

    But I am looking for programmatic solution which is ethical like using any external api,google api it self etc I am willing to integrate it in one of existing application so looking some thing reliable

    Thanks

     
  4. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,477
    Likes Received:
    10,221
    I cleaned the thread from non-programming related answers. It 's the programming subforum and the op is clearly asking for a programmatic solution, not a third party tool. ;)