skillfed

latest-user-agents

Get the latest user agent strings for major browsers and OSs

latest-user-agents v0.0.5 84.4K downloads/30d#13,998 on PyPI29
Permissive license DORMANT released

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

uv

uv add latest-user-agents

poetry

poetry add latest-user-agents

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming 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/HTTP

Tags

user agent stringsbrowser user agentslatest user agentsrandom user agentuser agent generatorweb scraping headershttp user agent
web-scrapinguser-agentshttp-headers

More WWW/HTTP packages

Further reading