# llms.txt Generator (Create llms.txt for Any Website) (`pagecraft/llms-txt-generator`) Actor

Generate a ready-to-upload llms.txt (and optional llms-full.txt) for any website from its sitemap and key pages, so ChatGPT, Claude and Perplexity understand and cite it. Bulk domains, no browser.

- **URL**: https://apify.com/pagecraft/llms-txt-generator.md
- **Developed by:** [Pagecraft Tools](https://apify.com/pagecraft) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $22.00 / 1,000 llms.txt generateds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## llms.txt Generator: Create llms.txt for Any Website

Generate a **ready-to-upload llms.txt file** for any website in seconds, plus an optional **llms-full.txt**. llms.txt is the emerging standard ([llmstxt.org](https://llmstxt.org)) that tells AI assistants such as ChatGPT, Claude, Perplexity and Gemini what a site is about and which pages matter, so they can understand it and cite it.

### How it works

1. Reads the site's sitemap and home page links.
2. Picks the most useful pages (product, pricing, docs, company, then blog), skipping logins, tag pages and duplicates.
3. Writes each page's title and a one-line description.
4. Produces a valid llms.txt: `# Name`, a `> summary`, then `## Sections` of links, with legal pages under `## Optional`.

You get the file as text in the results and as a **direct download link**, ready to upload to `yoursite.com/llms.txt`.

### Example output

```markdown
## Acme

> Acme makes invoicing software for small businesses.

### Product

- [Features](https://acme.com/features): Invoices, reminders and payments in one place.
- [Integrations](https://acme.com/integrations): Connect Xero, QuickBooks and Stripe.

### Pricing

- [Pricing](https://acme.com/pricing): Plans from £9 a month.

### Optional

- [Privacy policy](https://acme.com/privacy): How Acme handles your data.
```

### Who it's for

Website owners, SEO and marketing agencies (generate files for every client in one run), and developers adding AI visibility to sites. Pairs well with our **AI Agent Readiness Audit**.

### Input

- **Domains or URLs** (one per line)
- **Pages per website** (5 to 50, default 30)
- **Also create llms-full.txt** with the main text of each listed page

### Pricing

Pay per website. See the **Pricing** tab. Websites that fail or block us cost a flat $0.001 each, because they still use server time. Set **Maximum cost per run** to cap your spend. Residential proxies are not supported.

| Event | When it is charged | Price per 1,000 (Free / Bronze / Silver / Gold plan) |
| --- | --- | --- |
| llms.txt generated | Each website with an llms.txt generated. | $30 / $27 / $25 / $22 |
| Website failed | A website that could not be reached or blocked us (it still uses server time). | $1.50 on every plan |

### Notes

The file is generated from the site's public pages and is a strong first draft: review it before publishing. Each result also tells you whether the site already has an llms.txt.

# Actor input Schema

## `domains` (type: `array`):

Company domains (acme.com), URLs, or even email addresses (the domain is used). One per line; duplicates are removed.

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

How many key pages to list. The most useful pages (product, pricing, docs, company) are picked first.

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

Also build llms-full.txt with the main text of every listed page in one Markdown file.

## `timeoutSecs` (type: `integer`):

Give up on a website after this long.

## `maxRetries` (type: `integer`):

Retry a website once if it fails quickly (for example blocked, then retried through a new proxy IP). Slow failures are not retried.

## `proxyConfiguration` (type: `object`):

Optional. Use Apify datacenter proxies or your own proxies for websites that block automated requests.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "stripe.com",
    "bbc.co.uk"
  ],
  "maxPages": 30,
  "includeFullText": false,
  "timeoutSecs": 30,
  "maxRetries": 1
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "domains": [
        "apify.com",
        "stripe.com",
        "bbc.co.uk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pagecraft/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 = { "domains": [
        "apify.com",
        "stripe.com",
        "bbc.co.uk",
    ] }

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

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

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

```

## CLI example

```bash
echo '{
  "domains": [
    "apify.com",
    "stripe.com",
    "bbc.co.uk"
  ]
}' |
apify call pagecraft/llms-txt-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pagecraft/llms-txt-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/MfxEG63DfwcUrgANk/builds/JPWmEqoMKuEjKySnK/openapi.json
