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

I built a google scraper that returns the number of results for keywords

Discussion in 'PHP & Perl' started by grazor, Jun 11, 2009.

  1. grazor

    grazor Registered Member

    Joined:
    Apr 14, 2009
    Messages:
    57
    Likes Received:
    19
    This is a very simple script, but someone may have a use for it. If you have improvement ideas let me know. First I collect all the keyword phrases I want to run searches for and I place them in a text file, each one on a new line. I call it keywordlist.txt in the script. One way I do this is in KeywordToolExternal. I run a search, click add on all the phrases I'm interested in and copy/paste all the phrases from the right hand column it creates for you. I also copy the monthly searches in another file called searchvolume.txt, each on a new line, in the same order. If you don't want to bother with that just comment out the part of the code that opens the file, and delete the table column in the script that is populated with that data.

    My code runs a search of each phrase in quotes and grabs the number of results returned. Then it does the same thing with an allintitle tag. When it finishes it outputs all the data to an html table. Then I just copy the table into excel and I order the data however I want.

    I set it to pause between 5 and 15 seconds after each google query and I haven't gotten my IP banned yet. The disadvantage to this is it can take 20 minutes to run 50 phrases, but I just do something else in the meantime. You can speed it up at your own risk. I run it on my home server, I just put the text files in the same directory as the script, then open the script in my browser.
     

    Attached Files:

  2. B166ER

    B166ER BANNED BANNED

    Joined:
    Jun 10, 2009
    Messages:
    146
    Likes Received:
    179
    what have you been using the returned data for?
     
  3. grazor

    grazor Registered Member

    Joined:
    Apr 14, 2009
    Messages:
    57
    Likes Received:
    19
    Sorry, it looks my upload did not work, I'm attaching it again. B166ER, this just saves me the hassle of looking up the number of results in google. Usually if I see a keyword phrase has less than 60,000 results in exact quotes, and less than 5,000 allintitle results I look to optimize an article or blog post for that phrase. Those aren't hard numbers though.
     

    Attached Files:

  4. teksigns

    teksigns Newbie

    Joined:
    May 14, 2009
    Messages:
    17
    Likes Received:
    0
    Home Page:
    I will give the script a go ....