# llms.txt Generator: Make Any Website LLM-Ready (`f0rty7even/llms-txt-generator`) Actor

Crawl a website and generate an llms.txt file (the emerging standard that helps LLMs and AI agents understand your site). Optionally build llms-full.txt with full page content. Output saved to the key-value store.

- **URL**: https://apify.com/f0rty7even/llms-txt-generator.md
- **Developed by:** [Michael Yousrie](https://apify.com/f0rty7even) (community)
- **Categories:** AI, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 page processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## llms.txt Generator — Make Any Website LLM-Ready

**Generate an `llms.txt` for any website in one click.** `llms.txt` is the emerging standard (llmstxt.org) — think "robots.txt for LLMs" — a clean Markdown map that helps ChatGPT, Claude, and AI agents understand and navigate your site. This actor crawls a site and builds that file for you, plus an optional **`llms-full.txt`** containing every page's full clean content.

No more hand-writing llms.txt. Point it at a homepage and download the result.

### What it does

- **Crawls your site** (same-domain, depth- and page-limited) and extracts each page's title and description.
- **Builds `llms.txt`** — an H1 site name, a summary blockquote, and a linked, described page index in the standard format.
- **Optional `llms-full.txt`** — concatenates every page's full content (clean Markdown) for full-context ingestion.
- **Downloadable output** — the files are saved to the run's key-value store; the page inventory goes to the dataset.

### Use cases

- **Make your site AI-friendly** — publish `llms.txt` so LLMs cite and use your content accurately.
- **RAG ingestion** — `llms-full.txt` is a single clean corpus of your whole site.
- **SEO/AEO** — get ahead of AI-search (answer-engine optimization) with a machine-readable site map.
- **Agencies** — generate llms.txt for every client site in seconds.

### Input

| Field | Description |
|---|---|
| `startUrls` | The site to process (usually the homepage). |
| `maxPages` | Cap on pages crawled and listed (main cost lever). |
| `maxDepth` | How many link-hops to follow. |
| `onlySameDomain` | Keep the crawl on the start URL's domain. |
| `includeFullText` | Also build `llms-full.txt` with full page content. |

### Output

- **Key-value store:** `llms.txt` (always) and `llms-full.txt` (if enabled) — ready to download and drop at your site root.
- **Dataset:** one record per crawled page (`url`, `title`, `description`) — the inventory used to build the file.

Example `llms.txt`:

```markdown
## Apify Documentation

> Check the performance of your Actors, validate data quality, and receive alerts.

### Pages

- [Apify Documentation](https://docs.apify.com): Learn how to build, run, and scale Actors.
- [Academy](https://docs.apify.com/academy): Free web scraping and automation courses.
```

### Pricing

Pay-per-result: charged **per page crawled** — no monthly fee, no charge if the site can't be crawled.

### Notes

- Works on **server-rendered HTML** (the content crawlers see first). JavaScript-only content is on the roadmap.
- Crawls **public pages** only — it does not log in or bypass access controls.

### FAQ

**What is llms.txt?** A proposed standard file that gives LLMs a curated, Markdown overview of your site — see llmstxt.org.

**Difference between the two files?** `llms.txt` is a concise link index; `llms-full.txt` includes the full text of every page.

**Where do I put the file?** At your site root: `https://yoursite.com/llms.txt`.

# Actor input Schema

## `startUrls` (type: `array`):

The site(s) to generate an llms.txt for — usually the homepage. Crawling starts here.

## `maxPages` (type: `integer`):

Hard cap on pages crawled and listed (main cost lever).

## `maxDepth` (type: `integer`):

How many link-hops from the start URL to follow.

## `onlySameDomain` (type: `boolean`):

Only follow links on the same registered domain as the start URL.

## `includeFullText` (type: `boolean`):

In addition to llms.txt (a link index), build llms-full.txt with each page's full clean content concatenated.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://docs.apify.com"
    }
  ],
  "maxPages": 50,
  "maxDepth": 3,
  "onlySameDomain": true,
  "includeFullText": false
}
```

# Actor output Schema

## `pages` (type: `string`):

The page inventory used to build llms.txt. The final llms.txt file is in the key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://docs.apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("f0rty7even/llms-txt-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [{ "url": "https://docs.apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("f0rty7even/llms-txt-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://docs.apify.com"
    }
  ]
}' |
apify call f0rty7even/llms-txt-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=f0rty7even/llms-txt-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/ftjiNYWfmdhzqnfJW/builds/VKbL6szrFIN8KZq1k/openapi.json
