Dev.to AI 🤖 Ai 👁 0 📖 2 min read

How to Audit Any Website for AI Search (llms.txt & GPTBot/ClaudeBot robots.txt) via API

In 2026, ranking in Google is only half the story. Developers, buyers, and founders increasingly discover tools through ChatGPT Search, Claude, Perplexity, and AI coding agents. Yet most websites accidentally block AI c

In 2026, ranking in Google is only half the story. Developers, buyers, and founders increasingly discover tools through ChatGPT Search, Claude, Perplexity, and AI coding agents.

Yet most websites accidentally block AI crawlers in robots.txt or fail to publish an /llms.txt file that helps language models index their documentation cleanly.

If you run an SEO agency, a GEO (Generative Engine Optimization) tool, or a B2B SaaS growth team, auditing hundreds of client or competitor domains manually is slow. Here is how to run an automated AI-Readiness & llms.txt Audit in one HTTP call.

What Makes a Site AI-Ready?

A fast, technical AI-Readiness audit checks four signals simultaneously:

  1. /llms.txt & /llms-full.txt Presence: Verifies real Markdown/plain-text files (filtering out soft-404 HTML fallback pages) and extracts the title, character length, and link count.
  2. 12 Major AI Crawler Rules in robots.txt: Parses exact allow/block directives for GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-Web, anthropic-ai, PerplexityBot, Google-Extended, CCBot, Meta-ExternalAgent, Bytespider, and Applebot-Extended.
  3. XML Sitemap Discovery: Checks /sitemap.xml plus all Sitemap: directives declared inside robots.txt.
  4. 0 to 100 AI-Readiness Score: Returns a weighted score plus concrete recommendations you can embed directly in client reports.

Audit Any Domain in 10 Lines of TypeScript

const RAPIDAPI_KEY = process.env.RAPIDAPI_KEY!;

async function auditAiReadiness(url: string) {
  const res = await fetch(
    `https://ai-readiness-llms-txt-ai-bot-robots-txt-auditor-api.p.rapidapi.com/api/ai-readiness?url=${encodeURIComponent(url)}`,
    {
      headers: {
        'x-rapidapi-key': RAPIDAPI_KEY,
        'x-rapidapi-host': 'ai-readiness-llms-txt-ai-bot-robots-txt-auditor-api.p.rapidapi.com',
      },
    }
  );
  return res.json();
}

const report = await auditAiReadiness('https://stripe.com');
console.log({
  score: report.aiReadinessScore,
  hasLlmsTxt: report.llmsTxt.present,
  botsAllowed: report.robotsTxt.aiBotsAllowed,
  botsBlocked: report.robotsTxt.aiBotsBlocked,
});

Bulk-Auditing Hundreds of Domains for Agencies

If you need to audit a spreadsheet of 500 prospect domains for outbound GEO prospecting or agency lead generation, you can run the batch Apify Actor directly (HTTP-first, 128 to 512 MB RAM, no headless browser compute costs):

Give Your AI Agent Direct Access (MCP Server)

You can also wire this auditor (along with 5 other B2B & RAG endpoints) straight into Claude Desktop, Cursor, or Windsurf using our open-source MCP Server:

Try It Free Across Any Marketplace

Need a custom GEO auditing dashboard, private data pipeline, or AI workflow built for your team? Book a fixed-price sprint on Contra: https://contra.com/julian_roberts_fvzgvg6y/work

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.