{"id":48823250,"url":"https://github.com/nzrsky/useragent-generator","last_synced_at":"2026-04-14T16:02:37.783Z","repository":{"id":333308140,"uuid":"1136761387","full_name":"nzrsky/useragent-generator","owner":"nzrsky","description":"High-performance User-Agent generator for Go. Zero-alloc bots, auto-updated browser versions from real usage data.","archived":false,"fork":false,"pushed_at":"2026-04-10T04:01:54.000Z","size":25,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T06:07:05.320Z","etag":null,"topics":["bot","browser","crawler","go","golang","http","scraping","user-agent","useragent"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/nzrsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"nzrsky","ko_fi":"nazavtra","buy_me_a_coffee":"nazavtra"}},"created_at":"2026-01-18T10:00:13.000Z","updated_at":"2026-03-19T12:32:10.000Z","dependencies_parsed_at":"2026-03-12T06:04:28.506Z","dependency_job_id":"f4f354d9-8f76-407d-80ad-42136eb0594a","html_url":"https://github.com/nzrsky/useragent-generator","commit_stats":null,"previous_names":["nzrsky/useragent-generator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nzrsky/useragent-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2Fuseragent-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2Fuseragent-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2Fuseragent-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2Fuseragent-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nzrsky","download_url":"https://codeload.github.com/nzrsky/useragent-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2Fuseragent-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bot","browser","crawler","go","golang","http","scraping","user-agent","useragent"],"created_at":"2026-04-14T16:02:35.578Z","updated_at":"2026-04-14T16:02:37.768Z","avatar_url":"https://github.com/nzrsky.png","language":"Go","readme":"# useragent-generator\n\n[![CI](https://github.com/nzrsky/useragent-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/nzrsky/useragent-generator/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/nzrsky/useragent-generator/graph/badge.svg)](https://codecov.io/gh/nzrsky/useragent-generator)\n[![Go Reference](https://pkg.go.dev/badge/github.com/nzrsky/useragent-generator/pkg/useragent.svg)](https://pkg.go.dev/github.com/nzrsky/useragent-generator/pkg/useragent)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nzrsky/useragent-generator)](https://goreportcard.com/report/github.com/nzrsky/useragent-generator)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nHigh-performance User-Agent string generator for Go.\n\n## Features\n\n- **Auto-updated browser versions** from [Intoli](https://github.com/intoli/user-agents) real usage data\n- **Zero-alloc bot User-Agents** (~2ns per call)\n- **Fast browser UA generation** (~40ns, 1 alloc)\n- **Seed-based reproducibility** for testing\n- **xorshift64 PRNG** - faster than math/rand\n- Desktop: Chrome, Firefox, Safari, Edge\n- Mobile: iOS Safari, Android Chrome, WebView\n- Bots: Google, Bing, Yandex, Baidu, Facebook, Twitter, LinkedIn, SEO tools\n\n## Installation\n\n```bash\ngo get github.com/nzrsky/useragent-generator/pkg/useragent\n```\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    ua \"github.com/nzrsky/useragent-generator/pkg/useragent\"\n)\n\nfunc main() {\n    fmt.Println(ua.Chrome())\n    fmt.Println(ua.SafariIOS())\n    fmt.Println(ua.Googlebot())\n\n    fmt.Println(ua.Random())        // any type\n    fmt.Println(ua.RandomDesktop()) // desktop only\n    fmt.Println(ua.RandomMobile())  // mobile only\n}\n```\n\n## Reproducible Results\n\n```go\n// Set global seed for reproducibility\nua.Seed(12345)\nfmt.Println(ua.Chrome()) // always same result with same seed\n\n// Or create your own generator\ng := ua.WithSeed(12345)\nfmt.Println(g.Chrome())\nfmt.Println(g.Firefox())\n```\n\n## Available Functions\n\n### Desktop Browsers\n\n| Function | Description |\n|----------|-------------|\n| `Chrome()` | Chrome (random OS) |\n| `ChromeWindows()` | Chrome on Windows |\n| `ChromeMac()` | Chrome on macOS |\n| `ChromeLinux()` | Chrome on Linux |\n| `Firefox()` | Firefox (random OS) |\n| `FirefoxWindows()` | Firefox on Windows |\n| `FirefoxMac()` | Firefox on macOS |\n| `Safari()` | Safari on macOS |\n| `Edge()` | Edge (random OS) |\n| `EdgeWindows()` | Edge on Windows |\n\n### Mobile Browsers\n\n| Function | Description |\n|----------|-------------|\n| `SafariIOS()` | Safari on iPhone |\n| `SafariIPad()` | Safari on iPad |\n| `ChromeIOS()` | Chrome on iOS |\n| `ChromeAndroid()` | Chrome on Android |\n| `AndroidWebView()` | Android WebView |\n| `FirefoxAndroid()` | Firefox on Android |\n| `SamsungBrowser()` | Samsung Internet |\n| `EdgeAndroid()` | Edge on Android |\n\n### Bots (Zero-Allocation)\n\n| Function | Description |\n|----------|-------------|\n| `Googlebot()` | Google web crawler |\n| `GooglebotMobile()` | Google mobile crawler |\n| `Bingbot()` | Bing web crawler |\n| `BingbotMobile()` | Bing mobile crawler |\n| `YandexBot()` | Yandex crawler |\n| `YandexBotMobile()` | Yandex mobile crawler |\n| `Baiduspider()` | Baidu crawler |\n| `DuckDuckBot()` | DuckDuckGo crawler |\n| `FacebookBot()` | Facebook crawler |\n| `TwitterBot()` | Twitter crawler |\n| `LinkedInBot()` | LinkedIn crawler |\n| `SlackBot()` | Slack link preview |\n| `TelegramBot()` | Telegram link preview |\n| `DiscordBot()` | Discord link preview |\n| `WhatsAppBot()` | WhatsApp link preview |\n| `PinterestBot()` | Pinterest crawler |\n| `AhrefsBot()` | Ahrefs SEO crawler |\n| `SemrushBot()` | Semrush SEO crawler |\n| `MozBot()` | Moz SEO crawler |\n| `MajesticBot()` | Majestic SEO crawler |\n| `ScreamingFrogBot()` | Screaming Frog |\n| `SitebulbBot()` | Sitebulb crawler |\n\n### Utilities\n\n| Function | Description |\n|----------|-------------|\n| `Random()` | Random UA (any type) |\n| `RandomDesktop()` | Random desktop browser |\n| `RandomMobile()` | Random mobile browser |\n| `RandomBot()` | Random bot |\n| `Seed(uint64)` | Set global generator seed\n\n## Performance\n\nBenchmarks on Apple M3 Max:\n\n```\nBenchmarkGooglebot          644734208    1.780 ns/op    0 B/op    0 allocs/op\nBenchmarkChrome              30398343   38.90 ns/op  192 B/op    1 allocs/op\nBenchmarkFirefox             36187087   32.63 ns/op  128 B/op    1 allocs/op\nBenchmarkSafariIOS           32038802   34.46 ns/op  192 B/op    1 allocs/op\nBenchmarkChromeAndroid       25472996   46.88 ns/op  224 B/op    1 allocs/op\nBenchmarkRandom              29923258   39.43 ns/op  129 B/op    0 allocs/op\n```\n\n## Example Output\n\n```\nChrome (Windows):\nMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.6778.85 Safari/537.36\n\nSafari iOS:\nMozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Mobile/15E148 Safari/605.1.15\n\nGooglebot:\nMozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file.\n","funding_links":["https://github.com/sponsors/nzrsky","https://ko-fi.com/nazavtra","https://buymeacoffee.com/nazavtra"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzrsky%2Fuseragent-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnzrsky%2Fuseragent-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzrsky%2Fuseragent-generator/lists"}