Skip to content

Commit 0a0c812

Browse files
committed
Restore docs pages missing after Chat overlay from main
The xchat-docs branch was missing ~500 files from main (including developer-guidelines and most enterprise/X API MDX), so Mintlify nav targets 404'd. Re-checkout every path that existed on main but not on this branch; keep existing Chat/xchat edits untouched.
1 parent 4018892 commit 0a0c812

505 files changed

Lines changed: 71480 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.well-known/llms.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# X Developer Platform
2+
3+
> Build, analyze, and innovate with X's real-time, global data and APIs. Comprehensive documentation for the X API v2, Ads API, Enterprise APIs (Account Activity, X Activity, GNIP/PowerTrack), official SDKs, tutorials, and AI-agent tools (llms.txt, skill.md, MCP).
4+
5+
## Start Here
6+
7+
- [Overview](https://docs.x.com/overview.md): Introduction to the X Developer Platform
8+
- [Getting Access & First Request](https://docs.x.com/make-your-first-request.md): Quickstart for new developers
9+
- [What to Build](https://docs.x.com/what-to-build.md): Use-case ideas and inspiration
10+
- [Developer Guidelines & Policies](https://docs.x.com/developer-guidelines.md): Rules for building responsibly
11+
- [AI & Agent Resources](https://docs.x.com/tools/ai.md): llms.txt, skill.md, MCP, and Grok/Cursor integration
12+
13+
## Major Documentation Areas (Nested Indexes)
14+
15+
- [X API v2 — Full Index](https://docs.x.com/x-api/llms.txt): 370+ reference pages (Posts, Users, DMs, Lists, Spaces, Streams, Compliance, Webhooks, Media, etc.)
16+
- [Enterprise APIs — Full Index](https://docs.x.com/enterprise-api/llms.txt): Account Activity, X Activity (XAA), Compliance, Chat, Communities, Direct Messages, News, Trends, Webhooks, and historical GNIP/PowerTrack
17+
- [Ads API — Full Index](https://docs.x.com/x-ads-api/llms.txt): Campaign management, creatives, audiences, analytics, measurement, and conversions
18+
- [Python SDK (XDK) — Full Index](https://docs.x.com/xdks/python/llms.txt): Complete Python client, models, paginators, and streaming reference
19+
- [TypeScript SDK (XDK) — Full Index](https://docs.x.com/xdks/typescript/llms.txt): Full TypeScript/JavaScript client and 300+ model/interface references
20+
21+
## Key Fundamentals & Tools
22+
23+
- [X API Fundamentals](https://docs.x.com/x-api/fundamentals/data-dictionary.md): Fields, expansions, pagination, versioning, consistency, rate limits
24+
- [Authentication Guides](https://docs.x.com/fundamentals/authentication/overview.md): OAuth 1.0a, OAuth 2.0, Bearer tokens, app-only, user context
25+
- [Tools & Libraries](https://docs.x.com/tools-and-libraries.md): Official SDKs, Postman, twurl, xurl
26+
- [Changelog](https://docs.x.com/changelog.md): Platform updates and new endpoints
27+
- [Tutorials](https://docs.x.com/tutorials.md): In-depth code examples and integration guides
28+
29+
## For AI Agents & LLMs
30+
31+
- [llms-full.txt](https://docs.x.com/llms-full.txt): Entire documentation set as a single Markdown file (maximum context)
32+
- [Raw Markdown for any page](https://docs.x.com/tools/llms-txt.md): Append `.md` to any docs.x.com URL (example: https://docs.x.com/x-api/posts/get-post-by-id.md)
33+
- [skill.md](https://docs.x.com/tools/skill-md.md): Structured capability description for agents (agentskills.io spec)
34+
- [MCP Server](https://docs.x.com/tools/mcp.md): Model Context Protocol server exposing X API tools to AI agents
35+
- [OpenAPI Specification](https://docs.x.com/openapi.json): Machine-readable API contract
36+
37+
All pages are also available under `/.well-known/llms.txt`. Every documentation page supports the `.md` suffix for clean Markdown retrieval by agents.

AGENT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# X Developer Platform — Agent Instructions
2+
3+
This document provides guidance for AI agents, coding assistants, and LLM-based tools interacting with the X Developer Platform documentation at https://docs.x.com.
4+
5+
## Preferred Documentation Access Methods
6+
7+
**Always prefer these methods for the most accurate, up-to-date, and agent-friendly content:**
8+
9+
1. **llms.txt** (recommended starting point)
10+
- https://docs.x.com/llms.txt — Small, curated root index with links to section-specific indexes.
11+
- Section indexes (follow the links in the root):
12+
- https://docs.x.com/x-api/llms.txt (X API v2 — 370+ pages)
13+
- https://docs.x.com/enterprise-api/llms.txt
14+
- https://docs.x.com/x-ads-api/llms.txt
15+
- https://docs.x.com/xdks/llms.txt (Python + TypeScript XDKs)
16+
17+
2. **llms-full.txt** — Complete documentation as a single Markdown file for maximum context:
18+
- https://docs.x.com/llms-full.txt
19+
20+
3. **Raw Markdown for any individual page**
21+
- Append `.md` to any documentation URL.
22+
- Example: `https://docs.x.com/x-api/posts/get-post-by-id.md`
23+
- Every page supports this. Use it instead of the HTML view when possible.
24+
25+
4. **MCP Server** (for tool-using agents)
26+
- https://docs.x.com/tools/mcp — Full Model Context Protocol server exposing 200+ X API endpoints + documentation search.
27+
28+
5. **skill.md** (capability summary)
29+
- https://docs.x.com/skill.md — Structured description of every action an agent can perform with the X API (agentskills.io format).
30+
31+
## Site Structure & Navigation
32+
33+
- **X API v2** (`/x-api/...`): Posts, Users, Direct Messages, Lists, Spaces, Media, Streams (filtered + volume), Compliance, Webhooks, Account Activity, Trends, News, Usage, Connections.
34+
- **Enterprise APIs** (`/enterprise-api/...`): Account Activity (webhooks), X Activity (XAA), GNIP/PowerTrack historical & real-time, Compliance.
35+
- **Ads API** (`/x-ads-api/...`): Campaign Management, Creatives, Audiences, Analytics, Measurement, Catalog.
36+
- **SDKs (XDKs)** (`/xdks/python/...` and `/xdks/typescript/...`): Official client libraries with full type coverage, pagination, and streaming helpers.
37+
- **Fundamentals**: Authentication, rate limits, data dictionary, expansions, fields, pagination, versioning, consistency.
38+
- **AI & Agent Tools** (`/tools/ai`, `/tools/llms-txt`, `/tools/skill-md`, `/tools/mcp`).
39+
40+
All pages are available in the navigation tree defined in `docs.json`.
41+
42+
## Important Technical Notes for Agents
43+
44+
- **Authentication**: The platform supports OAuth 1.0a (user context), OAuth 2.0 (user context + PKCE, app-only Bearer), and Basic Auth for some enterprise endpoints. See `/fundamentals/authentication/...`.
45+
- **Rate Limits**: Most endpoints have both app-level and user-level rate limits. See `/fundamentals/rate-limits.md` and per-endpoint documentation.
46+
- **Data Model**: Use the official data dictionary, fields, expansions, and metrics pages. Posts, Users, and Spaces are the core objects.
47+
- **Real-time Data**: Filtered Stream, Volume Streams, Account Activity webhooks, and X Activity (XAA) are the primary real-time mechanisms.
48+
- **Compliance & Safety**: Always respect developer terms, display requirements, and restricted use cases. See `/developer-guidelines.md` and `/developer-terms/...`.
49+
50+
## How to Use This Documentation Effectively
51+
52+
- Start with the root `llms.txt` to discover relevant pages.
53+
- Fetch individual pages via the `.md` suffix for clean, structured Markdown.
54+
- For deep context on the entire platform, load `llms-full.txt`.
55+
- For structured capabilities (what actions are possible), load `skill.md`.
56+
- For live tool calling against the X API, use the MCP server.
57+
- When writing code, prefer the official Python or TypeScript XDKs (full references available in their `llms.txt` files).
58+
59+
## Do Not
60+
61+
- Rely solely on the HTML-rendered pages when a clean Markdown alternative exists.
62+
- Assume deprecated v1.1 endpoints are still primary (focus on v2 and Enterprise equivalents).
63+
- Ignore rate limits, authentication context (app-only vs user context), or pagination requirements.
64+
- Generate code that violates the X Developer Agreement or Display Requirements.
65+
66+
## Additional Resources
67+
68+
- OpenAPI spec: https://docs.x.com/openapi.json (or https://api.x.com/2/openapi.json)
69+
- Changelog: https://docs.x.com/changelog.md
70+
- Status page: https://docs.x.com/status.md
71+
- Developer Guidelines: https://docs.x.com/developer-guidelines.md
72+
- Support & Community: https://devcommunity.x.com
73+
74+
This documentation is designed to be consumed reliably by AI agents. Use the machine-readable formats (`llms.txt` family, `.md` suffix, `skill.md`, MCP) for the best results.

AGENTS.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# X Developer Platform — Agent Instructions
2+
3+
This document provides guidance for AI agents, coding assistants, and LLM-based tools interacting with the X Developer Platform documentation at https://docs.x.com.
4+
5+
## Preferred Documentation Access Methods
6+
7+
**Always prefer these methods for the most accurate, up-to-date, and agent-friendly content:**
8+
9+
1. **llms.txt** (recommended starting point)
10+
- https://docs.x.com/llms.txt — Small, curated root index with links to section-specific indexes.
11+
- Section indexes (follow the links in the root):
12+
- https://docs.x.com/x-api/llms.txt (X API v2 — 370+ pages)
13+
- https://docs.x.com/enterprise-api/llms.txt
14+
- https://docs.x.com/x-ads-api/llms.txt
15+
- https://docs.x.com/xdks/llms.txt (Python + TypeScript XDKs)
16+
17+
2. **llms-full.txt** — Complete documentation as a single Markdown file for maximum context:
18+
- https://docs.x.com/llms-full.txt
19+
20+
3. **Raw Markdown for any individual page**
21+
- Append `.md` to any documentation URL.
22+
- Example: `https://docs.x.com/x-api/posts/get-post-by-id.md`
23+
- Every page supports this. Use it instead of the HTML view when possible.
24+
25+
4. **MCP Server** (for tool-using agents)
26+
- https://docs.x.com/tools/mcp — Full Model Context Protocol server exposing 200+ X API endpoints + documentation search.
27+
28+
5. **skill.md** (capability summary)
29+
- https://docs.x.com/skill.md — Structured description of every action an agent can perform with the X API (agentskills.io format).
30+
31+
## Site Structure & Navigation
32+
33+
- **X API v2** (`/x-api/...`): Posts, Users, Direct Messages, Lists, Spaces, Media, Streams (filtered + volume), Compliance, Webhooks, Account Activity, Trends, News, Usage, Connections.
34+
- **Enterprise APIs** (`/enterprise-api/...`): Account Activity (webhooks), X Activity (XAA), GNIP/PowerTrack historical & real-time, Compliance.
35+
- **Ads API** (`/x-ads-api/...`): Campaign Management, Creatives, Audiences, Analytics, Measurement, Catalog.
36+
- **SDKs (XDKs)** (`/xdks/python/...` and `/xdks/typescript/...`): Official client libraries with full type coverage, pagination, and streaming helpers.
37+
- **Fundamentals**: Authentication, rate limits, data dictionary, expansions, fields, pagination, versioning, consistency.
38+
- **AI & Agent Tools** (`/tools/ai`, `/tools/llms-txt`, `/tools/skill-md`, `/tools/mcp`).
39+
40+
All pages are available in the navigation tree defined in `docs.json`.
41+
42+
## Important Technical Notes for Agents
43+
44+
- **Authentication**: The platform supports OAuth 1.0a (user context), OAuth 2.0 (user context + PKCE, app-only Bearer), and Basic Auth for some enterprise endpoints. See `/fundamentals/authentication/...`.
45+
- **Rate Limits**: Most endpoints have both app-level and user-level rate limits. See `/fundamentals/rate-limits.md` and per-endpoint documentation.
46+
- **Data Model**: Use the official data dictionary, fields, expansions, and metrics pages. Posts, Users, and Spaces are the core objects.
47+
- **Real-time Data**: Filtered Stream, Volume Streams, Account Activity webhooks, and X Activity (XAA) are the primary real-time mechanisms.
48+
- **Compliance & Safety**: Always respect developer terms, display requirements, and restricted use cases. See `/developer-guidelines.md` and `/developer-terms/...`.
49+
50+
## How to Use This Documentation Effectively
51+
52+
- Start with the root `llms.txt` to discover relevant pages.
53+
- Fetch individual pages via the `.md` suffix for clean, structured Markdown.
54+
- For deep context on the entire platform, load `llms-full.txt`.
55+
- For structured capabilities (what actions are possible), load `skill.md`.
56+
- For live tool calling against the X API, use the MCP server.
57+
- When writing code, prefer the official Python or TypeScript XDKs (full references available in their `llms.txt` files).
58+
59+
## Do Not
60+
61+
- Rely solely on the HTML-rendered pages when a clean Markdown alternative exists.
62+
- Assume deprecated v1.1 endpoints are still primary (focus on v2 and Enterprise equivalents).
63+
- Ignore rate limits, authentication context (app-only vs user context), or pagination requirements.
64+
- Generate code that violates the X Developer Agreement or Display Requirements.
65+
66+
## Additional Resources
67+
68+
- OpenAPI spec: https://docs.x.com/openapi.json (or https://api.x.com/2/openapi.json)
69+
- Changelog: https://docs.x.com/changelog.md
70+
- Status page: https://docs.x.com/status.md
71+
- Developer Guidelines: https://docs.x.com/developer-guidelines.md
72+
- Support & Community: https://devcommunity.x.com
73+
74+
This documentation is designed to be consumed reliably by AI agents. Use the machine-readable formats (`llms.txt` family, `.md` suffix, `skill.md`, MCP) for the best results.

0 commit comments

Comments
 (0)