{"id":13658129,"url":"https://github.com/hfreire/random-http-useragent","last_synced_at":"2025-03-15T12:30:31.859Z","repository":{"id":16966452,"uuid":"80937171","full_name":"hfreire/random-http-useragent","owner":"hfreire","description":"Get a random and legit user-agent :shipit: for your HTTP client","archived":false,"fork":false,"pushed_at":"2024-09-07T08:09:42.000Z","size":2230,"stargazers_count":11,"open_issues_count":19,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T01:29:12.829Z","etag":null,"topics":["github-actions","http","http-client","http-server","http-user-agent","random","random-generation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hfreire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"hfreire","custom":"https://paypal.me/hfreire"}},"created_at":"2017-02-04T17:56:04.000Z","updated_at":"2024-12-10T04:00:25.000Z","dependencies_parsed_at":"2023-02-10T07:35:13.798Z","dependency_job_id":null,"html_url":"https://github.com/hfreire/random-http-useragent","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfreire%2Frandom-http-useragent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfreire%2Frandom-http-useragent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfreire%2Frandom-http-useragent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfreire%2Frandom-http-useragent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hfreire","download_url":"https://codeload.github.com/hfreire/random-http-useragent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243730865,"owners_count":20338729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","http","http-client","http-server","http-user-agent","random","random-generation"],"created_at":"2024-08-02T05:00:56.598Z","updated_at":"2025-03-15T12:30:31.554Z","avatar_url":"https://github.com/hfreire.png","language":"JavaScript","funding_links":["https://github.com/sponsors/hfreire","https://paypal.me/hfreire","https://paypal.me/hfreire/5"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Get a random and legit user-agent :shipit: for your HTTP client\n\n[![](https://github.com/hfreire/random-http-useragent/workflows/ci/badge.svg)](https://github.com/hfreire/random-http-useragent/actions?workflow=ci)\n[![Coverage Status](https://coveralls.io/repos/github/hfreire/random-http-useragent/badge.svg?branch=master)](https://coveralls.io/github/hfreire/random-http-useragent?branch=master)\n[![Known Vulnerabilities](https://snyk.io/test/github/hfreire/random-http-useragent/badge.svg)](https://snyk.io/test/github/hfreire/random-http-useragent)\n[![](https://img.shields.io/github/release/hfreire/random-http-useragent.svg)](https://github.com/hfreire/random-http-useragent/releases)\n[![Version](https://img.shields.io/npm/v/random-http-useragent.svg)](https://www.npmjs.com/package/random-http-useragent)\n[![Downloads](https://img.shields.io/npm/dt/random-http-useragent.svg)](https://www.npmjs.com/package/random-http-useragent)\n\n\u003e Stores and randomly accesses a HTTP user agent from an available list of user agents in disk.\n\n### Features\n* Randomly :zap: pick between 899 unique user agents :white_check_mark:\n* HTTP user agents are stored :floppy_disk: in a disk file to avoid filling up your app's memory space :white_check_mark:\n* File disk reads are optimized :running: to only read as much as needed :white_check_mark:\n* Cache results using [memoizee](https://github.com/medikoo/memoizee) :white_check_mark:\n* Supports [Bluebird](https://github.com/petkaantonov/bluebird) :bird: promises :white_check_mark:\n\n### How to install\n```\nnpm install random-http-useragent -g\n```\n\n### How to use\n\n#### Use it in your terminal\n```\nrandom-http-useragent\n```\n\n#### Use it in your app\nGet a random user agent\n```javascript\nconst RandomHttpUserAgent = require('random-http-useragent')\n\nRandomHttpUserAgent.get()\n  .then((userAgent) =\u003e console.log(userAgent))\n  .catch((error) =\u003e console.error(error.message))\n```\n\nCache returned user agents for 2 minutes\n```javascript\nconst RandomHttpUserAgent = require('random-http-useragent')\n\nRandomHttpUserAgent.configure({ memoizee: { maxAge: 120000 } })\n\nRandomHttpUserAgent.get()\n  .then((userAgent) =\u003e console.log(userAgent))\n  .catch((error) =\u003e console.error(error.message))\n```\n\n### How to contribute\nYou can contribute either with code (e.g., new features, bug fixes and documentation) or by [donating 5 EUR](https://paypal.me/hfreire/5). You can read the [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute with code.\n\nAll donation proceedings will go to the [Sverige för UNHCR](https://sverigeforunhcr.se), a swedish partner of the [UNHCR - The UN Refugee Agency](http://www.unhcr.org), a global organisation dedicated to saving lives, protecting rights and building a better future for refugees, forcibly displaced communities and stateless people.\n\n### Used by\n* [request-on-steroids](https://github.com/hfreire/request-on-steroids) - An HTTP client :sparkles: with retry, circuit-breaker and tor support :package: out-of-the-box\n* [facebook-login-for-robots](https://github.com/hfreire/facebook-login-for-robots) - Facebook Login for 🤖 robots\n* [browser-as-a-service](https://github.com/hfreire/browser-as-a-service) - A web browser :earth_americas: hosted as a service, to render your JavaScript web pages as HTML\n* [pollmommy](https://github.com/hfreire/pollmommy) - ⭐️ Hack your 🙈 vote out of 📈 Polldaddy surveys - used by 💰 BBC, Microsoft, Forbes, Pfizer, IBM\n\n### License\nRead the [license](./LICENSE.md) for permissions and limitations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfreire%2Frandom-http-useragent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhfreire%2Frandom-http-useragent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfreire%2Frandom-http-useragent/lists"}