Skip to content

llms.txt & llms-full.txt Fresh

Two machine-readable documentation files give AI tools structured access to the X API docs.

  • llms.txt - a structured index of all documentation pages (titles, URLs, short descriptions). Gives AI tools a map of what is available.
  • llms-full.txt - the complete documentation in a single Markdown file for maximum context.

The llms.txt standard is like a sitemap for AI. It helps LLMs understand documentation structure and find relevant content - similar to how sitemap.xml helps search engines.

The file family

FileWhat it containsBest for
llms.txtCurated root index plus links to section indexesQuick overview and agent entry point
x-api/llms.txt370+ X API v2 reference pagesPosts, Users, DMs, Streams, Compliance, etc.
enterprise-api/llms.txtEnterprise, Account Activity, GNIP, WebhooksHistorical and real-time enterprise data
x-ads-api/llms.txtAds API (campaigns, creatives, audiences, analytics)Advertising and measurement
xdks/python/llms.txt + xdks/typescript/llms.txtFull SDK client and model referencesPython and TypeScript/JavaScript developers
llms-full.txtThe entire docs as one Markdown fileMaximum context for deep reasoning

These files (plus the section-specific indexes) are available at the root and under /.well-known/. Every documentation page supports the .md suffix for clean Markdown - for example, a post-lookup reference page is retrievable by appending .md to its URL.

How to use it

Start with AGENTS.md

For agents, read AGENTS.md first for explicit usage guidance, then use the files below.

Most AI tools accept URLs directly - provide the URL and the tool fetches and parses the content:

  • Grok: paste https://docs.x.com/llms-full.txt into the chat and ask questions about the X API
  • Cursor / Windsurf: add https://docs.x.com/llms-full.txt as documentation context for your project
  • Custom agents: fetch the file programmatically and include it in your system prompt or context window

Fetch recipes

bash
# Fetch the documentation index
curl https://docs.x.com/llms.txt

# Fetch the complete documentation
curl https://docs.x.com/llms-full.txt

# Fetch any individual page as Markdown (append .md)
curl https://docs.x.com/tools/llms-txt.md

Choosing between them

flowchart TD
    Q{What does the agent need?} -->|A map of the docs| A[llms.txt]
    Q -->|One specific page| B[Append .md to the page URL]
    Q -->|A whole section| C[Section llms.txt e.g. x-api/llms.txt]
    Q -->|Everything, deep reasoning| D[llms-full.txt]

See also