# llms.txt Generator (`exalted_mud_vjz/llms-txt-generator`) Actor

Generate a ready to publish llms.txt file for any website, the emerging standard that tells AI assistants what your site is about and which pages matter.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

Generate a ready to publish llms.txt file for any website in one run.

llms.txt is the emerging standard ([llmstxt.org](https://llmstxt.org)) that gives AI assistants a curated, machine readable map of your site, what it is about and which pages matter. Sites that publish one are easier for AI tools to understand, quote, and recommend. Most sites do not have one yet.

### What this actor does

1. Fetches your homepage and sitemap.
2. Visits your key pages and reads each page's title and description.
3. Organizes them into sensible sections (Products and services, Docs, Blog, Company).
4. Produces a complete llms.txt file, ready to upload to the root of your website.

### What you get

- The full llms.txt content in the dataset, one row per website
- A downloadable llms.txt file in the run's key value store
- A page count so you can see what was included

### How to use

1. Enter one or more website URLs.
2. Optionally set how many pages to include (default 30).
3. Run the actor, then upload the generated file to your site at /llms.txt

### Who this is for

- Site owners who want to show up correctly in AI answers
- Agencies rolling out llms.txt across client sites
- Anyone whose AI readiness audit flagged a missing llms.txt

### Related

Not sure if you need one? Run the [AI Agent Readiness Audit](https://apify.com/exalted_mud_vjz/agent-readiness-audit) first, it checks for llms.txt and eight other AI readiness signals and gives your site a score out of 100.

# Actor input Schema

## `websites` (type: `array`):

One or more website URLs or domains to generate an llms.txt for, for example example.com

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

How many pages from the site to describe in the generated file

## Actor input object example

```json
{
  "websites": [
    "example.com"
  ],
  "maxPages": 30
}
```

# 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 = {
    "websites": [
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("exalted_mud_vjz/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 = { "websites": ["example.com"] }

# Run the Actor and wait for it to finish
run = client.actor("exalted_mud_vjz/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 '{
  "websites": [
    "example.com"
  ]
}' |
apify call exalted_mud_vjz/llms-txt-generator --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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