latest-user-agents
Get the latest user agent strings for major browsers and OSs
What it is and what it does
latest-user-agents is a lightweight wrapper that retrieves current user agent strings for major browsers (Firefox, Chrome, Safari, Edge) across common operating systems (macOS, Windows, Linux). It exposes two main functions: get_latest_user_agents() returns a list of current user agent strings, and get_random_user_agent() picks one at random from that list.
The package depends on platformdirs and requests to fetch and cache agent data. It's useful for web scraping, API testing, or any scenario where you need realistic, up-to-date user agent headers. The library is marked Production/Stable and supports Python 3.9 through 3.13, though maintenance is dormant—the last release was over a year and a half ago, so agent strings may lag behind the newest browser versions.
Use it for:
- Web scraping: rotate realistic user agents to avoid detection and blocking
- API testing: simulate requests from different browsers and OS combinations
- Load testing: generate varied user agent headers for realistic traffic simulation
- Bot development: supply authentic-looking user agents to web automation scripts
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fetches and provides current user agent strings for major browsers and operating systems, with functions to retrieve the full list or select random agents.
Yes, if you need current user agent strings and can tolerate dormant maintenance. The package is simple, has no known vulnerabilities, and carries a permissive MIT license. However, verify that the agent data is fresh enough for your use case—567 days since the last release means browser versions in the list may be outdated. High install friction (two dependencies) is minor for most projects.
Install
latest-user-agents on PyPI
pip
pip install latest-user-agentsuv
uv add latest-user-agentspoetry
poetry add latest-user-agentsInstalling latest-user-agents
Before you install
High install friction due to two runtime dependencies (platformdirs, requests). Maintenance is dormant—last release was 567 days ago, though the repository remains active with a recent commit on 2025-01-24. No security vulnerabilities reported.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute freely with minimal restrictions.
Quickstart
pip install latest-user-agents
from latest_user_agents import get_latest_user_agents, get_random_user_agent
agents = get_latest_user_agents()
random_agent = get_random_user_agent()
Verify before relying
- How frequently user agent data is refreshed and whether it stays current with new browser releases
- Whether the package caches fetched agents locally or always queries fresh data
- Performance impact of network calls when retrieving user agents
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | 2 — platformdirs, requests |
| Maintenance | dormant — 567 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,409/month — #13,998 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: latest_user_agents-0.0.5.tar.gz
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
user-agentGenerates random, valid web user agent strings…
permissive · top 15,000 on PyPI
fake-useragentGenerates random or browser-specific user-agent…
permissive · top 5,000 on PyPI
ua-parserParses user-agent strings to extract browser,…
permissive · top 1,000 on PyPI
fake-headersGenerates realistic User-Agent strings and HTTP…
permissive · top 15,000 on PyPI
httpagentparserParses HTTP User-Agent strings to extract and…
unclear · top 15,000 on PyPI
ua-generatorGenerates realistic, randomized user-agent…
permissive · top 5,000 on PyPI
random-user-agentProvides random user agent strings filtered by…
permissive · top 15,000 on PyPI
fake-http-headerGenerates realistic-looking HTTP request…
permissive · top 15,000 on PyPI
device-detectorParses user agent strings and client hints to…
unclear · top 15,000 on PyPI
user-agentsParses browser user agent strings to identify…
permissive · top 5,000 on PyPI