I am using Selenium to get some results using Google search. The program is implemented in Java. I search for some keywords like allintitle:best smart pc
. So when I use this keyword multiple times google is banning my IP. So I need to know how to prevent this issue? How can I search for a list of keywords without banning my IP? Is there any alternative way of using Selenium
and Java
to do that?

- 100,966
- 191
- 140
- 197
-
Possible duplicate of [What are the alternatives now that the Google web search API has been deprecated?](https://stackoverflow.com/questions/4082966/what-are-the-alternatives-now-that-the-google-web-search-api-has-been-deprecated) – luk2302 Mar 08 '19 at 10:15
-
@luk2302 As I see that suggested answer, Now there are no alternatives – Mar 08 '19 at 12:00
-
@TechGuy Update the question with your code attempts – undetected Selenium Mar 08 '19 at 12:03
1 Answers
No, if you persist Google will ban you, you are breaking their Terms & Conditions, specifically:
5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.
If you are just trying to learn how to use Selenium I would suggest using something like The Internet (A group of learning resources for automation) instead.

- 7,281
- 26
- 49
-
-
-
Google actively block people who do this sort of thing, they see it as abuse of their platform. Using a VPN or proxy will just result in the VPN or Proxy IP being banned. You can try adding sleep time between searches, but Google has lots of clever tech written by very clever people with lots of experience to work out if you are doing this sort of thing and then block you if they think you are. – Ardesco Mar 08 '19 at 11:22
-
TL;DR; what you are trying to do is not going to work on Google search – Ardesco Mar 08 '19 at 11:23
-
Well the T&C do say "unless you have been specifically allowed to do so in a separate agreement with Google", you can always talk to Google to find out what it would take to enable you to do what you want to do. Rather than impossible I would say virtually impossible :) – Ardesco Mar 08 '19 at 12:24
-