Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x.com/llms.txt

Use this file to discover all available pages before exploring further.

llms.txt — A structured index of all documentation pages (titles, URLs, short descriptions). Gives AI tools a map of what’s 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 your documentation structure and find relevant content — similar to how sitemap.xml helps search engines.
FileWhat it containsBest for
llms.txtCurated root index + 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 + 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 & model referencesPython and TypeScript/JavaScript developers
llms-full.txtEntire docs as one Markdown fileMaximum context for deep reasoning
These files (plus section-specific indexes under /x-api/llms.txt, /enterprise-api/llms.txt, /x-ads-api/llms.txt, and the XDKs) are available at the root and under /.well-known/. Every documentation page supports the .md suffix for clean Markdown (example: https://docs.x.com/x-api/posts/get-post-by-id.md).

How to use it

Strongly recommended for agents: Start by reading AGENTS.md (or AGENT.md) for explicit usage guidance. Most AI tools accept URLs directly. Just provide the URL and the tool will fetch and parse 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 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
curl https://docs.x.com/tools/llms-txt.md