> ## 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 & llms-full.txt

> Machine-readable documentation files that let AI tools index and understand X API documentation

**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](https://llmstxt.org) 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.

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

```bash theme={null}
# 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
```
