Web Scraping

Web Scraping Without Getting Blocked: A Practical 2026 Guide

Learn web scraping without getting blocked: diagnose 403 and 429 errors, pace requests with backoff, rotate residential proxies and keep your scraper ethical.

By the UptimeProxy Team··12 min read

Web scraping without getting blocked comes down to one principle: make your traffic look like what it claims to be, at a volume the site can comfortably serve. In practice that means four things — clean IPs that match your target (often rotating residential proxies), polite pacing with randomized delays and exponential backoff, request headers and client fingerprints that don't contradict each other, and session behavior that mirrors how a real visitor moves through the site. Get those right, read the error codes you receive, and most "mysterious" blocks disappear.

This guide walks through why blocks happen, how to diagnose them by symptom, and the exact engineering patterns we recommend — with a working Python example, a decision table for proxy types, and a pre-flight checklist you can run before every new project.

Why scrapers get blocked in the first place

Websites don't block scrapers because they dislike code. They block traffic that costs them money or looks risky: bursts that slow the site for real customers, automated logins, inventory hoarding, or content theft. Modern anti-bot systems don't rely on a single rule. They score each request across several layers and act when the combined score crosses a threshold.

The four layers of bot detection Request 1. IP 2. Rate 3. Fingerprint 4. Behavior reputation req / min headers · TLS timing · paths
A request has to pass every layer. Fixing only your IPs while sending robotic timing or mismatched headers still gets you blocked.

Layer 1: IP reputation

Every IP address carries history. Addresses from cloud and hosting ranges are easy to identify because their owners are public, so many protected sites treat them with suspicion by default. IPs that previously sent abusive traffic land on shared blocklists. Residential and mobile IPs belong to consumer internet providers, so they look like ordinary visitors — which is why they are the usual choice for heavily protected targets.

Layer 2: Request rate

A human reads a page for several seconds before clicking. A naive scraper fires dozens of requests per second from one address. Rate limits are the oldest and most common defense, usually enforced per IP, per session cookie, or per account. When you exceed them you typically see HTTP 429 Too Many Requests.

Layer 3: Headers and client fingerprint

Your request announces what it is through its User-Agent, accepted languages, header order and — below HTTP — the way it negotiates TLS. If your User-Agent says "Chrome on Windows" but your TLS handshake looks like a default Python library, that contradiction is a strong signal. The goal is not to impersonate anyone; it is simply not to send contradictory signals. Use a client whose real identity matches the headers you send, or send honest headers.

Layer 4: Behavior

Perfectly regular intervals, jumping straight to deep URLs with no referrer, never loading CSS or images, and crawling every page alphabetically are all patterns real visitors never produce. Behavior scoring catches scrapers that pass every other test.

Diagnose the block by its symptom

Different failures point to different causes. Before changing anything, log the status code, response size and a snippet of the body for every failed request. Then match the symptom:

SymptomMost likely causeWhat to change first
429 Too Many RequestsRate limit per IP or sessionSlow down, add jitter, honor Retry-After, spread load across more IPs
403 Forbidden on first requestIP range or reputation blockedSwitch proxy type (datacenter → residential), check the IP isn't blocklisted
403 after working for a whileYour IPs or session got flaggedReduce concurrency, rotate sessions, review behavior patterns
CAPTCHA page with 200 statusFingerprint or behavior looks automatedFix header/client consistency, slow down; consider whether you should be scraping this page at all
Empty page or missing dataContent rendered by JavaScriptFind the underlying JSON endpoint or use a real browser engine
Different prices or content by countryGeo-targeted contentUse proxies in the target country
Timeouts and connection resetsOverloaded proxy, bad route, or silent blockTest the proxy directly, lower concurrency, retry with a fresh IP
Watch for "soft blocks"

Many sites return 200 OK with a CAPTCHA, a login wall or an empty template instead of an error. Validate that each response actually contains the data you expect — check for a known selector or a minimum page size — or your pipeline will silently store garbage.

Pacing: randomized delays and exponential backoff

Rate is the variable you control most directly, and the cheapest one to fix. Three rules cover most cases:

  • Randomize delays. A fixed one-second interval is itself a machine signature. Wait a random amount within a range, for example 1.5–4 seconds per IP for a small site.
  • Cap concurrency per domain. Ten parallel workers through ten IPs is very different from ten workers through one. Budget requests per IP per minute, not just per scraper.
  • Back off on 429 and 503. When the server says slow down, wait — and wait longer each time. Respect the Retry-After header if it is present.
Exponential backoff after a 429 429 1s 429 2s 429 4s + jitter 200 Back off, add jitter, honor Retry-After Each retry waits roughly twice as long as the last one.
Exponential backoff with random jitter turns a burst of 429 errors into a recovery instead of an IP ban.

Here is a compact Python pattern using requests through an authenticated proxy. It retries on rate-limit and server errors with exponential backoff plus jitter, and treats a soft block as a failure:

import random
import time
import requests

PROXY = "http://USER:PASS@HOST:PORT"   # your proxy credentials
PROXIES = {"http": PROXY, "https": PROXY}
HEADERS = {
    "User-Agent": "Mozilla/5.0 (compatible; PriceMonitor/1.0; +https://example.com/bot)",
    "Accept-Language": "en-US,en;q=0.9",
}
RETRY_STATUSES = {429, 500, 502, 503, 504}

def fetch(url, max_retries=5):
    for attempt in range(max_retries):
        resp = requests.get(url, headers=HEADERS, proxies=PROXIES, timeout=30)
        if resp.status_code == 200 and "product-title" in resp.text:
            return resp.text
        if resp.status_code not in RETRY_STATUSES:
            resp.raise_for_status()
        retry_after = resp.headers.get("Retry-After")
        wait = float(retry_after) if retry_after and retry_after.isdigit() \
            else (2 ** attempt) + random.uniform(0, 1)
        time.sleep(wait)
    raise RuntimeError("Gave up on " + url)

for url in ["https://example.com/p/1", "https://example.com/p/2"]:
    html = fetch(url)
    time.sleep(random.uniform(1.5, 4.0))   # polite, irregular pacing

Note the honest User-Agent with a contact URL. For public data where you have a legitimate purpose, identifying your bot is often the fastest way to stay unblocked — some site owners will even whitelist or point you to an API.

Rotating vs sticky sessions

Proxy rotation spreads your requests across many IPs so no single address crosses a rate limit. But rotating on every request breaks anything that depends on continuity.

Rotating vs sticky sessions Rotating Sticky (~30 min) A B C A Catalog pages, search results Login, cart, paginated flows
Rotate for independent pages; stick to one IP when the site expects the same visitor across several requests.

Use rotating IPs for

  • Product and category pages
  • Search result pages
  • Independent, stateless URLs
  • Large crawls spread over time

Use sticky sessions for

  • Paginated results tied to a cookie
  • Multi-step forms and carts
  • Anything where a sudden IP change mid-flow looks suspicious

UptimeProxy residential proxies rotate automatically by default and support sticky sessions that hold the same IP for up to about 30 minutes — enough to finish a paginated flow, then release the IP and start fresh.

Residential proxiesRotating residential IPs in 195+ countriesPay per GB from $1.50, bandwidth never expires, sticky sessions up to ~30 minutes, HTTP & SOCKS5.See residential plans →

Choosing the right proxy type for each target

There is no single best proxy for scraping. Match the proxy to how strongly the target defends itself and how much bandwidth you'll use. Many teams run a mix: cheap datacenter IPs for easy, high-volume targets and residential IPs only where they are needed.

TargetRecommended proxyWhy
Public APIs, your own sites, lightly protected pagesDedicated IPv4 / rotating datacenterFastest and cheapest; reputation rarely matters
E-commerce, travel, search resultsRotating residentialConsumer IPs blend in; country targeting for local prices
Strict anti-bot targets, mobile-first sitesPremium residential or mobileHighest trust IP ranges
Long logged-in sessions you are authorized to useDedicated (static) IPA stable address avoids security re-checks

For reference, UptimeProxy's pay-per-GB tiers are rotating Datacenter at $0.75/GB, Residential at $1.50/GB, Mobile at $3.00/GB and Premium residential at $7.50/GB. Dedicated private IPv4 proxies start from $0.50 per IP. If you want the full breakdown of trade-offs, read our datacenter vs residential vs ISP proxies guide.

Dedicated IPv4Private IPv4 proxies for fast, high-volume jobsFrom $0.50 per IP, instant delivery, HTTP & SOCKS5, 99.9% uptime SLA.Buy dedicated proxies →

Protocol matters less than people think for scraping, but if you're unsure which to configure, our SOCKS5 vs HTTP proxy explainer covers when each is the better fit.

Request less: caching, conditional requests and APIs

The request you never send can't get you blocked. Before scaling proxies, cut volume:

  • Use the official API if one exists. It is more stable than HTML parsing, usually explicitly permitted, and often returns cleaner data.
  • Look for the JSON behind the page. JavaScript-heavy sites usually load data from an internal endpoint. Fetching that is lighter for both sides than rendering the full page in a headless browser.
  • Cache aggressively. Store responses and skip URLs you've fetched recently. Product descriptions rarely change hourly; prices might.
  • Send conditional requests. Use If-Modified-Since or If-None-Match with the ETag you saved. A 304 Not Modified costs almost nothing.
  • Use sitemaps. A site's sitemap.xml lists canonical URLs and often last-modified dates, so you crawl only what changed.
  • Skip assets you don't need. With residential bandwidth billed per GB, blocking images, fonts and video in a headless browser can cut costs dramatically.

Avoiding blocks is an engineering problem; staying on the right side of the line is a judgment problem. A few principles keep projects sustainable:

  • Read the terms of service and robots.txt. They tell you what the site permits. Robots.txt isn't a law everywhere, but ignoring it is a clear signal of bad faith and can matter in a dispute.
  • Stick to public data. Don't scrape behind logins you aren't authorized to use, and never try to defeat paywalls, CAPTCHAs or other access controls.
  • Be careful with personal data. Names, emails, profiles and other personal information fall under laws such as GDPR and CCPA. Collect only what you need, have a lawful basis, and secure what you store.
  • Don't degrade the service. Scrape off-peak, keep concurrency modest and stop immediately if you notice errors climbing for everyone.
  • Respect copyright. Facts like prices are generally treated differently from creative content such as articles and photos. Republishing content wholesale is a different matter from analyzing it.
This is not legal advice

Laws differ by country and change over time. For commercial projects that touch personal data or a site that explicitly forbids scraping, talk to a lawyer before you start.

Common mistakes that get scrapers banned

  1. Too much concurrency on too few IPs. Adding workers without adding IPs just multiplies the per-IP rate.
  2. Retrying instantly in a loop. Hammering a server that just returned 429 escalates a temporary limit into a long ban.
  3. Contradictory headers. A mobile User-Agent with desktop screen hints, or a browser User-Agent on a non-browser client.
  4. Rotating mid-session. Changing IP between page 3 and page 4 of a cookie-based pagination flow.
  5. Ignoring geography. Fetching a German store through US IPs and wondering why prices or availability look wrong.
  6. Never testing proxies. A dead or slow proxy produces timeouts that look exactly like blocks. Check them first with our free proxy checker — and see how to test a proxy for a full speed and leak checklist.
  7. Not validating responses. Storing CAPTCHA pages as data because the status was 200.

Monitor your block rate, not just your success rate

A scraper that reports "95% success" can still be in trouble if the remaining 5% is climbing day over day. Track failures by status code and by proxy, per target domain, on a simple dashboard or even a daily log summary. A rising share of 429s means you are pushing too hard; a rising share of 403s from one IP group means those addresses are being flagged and should be retired; a sudden jump in empty or tiny responses usually means the site changed its layout or started serving a challenge page.

Set alert thresholds so a human looks at the problem before it becomes a ban. Pausing a job for an hour when errors spike costs far less than burning through a whole pool of IPs — and it is the considerate thing to do for the site on the other end.

Free toolTest your proxies before you scrapeCheck whether an HTTP or SOCKS5 proxy is alive, how fast it responds and where it's located — free, no signup.Open the proxy checker →

Pre-flight checklist for scraping without getting blocked

Run through this before you launch a new scraper or point an existing one at a new site:

  1. Check permission

    Read the terms and robots.txt. Look for an official API or data feed first.

  2. Map the data source

    Find the JSON endpoint or sitemap. Decide whether you need a real browser at all.

  3. Pick the proxy type

    Datacenter for easy targets, residential or mobile for protected ones, in the right country.

  4. Test the proxies

    Confirm they connect, show the expected location and respond quickly.

  5. Set a request budget

    Requests per IP per minute, max concurrency per domain, randomized delays.

  6. Add backoff and validation

    Exponential backoff with jitter on 429/5xx, honor Retry-After, and check every response contains real data.

  7. Keep signals consistent

    Headers that match your actual client, sticky sessions for multi-step flows.

  8. Start small and monitor

    Run a small batch, watch the error rate by status code, then scale gradually.

Scraping that respects the site and reads its signals is not only more ethical — it is more reliable and cheaper to run. Most blocks are a message about rate, reputation or consistency. Listen to them, adjust, and your pipeline will keep running long after the brute-force ones have been banned.

Frequently asked questions

Why does my scraper get a 403 Forbidden error?

A 403 on the very first request usually means the site blocks your IP range or the IP has a bad reputation, which is common with datacenter addresses on protected sites. A 403 that appears after things worked for a while usually means your traffic got flagged for volume or behavior. Switch to a cleaner IP type, slow down and review your headers.

What does HTTP 429 mean when scraping?

429 Too Many Requests means you hit a rate limit, usually per IP or per session. Stop and wait, then retry with exponential backoff and random jitter. If the response includes a Retry-After header, wait at least that long. Long term, lower your requests per IP per minute or spread traffic across more IPs.

Are rotating residential proxies necessary for web scraping?

Not always. Lightly protected sites and public APIs work fine with cheaper datacenter or dedicated IPv4 proxies. Rotating residential proxies are worth it for e-commerce, travel, search results and other targets with strong anti-bot protection, or when you need IPs in specific countries to see local content.

How many requests per second is safe when scraping?

There is no universal number. A small site may struggle with one request per second, while a large platform handles far more. Start low, such as one request every few seconds per IP with randomized delays, watch your error rates, and scale gradually. If 429 or 503 errors increase, slow down.

Is web scraping legal?

Scraping publicly available data is lawful in many situations, but it depends on the country, the site's terms, what data you collect and how you use it. Personal data is covered by laws like GDPR and CCPA, and bypassing logins or access controls is high risk. For commercial projects, get legal advice.

Should I use a headless browser or plain HTTP requests?

Use plain HTTP requests whenever the data is in the HTML or an underlying JSON endpoint; they are faster, cheaper and use less proxy bandwidth. Use a headless browser only when content truly requires JavaScript rendering, and block images, fonts and media to save bandwidth.

Scrape reliably with rotating residential IPs

Country targeting in 195+ countries, sticky sessions up to ~30 minutes and pay-per-GB pricing from $1.50 with bandwidth that never expires.

Get residential proxies →