{"id":18535293,"url":"https://github.com/tinyhttp/bot-detector","last_synced_at":"2025-08-14T07:44:04.390Z","repository":{"id":107762482,"uuid":"379643764","full_name":"tinyhttp/bot-detector","owner":"tinyhttp","description":"🤖 Bot detector for Node.js","archived":false,"fork":false,"pushed_at":"2024-01-04T11:09:07.000Z","size":92,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-17T16:58:46.494Z","etag":null,"topics":["antispam","bot-detector","esm","middleware","nodejs","nodejs-library","nodejs-middleware"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tinyhttp.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},"funding":{"ko_fi":"v1rtl","liberapay":"v1rtl","custom":["https://stakes.social/0x14308514785B216904a41aB817282d25425Cce39","https://paypal.me/v1rtl","https://qiwi.com/n/V1RTL","https://yoomoney.ru/to/410014774355272"],"issuehunt":"talentlessguy"}},"created_at":"2021-06-23T15:10:01.000Z","updated_at":"2025-03-09T17:46:34.000Z","dependencies_parsed_at":"2024-01-04T12:26:12.317Z","dependency_job_id":"624fec9d-7d41-4947-9d7b-fb37ae1e63fe","html_url":"https://github.com/tinyhttp/bot-detector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tinyhttp/bot-detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Fbot-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Fbot-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Fbot-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Fbot-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinyhttp","download_url":"https://codeload.github.com/tinyhttp/bot-detector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Fbot-detector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385016,"owners_count":24574537,"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","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["antispam","bot-detector","esm","middleware","nodejs","nodejs-library","nodejs-middleware"],"created_at":"2024-11-06T19:21:55.940Z","updated_at":"2025-08-14T07:44:04.351Z","avatar_url":"https://github.com/tinyhttp.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# @tinyhttp/bot-detector\n\n[![npm (scoped)][npm-badge]](https://npmjs.com/package/@tinyhttp/bot-detector) \n  [![npm][dl-badge]](https://npmjs.com/package/@tinyhttp/bot-detector) \n [![GitHub Workflow Status][gh-actions-img]][github-actions]\n  [![Coverage](https://img.shields.io/codacy/coverage/695e11b4f70f4e98893e0a031d2fee62?style=for-the-badge\u0026color=hotpink)][codacy-url] \n  [![Codacy grade](https://img.shields.io/codacy/grade/695e11b4f70f4e98893e0a031d2fee62?style=for-the-badge\u0026logo=codacy\u0026label=codacy\u0026color=hotpink)][codacy-url] [![](https://img.shields.io/badge/donate-DEV-hotpink?style=for-the-badge)](https://stakes.social/0x14308514785B216904a41aB817282d25425Cce39)\n\n\u003c/div\u003e\n\nBot detector middleware for Node.js based on [isbot](https://github.com/omrilotan/isbot).\n\nNote that it only shows if a request comes from a bot (e.g. crawler) or from a real human.\n\n## Install\n\n```sh\npnpm i @tinyhttp/bot-detector\n```\n\n## Examples\n\n### Vanilla\n\n```ts\nimport { createServer } from 'http'\nimport { botDetector, RequestWithBotDetector } from '@tinyhttp/bot-detector'\n\ncreateServer((req, res) =\u003e {\n  botDetector(req as RequestWithBotDetector, res, () =\u003e {\n    res.send((req as RequestWithBotDetector).isBot ? `Bot detected 🤖: ${req.botName}` : 'Hello World!')\n  })\n}).listen(3000)\n```\n\n### tinyhttp\n\n```ts\nimport { App } from '@tinyhttp/app'\nimport { botDetector, RequestWithBotDetector } from '@tinyhttp/bot-detector'\n\nnew App\u003cany, RequestWithBotDetector\u003e()\n  .use(botDetector())\n  .use((req, res) =\u003e {\n    res.send(req.isBot ? `Bot detected 🤖: ${req.botName}` : 'Hello World!')\n  })\n  .listen(3000)\n```\n\n[npm-badge]: https://img.shields.io/npm/v/@tinyhttp/bot-detector?style=for-the-badge\u0026color=hotpink\u0026logo=npm\u0026label=\n[dl-badge]: https://img.shields.io/npm/dt/@tinyhttp/bot-detector?style=for-the-badge\u0026color=hotpink\n[github-actions]: https://github.com/tinyhttp/bot-detector/actions\n[gh-actions-img]: https://img.shields.io/github/actions/workflow/status/tinyhttp/bot-detector/main.yml?branch=master\u0026style=for-the-badge\u0026logo=github\u0026label=\u0026color=hotpink\n[codacy-url]: https://www.codacy.com/manual/tinyhttp/bot-detector\n","funding_links":["https://ko-fi.com/v1rtl","https://liberapay.com/v1rtl","https://stakes.social/0x14308514785B216904a41aB817282d25425Cce39","https://paypal.me/v1rtl","https://qiwi.com/n/V1RTL","https://yoomoney.ru/to/410014774355272","https://issuehunt.io/r/talentlessguy"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyhttp%2Fbot-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinyhttp%2Fbot-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyhttp%2Fbot-detector/lists"}