TL;DR
The best user agent for web scraping is a current, real browser string, for example a recent Chrome on Windows or macOS, kept consistent with the rest of your headers. There is no single magic value: what matters is that the user agent is genuine, up to date, and matched by the other headers and the TLS fingerprint it implies.
Why the User Agent Matters
The User-Agent header tells a server what client is making the request. Default library strings like python-requests/2.32 or curl/8.4 announce automation instantly, and many sites answer them with a 403. Swapping in a real browser string is the cheapest single improvement to a scraper's success rate.
A good current value looks like a real Chrome build:
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/126.0.0.0 Safari/537.36",
}Consistency Beats Cleverness
A convincing user agent that contradicts everything around it is worse than none, because mismatches are exactly what detection systems look for:
- Match the other headers. A Chrome user agent should ship with the
Accept,Accept-Language, andsec-ch-uaclient-hint headers a real Chrome sends. See request headers. - Match the fingerprint. Claiming Chrome while presenting Python's TLS handshake is a contradiction advanced systems catch through fingerprinting.
- Keep it current. A Chrome 98 string in 2026 is as suspicious as a bare library string. Update to versions that are actually in circulation.
Should You Rotate User Agents?
Rotating user agents helps only when done coherently. Randomly cycling strings while sending identical headers and the same TLS fingerprint creates impossible combinations (a different browser every request from one connection) that flag faster than a single honest value. If you rotate, rotate the whole identity together, or keep one consistent, current browser profile.
Key Takeaways
- Use a real, current browser user agent; never ship the default library string.
- Consistency with other headers and the TLS fingerprint matters more than the exact value.
- Rotate the full identity or not at all; incoherent rotation backfires.
How ScrapeGraphAI Handles This
ScrapeGraphAI presents coherent, current browser identities on every request, with the user agent, client-hint headers, and TLS fingerprint aligned automatically. Calling the scrape endpoint means you never maintain a user-agent list at all.