fake-useragent
Up-to-date simple useragent faker with real world database
What it is and what it does
fake-useragent provides a simple interface to retrieve realistic user-agent strings without making external HTTP requests. The package ships with a pre-downloaded and post-processed database of real-world browser agents sourced from Intoli LLC, covering desktop, tablet, and mobile platforms across browsers like Chrome, Firefox, Safari, Edge, Opera, and others. You instantiate a UserAgent object and call properties like `.random`, `.chrome`, or `.firefox` to get strings, or use `.getRandom` and similar methods to retrieve full dictionaries with metadata like browser version, OS, and device brand.
The package is designed for web scraping, testing, and scenarios where you need to rotate or spoof browser identification. It supports filtering by specific browsers, operating systems, platform types (desktop/mobile/tablet), and minimum browser version. Since data is bundled with the package rather than fetched at runtime, there are no external dependencies or network calls, making it lightweight and reliable for offline use.
Use it for:
- Web scraping: rotate user-agent strings to avoid detection or blocking by servers.
- Automated testing: simulate requests from different browsers and devices in test suites.
- API client libraries: add realistic user-agent headers to HTTP requests without hardcoding.
- Bot development: generate varied user-agent strings for bots that need to appear as different browsers.
- Security testing: test how applications handle requests from diverse browser and OS combinations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates random or browser-specific user-agent strings from a pre-packaged database of real-world agents, with filtering by browser, OS, platform type, and minimum version.
Yes, with caution about maintenance. The package is stable, has low install friction, and solves a real problem for web scraping and testing. However, the repository is now archived and abandoned, so the bundled user-agent database will not receive updates for new browser versions. Install it if your use case tolerates a static database; avoid it if you need current data for the latest browser releases or if you require ongoing bug fixes.
Install
fake-useragent on PyPI
pip
pip install fake-useragentuv
uv add fake-useragentpoetry
poetry add fake-useragentInstalling fake-useragent
Before you install
Low install friction; single runtime dependency (importlib-resources). Repository is archived and marked abandoned as of the fact sheet date, with last commit on 2026-03-29, so maintenance has ceased.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with attribution and liability disclaimers.
Quickstart
from fake_useragent import UserAgent
ua = UserAgent()
print(ua.random) # Returns a random user-agent string
print(ua.chrome) # Returns a Chrome user-agent
print(ua.getRandom) # Returns full user-agent dictionary
Requires Python 3.9 or later.
Verify before relying
- Whether the pre-packaged user-agent data is current enough for modern browser versions after the repository's abandonment.
- Whether the data source (Intoli LLC) continues to be updated or if the package's database is now static.
- Performance characteristics when filtering across large browser/OS/platform combinations.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — importlib-resources |
| Maintenance | abandoned — 487 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 10,932,845/month — #1,427 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fake_useragent-2.2.0-py3-none-any.whl
Keywords: agent, fake, fake user agent, fake useragent, user, user agent, useragent
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
random-user-agentProvides random user agent strings filtered by…
permissive · top 15,000 on PyPI
ua-generatorGenerates realistic, randomized user-agent…
permissive · top 5,000 on PyPI
wootheeWoothee parses user-agent strings to identify…
permissive · top 15,000 on PyPI
fake-headersGenerates realistic User-Agent strings and HTTP…
permissive · top 15,000 on PyPI
latest-user-agentsFetches and provides current user agent strings…
permissive · top 15,000 on PyPI
user-agentGenerates random, valid web user agent strings…
permissive · top 15,000 on PyPI
fake-http-headerGenerates realistic-looking HTTP request…
permissive · top 15,000 on PyPI
httpagentparserParses HTTP User-Agent strings to extract and…
unclear · top 15,000 on PyPI
browserforgeGenerates realistic browser headers and device…
permissive · top 5,000 on PyPI
ua-parser-rsProvides a Rust-accelerated user-agent parser…
permissive · top 5,000 on PyPI