Appearance
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
| File | What it contains | Best for |
|---|---|---|
llms.txt | Curated root index plus links to section indexes | Quick overview and agent entry point |
x-api/llms.txt | 370+ X API v2 reference pages | Posts, Users, DMs, Streams, Compliance, etc. |
enterprise-api/llms.txt | Enterprise, Account Activity, GNIP, Webhooks | Historical and real-time enterprise data |
x-ads-api/llms.txt | Ads API (campaigns, creatives, audiences, analytics) | Advertising and measurement |
xdks/python/llms.txt + xdks/typescript/llms.txt | Full SDK client and model references | Python and TypeScript/JavaScript developers |
llms-full.txt | The entire docs as one Markdown file | Maximum 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.txtinto the chat and ask questions about the X API - Cursor / Windsurf: add
https://docs.x.com/llms-full.txtas 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.mdChoosing 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]