Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I wrote a script to find the position in Google search result for a search keyword. I also did the same with the browser. The two results are different.

Let me explain in detail here. I have a website and I wanted to know on which page number my domain appears for a search string. Like when I search for 'code snippets' I wanted to find in Google search on which page number a certain domain appears.

I wrote a PHP script to search page by page starting from page 1 to page n. Then I did the same task using a browser. The script returned page 4 and when browsed I can see the domain appearing on the second page.

Here is the search string I used in my code.

/search?hl=en&output=search&sclient=psy-ab&q=code+snippets&start=0&btnG=

For each request I change the start=0 to start=1, start=2, etc., and in the response I will check whether my domain appears in it.

Any idea why this is different in search results?

share|improve this question
1  
Do you send the same HTTP request headers that your browser sends? Is your script running on the same IP address as your browser, ie. the same location? –  w3d Sep 18 '12 at 8:58
    
Related - webmasters.stackexchange.com/questions/24783/… –  mvark Sep 19 '12 at 15:24
    
yes... yet i use to copy a recent user agent string from the browser and use the same url... –  Jayapal Chandran Jan 25 '13 at 5:40

1 Answer 1

up vote 3 down vote accepted

The first reason that come to mind is that you're using a browser where you did the login. So Google is improving your experience personalizing the SERPs.

Just to be sure that your software is well written, you can compare the results against another software like this one I made: Site Seeker.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.