Was this helpful?
How to Scrape Google SERPs Without Getting Stopped by reCAPTCHA
Technical engineer
Introduction
This guide explains how to bypass Google Search reCAPTCHA in 2025 using the 2Captcha API. We’ll cover Google’s new requirements, show a working Python Selenium example, and help you set up the integration without unnecessary errors.
What you need:
- A 2Captcha account with API access
- A positive balance to pay for solves
- Proxies, residential or mobile
- Cookies from the google.com domain
- Python with the Selenium library for testing
1. What Changed in 2025
1.1. Google’s New Requirements
Google tightened verification but did not make the CAPTCHA itself harder. The system now requires more accurate parameter handling. Previously, you could send a minimal set of data. Now all key parameters are required at once.
1.2. Why Old Methods No Longer Work
| Previously Worked | Fails Now | Reason |
|---|---|---|
| Solving without cookies | Token gets rejected | Google checks the session |
| Any User-Agent | Request blocked | A real browser header is required |
| Proxies optional | Fast IP ban | Automation is easily detected |
| No data-s parameter | Task rejected | CAPTCHA validation fails without data-s |
2. Key Parameters for Successful Solving
2.1. Proxies
Without proxies, Google quickly detects automation and blocks access.
Recommendations:
- Use residential or mobile proxies
- Choose a geo close to your target audience
- Make sure the IP is not blacklisted
2.2. Cookies
Cookies from the google.com domain are critically important. Without them, the success rate drops significantly.
How to get them:
- Open google.com in your browser
- Complete any CAPTCHA manually
- Copy the cookies, especially
NIDandANID - Pass them in the API request
2.3. Accurate User-Agent
The User-Agent header must fully match a real browser.
Example:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
2.4. The data-s Parameter
This is a dynamic key generated for each CAPTCHA instance. Without it, the task will not be accepted.
Important: you must extract a new data-s value for every new CAPTCHA.
3. Step-by-Step Implementation
3.1. Extracting data-s from the CAPTCHA
When Google displays reCAPTCHA, find the element with the data-s attribute:
python
data_s = driver.find_element(By.CSS_SELECTOR, 'div[id="recaptcha"]').get_attribute('data-s')
If the attribute is missing, the CAPTCHA cannot be solved. Make sure the page is fully loaded before searching for the element.
3.2. Building the Request for 2Captcha
Here is the exact set of parameters currently required:
python
result = solver.recaptcha(
sitekey="6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1b",
url="https://www.google.com/search",
datas=data_s,
userAgent="Mozilla/5.0 (Windows NT 10.0...)",
proxy={'type': 'HTTPS', 'uri': 'login:pass@123.123.123.123:3128'},
cookies="NID=123...; ANID=456..."
)
3.3. Parameter Breakdown
| Parameter | Value | Purpose |
|---|---|---|
sitekey |
6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1b |
Static key for Google Search |
url |
https://www.google.com/search |
URL of the page with the CAPTCHA |
datas |
data-s value | Dynamic CAPTCHA parameter |
userAgent |
Browser string | Simulates a real user |
proxy |
Authenticated proxy | Bypasses IP restrictions |
cookies |
Cookies from google.com | Confirms a legitimate session |
4. Applying the Token
4.1. Inserting into the Hidden Field
After receiving the token from 2Captcha, insert it into the form:
python
driver.execute_script(
'document.querySelector("[name=\'g-recaptcha-response\']").value = "' + token + '";'
)
4.2. Calling submitCallback
Simply inserting the token is not enough. You must call the callback, otherwise Google will reject the solution:
python
driver.execute_script("submitCallback('" + token + "');")
4.3. Waiting for Processing
After calling the callback, add a delay so Google has time to process the response:
python
time.sleep(10)
Why this matters:
- Without submitCallback, the CAPTCHA will not be accepted
- Without a delay, the page transition may fail or break
5. Troubleshooting
5.1. If the Token Did Not Work
Do not try to solve the CAPTCHA again on the same page.
Correct workflow:
- Return to search and get a new CAPTCHA
- Extract a new data-s value
- Send the request again
Otherwise, Google may block the IP for suspicious activity.
5.2. If the Token Was Rejected
- Submit a complaint through the API, refunds are issued for incorrect solves
- Contact 2Captcha support, specialists will help investigate the issue
5.3. Verification Checklist
| What to Check | How to Check |
|---|---|
| Cookies | Make sure they are from google.com |
| Proxy | Check if the IP is banned and whether the connection works |
| User-Agent | Verify it matches a real browser header |
| data-s | Make sure the current CAPTCHA parameter was extracted |
| API Error | Check which errorId or message is returned |
5.4. If You Cannot Get a Token
- Check the API response for errors
- Make sure the proxies connect and pass traffic
- Try sending the request with a different cookie set
6. Pre-Launch Checklist
- Proxies are configured and tested
- Cookies from google.com are copied and passed in the request
- User-Agent matches a real browser
- data-s is dynamically extracted for every CAPTCHA
- The token is inserted through execute_script into the g-recaptcha-response field
- submitCallback is called after inserting the token
- A 5-10 second delay is added after submission
- Error handling and incorrect solve reporting are implemented
7. Final Notes
In 2025, Google pays more attention to details, but bypassing Search reCAPTCHA is still possible. The key is passing all parameters exactly as required.
Key points:
- Always extract a fresh data-s value for every CAPTCHA
- Use cookies and proxies together, without them the token will fail
- Call submitCallback after inserting the token, otherwise the solve will not count
- Report incorrect solves to receive refunds
If something does not work, contact 2Captcha support. Specialists will help identify the issue and configure the integration. Good luck with your CAPTCHA automation.