Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

disallow-ai

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disallow-ai

Opt your web properties out from known AI scraper tools.

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

robots.txt snippet.

Opt your web properties out from known AI scraper tools.

NPM package.

yarn add disallow-ai or npm i disallow-ai

See below for API.

What is this?

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 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.
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();

Sources

https://darkvisitors.com/

Contributions welcome.

FAQs

Package last updated on 06 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc