DEV Community

ProxyMaster
ProxyMaster

Posted on

Scraping Yandex Search Results at Scale (Without the Captcha Wall)

WinGate private IPv4 and SOCKS5 proxies, free test up to 2 hours

Yandex is quick to drop a CAPTCHA wall in front of anything that hits it too often from one place. Scrape at volume off a single address and you spend more time solving challenges than reading positions.

What a block actually looks like

It rarely fails cleanly. It rots. The worst stage is the third, where you still get 200 OK but the numbers are wrong, so a run looks fine and is worthless. By the time you spot it, half the dataset is already poisoned.

Stage What you see What the site is doing
1 Responses slow down Rate-limiting your IP
2 A CAPTCHA on every page Flagged the address as automated
3 Empty or decoy results Feeding you junk to waste the run
4 429s or refused connections Temporary block on the IP

Yandex walls a busy IP fast

Yandex counts queries per address and challenges bursts hard, so a lone IP meets the wall quickly. Here is the short version. One address, many requests, a short window, and the target draws the obvious conclusion. the SmartCaptcha wall is what that conclusion looks like from your side. Spread the same work over many clean addresses and the conclusion never gets drawn.

Read Yandex results from clean IPs

Spread the load so no address ever hits a rate worth flagging. private proxies for Yandex are dedicated IPv4 and SOCKS5 with automatic rotation and unlimited traffic. Pull a fresh exit per request per thread and the maths flips: instead of one machine firing a thousand requests, the target sees a thousand visitors firing one each. Same data, no signature.

Wiring a proxy in

Two lines, not a rewrite.

import requests

PROXY = "http://USER:PASS@HOST:PORT"  # WinGate, rotating
r = requests.get("https://yandex.com/",
                 proxies={"http": PROXY, "https": PROXY},
                 headers={"User-Agent": "Mozilla/5.0"}, timeout=30)
print(r.status_code)
Enter fullscreen mode Exit fullscreen mode

Rotate every few requests, keep the per-IP rate sane, and jitter the timing so it is not machine-even. httpx plugs in the same way, and the same trick in httpx follows the identical pattern. Start slow, then push the rate while you watch the block count.

Rotating across the pool

Once the proxy is wired in, rotation is a few lines. Keep a list of pool endpoints and pick a fresh one per request.

import random

POOL = ["http://USER:PASS@h1:PORT", "http://USER:PASS@h2:PORT"]  # WinGate

def fetch(url):
    p = random.choice(POOL)
    return requests.get(url, proxies={"http": p, "https": p},
                        headers={"User-Agent": "Mozilla/5.0"}, timeout=30)
Enter fullscreen mode Exit fullscreen mode

In production you would pull the pool from config and weight it, but the shape does not change: one address per request, none of them overworked.

Backing off when the SmartCaptcha wall appears

Even with rotation you will meet the odd limit. Do not hammer through it. Back off, then let the next attempt land on a different address.

import time

for attempt in range(5):
    r = fetch(url)
    if r.status_code in (403, 429):
        time.sleep(2 ** attempt)   # exponential back-off
        continue                    # next fetch() rotates the IP
    break
Enter fullscreen mode Exit fullscreen mode

Exponential back-off plus a fresh exit clears most transient blocks without a solver in sight.

Yandex SERP: requests before block

CAPTCHAs: cause before cure

A CAPTCHA is a symptom, and the cause is almost always frequency on one address. Clean rotation removes the signature that triggers most of them, which is why the network comes before the solver. For the leftovers, keep the solving traffic clean with an anti-captcha pool and a CapMonster setup. A 429 says the same thing: back off, add addresses.

Reading what the site tells you

The status line is a diagnosis if you read it. Quick key:

  • 403 the address is not trusted, rotate to a clean one.
  • 429 you went too fast on one IP, back off and add addresses.
  • 503 or a challenge page the anti-bot flagged you, drop the rate.
  • 200 with wrong data the nastiest one, you are being fed decoys.

Most debugging is matching one of these to the fix next to it, not rewriting the parser.

Which address for which task

No single right proxy. Just the right one for the job in front of you.

Situation Reach for
High-volume Yandex SERP scraping Rotating private IPv4
A tool that only speaks SOCKS SOCKS5 from the pool
A logged-in account One sticky private address
Region-specific data A worldmix exit in that region

Rotate or pin? Depends on the job

Stateless scraping wants rotation. A logged-in session wants the opposite. Pin one address from dedicated private proxies so the account never watches its IP jump and ask you to log in again. Most projects need both at once, and keeping the two apart is half the job.

Job Address strategy Why
Stateless scraping Rotate per request No IP builds a rate
Logged-in session One pinned IP The account never sees the IP move
Mixed pipeline Rotate collectors, pin sessions Keeps volume and identity apart

Private versus public addresses

A public proxy is shared by thousands and already flagged, so a request through it is suspect before the server answers, and you catch the SmartCaptcha wall on the first hit. A private IPv4 is yours alone. Its record is clean because no stranger spoiled it, and the pass rate holds steady enough to plan a run around.

Geography: the right regional data

Yandex SERP scraping often returns different content or prices by region, so one location gives you a lopsided sample and never errors to warn you. A worldmix pool lets you place the exit where you need it and compare regions in a single run. If your buyers span several markets, that is the difference between a real picture and a guess.

How many addresses do you actually need

Rough maths beats guessing. Take your target requests per hour and divide by a safe per-IP rate the site tolerates. If you want 20,000 requests an hour and one address survives about 400, you need on the order of fifty clean addresses, not five worked to death. Size the pool to the workload, then add headroom, and you stop rediscovering the limit the hard way.

Protocol and concurrency

When a library refuses an HTTP proxy it almost always takes a SOCKS5 endpoint instead, and here it comes from the same pool as the HTTP exits. Threads are the other half: up to 5000 at once, so a wide crawl never sits waiting for a free address.

Behaviour: headers and timing

An address fixes the network, not the manners. A perfectly even request rhythm and one static User-Agent still read as a robot. Vary the headers within reason, add a bit of jitter between calls, and keep concurrency believable. The IP, the request shape, and the timing get judged together, so all three have to look human at once.

Traffic you do not count

This work moves real bandwidth, and a metered plan taxes exactly what you came to do. With an uncapped plan you size the pool by addresses, not gigabytes, and run a full crawl without watching a meter. It also makes the bill predictable, because you pay for dedicated capacity instead of guessing how many gigabytes a job will eat.

Mistakes that bring the blocks back

One overused address, public proxies, no regional variation, no pauses between queries. Any one of them rebuilds the signature you just cleared, and the SmartCaptcha wall is back. The cure is dull and it works: clean private addresses, a sane per-IP rate, rotation for volume, sticky IPs for logins, a solver only for the scraps.

A quick pre-run checklist

  1. Bind a handful of clean addresses and turn on rotation.
  2. Cap the per-IP rate below where the SmartCaptcha wall first showed up.
  3. Add jitter and realistic headers so the timing is not machine-even.
  4. Watch the block rate as you scale threads, not after the run.

Try it before you trust it

Do not take my word for it. WinGate gives you a free two-hour test, which is enough to run Yandex SERP scraping against your actual target and watch the block rate. If it passes, add addresses and scale. If it does not, walk away.

Top comments (0)