Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmitrizzle/disallow-ai
Maintained robots.txt disallow list for known AI scraper tools
https://github.com/dmitrizzle/disallow-ai
Last synced: 10 days ago
JSON representation
Maintained robots.txt disallow list for known AI scraper tools
- Host: GitHub
- URL: https://github.com/dmitrizzle/disallow-ai
- Owner: dmitrizzle
- License: mit
- Created: 2024-03-06T01:26:47.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-29T02:46:59.000Z (10 months ago)
- Last Synced: 2024-12-14T18:22:01.976Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 85 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Opt your web properties out from known AI scraper tools.
`yarn add disallow-ai` or `npm i disallow-ai`
This is an opinionated, maintained list of known user agents of scraper bots that use web content to train AI models.
This package is intended to help webmasters automatically opt out of training AI/machine learning models with the content of a property. Its intention is to remain visible for search engines and productivity tools. It's optimized for Node.js servers (e.x., Express/Next.js) but you can also copy-paste contents from [`src/robots.txt`](/src/robots.txt) directly into your `robots.txt` file on any web server.
### API.
- `printRobotsTXT(options)` prints text string for `robots.txt` (same content as the above snippet).
- `options.path` if you want to set a disallow path to something other than `/`, you'll need to pass a value to this key.
- `userAgents` is a direct reference to an array of objects with all the user agent info.#### Example.
```javascript
const express = require("express");
const server = express();const { printRobotsTXT } = require("disallow-ai");
server.get("/robots.txt", (req, res, next) => {
res.type("text/plain");
res.send(printRobotsTXT());
});server.listen();
```
You can run an example server with `node ./example/server.js`.### Sources.
https://darkvisitors.com/Contributions welcome.