Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/microlinkhq/top-user-agents

An always up-to-date list of the top 100 HTTP user-agents most used over the Internet.
https://github.com/microlinkhq/top-user-agents

user-agent user-agent-string user-agents

Last synced: 3 months ago
JSON representation

An always up-to-date list of the top 100 HTTP user-agents most used over the Internet.

Lists

README

        


microlink logo
microlink logo

![Last version](https://img.shields.io/github/tag/microlinkhq/top-user-agents.svg?style=flat-square)
[![NPM Status](https://img.shields.io/npm/dm/top-user-agents.svg?style=flat-square)](https://www.npmjs.org/package/top-user-agents)

> An always up-to-date list of the top 100 HTTP [user-agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent)'s most used over the Internet.

**Download**: [All](https://cdn.jsdelivr.net/gh/microlinkhq/top-user-agents@master/src/index.json) / [Desktop](https://cdn.jsdelivr.net/gh/microlinkhq/top-user-agents@master/src/desktop.json) / [Mobile](https://cdn.jsdelivr.net/gh/microlinkhq/top-user-agents@master/src/mobile.json)

## Background

There are some scenarios where you need to perform browser-like requests, meaning you need to use an HTTP `user-agent` as much accurate as possible with the real world™️.

![](/stats.png)

You can find many list of browser user agents on the Internet, but they are outdated or quickly unmaintained.

This list is created collecting user agent from [microlink.io](https://microlink.io) products, that receives [+300M requests every month](https://analytics.microlink.io/).

## Install

```bash
$ npm install top-user-agents --save
```

## Usage

```js
const uniqueRandomArray = require('unique-random-array')
const userAgents = require('top-user-agents')

const randomUserAgent = uniqueRandomArray(userAgents)

console.log(randomUserAgent())
// => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36'
```

You can also `require('top-user-agents/mobile')` or `require('top-user-agents/desktop')` to get the list based on the device.

## About Privacy

The information exposed to the user-agent only relies on coarse details.

In practice, anyone can put whatever they want in the user-agent string, and send it to the web server.

Because that, The user-agent cannot be sufficient condition to identify or reproduce the original request.

## Related

- [https-tls](https://github.com/Kikobeats/https-tls) – Setup TLS details according to `user-agent`.
- [top-crawler-agents](https://github.com/Kikobeats/top-crawler-agents) – A list of common crawler user agents useful for retrieving metadata from links.
- [@microlink/ua](https://github.com/microlinkhq/ua) – A simple redis primitives to incr() and top() user agents.

## License

**top-user-agents** © [microlink.io](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/top-user-agents/blob/master/LICENSE.md) License.

Authored and maintained by [Kiko Beats](https://kikobeats.com) with help from [contributors](https://github.com/microlinkhq/top-user-agents/contributors).

> [microlink.io](https://microlink.io) · GitHub [microlink.io](https://github.com/microlinkhq) · Twitter [@microlinkhq](https://twitter.com/microlinkhq)