xdataapi.io

For agents

Hand the whole API to an LLM or agent in one line.

Everything an agent needs is a URL away. Pick the one that fits the client.

NeedURL
Docs, short indexhttps://xdataapi.io/llms.txt
Docs, everything in one filehttps://xdataapi.io/llms-full.txt
One docs page as Markdownadd .md to its URL, for example https://xdataapi.io/docs/search.md
Contract, OpenAPI 3.1https://api.xdataapi.io/openapi.yaml
Tools, MCP serverhttps://api.xdataapi.io/mcp (signs itself in, or header x-api-key)
Live health, JSONhttps://api.xdataapi.io/status
Directory of all of the abovehttps://api.xdataapi.io/

Every docs page also answers a request with Accept: text/markdown in Markdown.

Prompt to paste

Use the xdataapi.io API to read public X (Twitter) data. Docs: https://xdataapi.io/llms-full.txt
Base URL https://api.xdataapi.io, header x-api-key: xd_live_... Every response has credits_charged and
balance_remaining; stop when balance_remaining is 0. Errors are JSON with a stable "code" field.
Pages return next_cursor; pass it back as cursor.

MCP in one line

claude mcp add --transport http xdataapi https://api.xdataapi.io/mcp

No key in it: the server signs the client in through a browser and it gets its own credential. Other clients, and the header form for a machine with no browser: see MCP server. The 14 tools are read-only and annotated as such, so clients that auto-approve read-only tools do not prompt on every call.

Why the API is easy for agents

  • Flat objects. A Tweet and a User are the same shape on every endpoint. No nested legacy or result wrappers.
  • Stable error codes. no_credits, not_found, rate_limited, access_denied, upstream_error. The errors page says what to do for each. Failed requests cost nothing.
  • Costs in the response. credits_charged and balance_remaining on every call, so an agent can budget without a second request.
  • Cursors, not page numbers. next_cursor is opaque; pass it back as cursor. No cursor means the end.
  • Batch. Up to 100 handles or ids in one call, one charge, errors per item. See batch.
  • Idempotent reads. Everything is a read. Retrying is always safe; a repeat inside the cache window costs half.
  • A key per agent. Make one key per agent in the dashboard so one can be revoked alone.

On this page