Search code examples
google-custom-search

Different results locally and in staging


I'm using google custom search engine with a search engine that searches specific sites and excludes some patterns in these sites. I'm testing the api locally and I receive 12 results. I test the same exact call in staging (heroku us region) and I receive 410 results.

Does google personalise the results when using a custom search engine? If yes, how do I turn it off? If no, do you have any idea why am I seeing this difference?

Update

Ok I did a test. I issued the exact same request by using a proxy and not, and the results are different (vastly).

Now, the question is, can this behaviour be disabled?


Solution

  • Ok found it. By specifying the userIp param https://developers.google.com/custom-search/json-api/v1/using_rest it will force google to use the same behaviour regardless of location.