Skip to content

Scraping

What is a user agent?

Short answer

A user agent is the software that makes a web request, such as a browser, an app or a script. It identifies itself in the `User-Agent` header, a short text string that tells the server what product and version is calling.

Updated 25 Sep 20262 min read

How the string is built

HTTP defines User-Agent in RFC 9110 as a list of product tokens, each a name with an optional version, most important first, with optional comments in brackets.

Three user agentshttp
User-Agent: curl/8.7.1
User-Agent: my-report-bot/2.3 (+https://example.com/bot)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36

Browser strings look odd because of history: nearly every browser still starts with Mozilla/5.0 so that old sites which checked for it keep working.

What servers use it for

  • Serving a mobile or desktop layout.
  • Working around bugs in specific browser versions.
  • Analytics: which browsers and devices visit.
  • Bot management: allowing known crawlers, limiting scripts, blocking bad actors.

Client Hints and user-agent reduction

Full browser strings revealed a lot about a device, which helped fingerprinting. Chrome responded by freezing most of the string: from Chrome 101 in 2022 the minor version reads 0.0.0, and later releases reduced the platform details on desktop and Android.

Detail now comes from User-Agent Client Hints. Browsers send a few low-detail hints by default, such as Sec-CH-UA, Sec-CH-UA-Mobile and Sec-CH-UA-Platform, and a site must ask for more with the Accept-CH header. Chrome, Edge and Opera support Client Hints; Firefox and Safari do not.

Setting a user agent in your own client

For scripts and API clients, send an honest, specific user agent: your product name, version and a way to contact you. Some APIs require this; Reddit, for example, asks for a descriptive string and limits generic ones.

Copying a browser’s user agent into a script rarely helps on well-defended sites. Bot systems compare it with the rest of the request, and a mismatch is itself a signal.

In Monocrawl

User agents and Monocrawl

When you call Monocrawl, your client’s user agent only reaches us, not the platforms. Collection, headers and retries are handled on our side, so you don’t tune request headers per platform.

Monitor webhooks we send to you identify themselves as Monocrawl-Webhooks/1, so your receiver can recognise them in logs.

Common questions

Can I change my user agent?

Yes. Browsers let you override it in developer tools, and every HTTP library lets you set the header.

Is spoofing a user agent illegal?

Changing the header is not illegal in itself. Using it to get past access controls you have agreed not to bypass can create legal risk.

Why does my user agent say Chrome 140.0.0.0?

That is Chrome’s reduced string. Only the major version is real; the rest is frozen for privacy.

Sources

  1. RFC 9110, HTTP Semantics: User-Agent
  2. Chromium: User-Agent reduction
  3. WICG: User-Agent Client Hints
  4. MDN: Sec-CH-UA

Try it on real data

One key for public social, search and web data.

1000 free credits. No card required.