skillfed

fake-useragent

Up-to-date simple useragent faker with real world database

fake-useragent v2.2.0 10.9M downloads/30d#1,427 on PyPI4,054
Permissive license Apache-2.0 Abandoned released

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-useragent

uv

uv add fake-useragent

poetry

poetry add fake-useragent

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

random user agent generatorfake useragent stringsbrowser user agent fakeruser agent spoofingmock browser identificationuseragent databaseuser agent rotation
web-scrapingtestinguser-agent

More Software Development packages

Further reading