# Converting only the part you asked for

> mdapi.io - Minimal Data API I/O: a content transformation layer primitive for AI systems.
>
> Transforms files and webpages into AI-ready Markdown and structured data, optimized for LLM efficiency and token usage.

Naming a subtree instead of the whole document: an element on HTML and XML, a key path on JSON, and what the answers say when it names nothing.

`select` names a subtree of the document and converts only that, so everything outside it never reaches the answer and is never read by a paid stage. It is deliberately not a scoring heuristic: the service does not guess which part of a page matters, it takes the part you named, so the same document always answers the same way for the same selector.

The grammar follows the container, because a subtree is named by what it holds. An HTML or XML document holds elements, so `select` takes an element selector - a subset of CSS rather than a CSS engine:

- a tag: `select=article`
- a class or an id: `select=.content`, `select=#main`
- those combined on one element: `select=article.content`
- a descendant chain, separated by spaces: `select=main article`
- a list, separated by commas: `select=nav,footer`

Names are matched by local name, so `select=item` names `atom:item` in a namespaced feed, and the subtree keeps its own bytes: an XML selection is the original source of the selected elements, read by the same readers as a whole file, not a re-serialization.

```
GET /?input=<document-url>&select=main%20article
```

A JSON document holds keys, so there `select` takes a key path - a key (`items`), a chain of keys (`data.items`), an index (`items[0]`) or `[*]` for every member of an array or object (`items[*].title`). The selected value is answered as JSON, so a selection over a large feed or an API reply carries only the branch that was asked for:

```
GET  /?input=<document-url>&select=items%5B0%5D
POST /  {"input":"<document-url>","select":"items[*].title"}
```

The brackets may be left out (`items.0`, `items.*.title`): it is the same selection, and both spellings share one cache entry.

A selector that is valid in both readings (`data.items` is a tag with a class, and a chain of two keys) is kept in both and resolved by the input format at conversion time, so one request text works whoever answers it.

A SafeTensors weight file holds a table of tensors, so there `select` takes a tensor name: the exact name (`model.embed_tokens.weight`), a `*` pattern, or an unqualified tail (`weight`) when exactly one tensor carries it - a name that matches more than one tensor is refused with the candidates instead of resolved by picking one. The answer is that tensor's values as a table, in the dtype the file stores them, bounded to 256 rows by 64 columns; the window is stated in the answer together with the size of what it leaves out, so a large tensor is a named cut and never a silent truncation. A tensor whose header and data disagree, or whose dtype this reader does not decode, is refused by name rather than printed as numbers it does not hold.

A selector that does not help is refused by name rather than answered with an empty body, because an empty answer would look like a document with nothing in it:

- the selector names nothing in this document - the `400` says so and repeats the selector;
- the selector names an element that carries no text (a spacer, an empty container) - the `400` says that instead, and repeats the selector;
- the selector belongs to the other grammar for this format (a key path on HTML, an element selector on JSON) - the `400` names the grammar that applies;
- the input has no tree the selector can name - the `400` names the format, so a binary is never silently converted whole.

What is selected is the document for the rest of the request. The page's title and description still head the answer when it has them, `part` numbers the selected subtree and `find` searches inside it, and the selection is part of the cache key - a selected document and the whole document are two different answers and are never confused for one another. Selecting adds no model work: it is a reading choice, answered on the free tier like any other conversion. It travels as `?select=` on REST GET and as the body field `select` on REST POST and OpenAI, and through the same argument slot on MCP, ACP and A2A.

## Links

- **About service:** https://mdapi.io/about
- **Privacy:** https://mdapi.io/privacy
- **Contact:** https://mdapi.io/contact
- **Agent entry point:** https://mdapi.io/AGENTS.md or https://mdapi.io/agents.md or https://mdapi.io/agent.md
- **Agent access:** https://mdapi.io/auth.md
- **API documentation and conversion:** https://mdapi.io
- **MCP server manifest:** https://mdapi.io/mcp
- **Health check:** https://mdapi.io/health
- **Documentation index:** https://mdapi.io/llms.txt
- **Full API documentation:** https://mdapi.io/llms-full.txt
- **AI discovery:** https://mdapi.io/.well-known/ai-discovery.json or https://mdapi.io/ai-discovery.json
- **AI Agent discovery:** https://mdapi.io/.well-known/agent.json or https://mdapi.io/agent.json
- **A2A Agent card:** https://mdapi.io/.well-known/agent-card.json or https://mdapi.io/agent-card.json
- **ACP manifest:** https://mdapi.io/.well-known/acp.json or https://mdapi.io/acp.json
- **x402 payment manifest:** https://mdapi.io/.well-known/x402.json or https://mdapi.io/x402.json or https://mdapi.io/.well-known/x402
- **OpenAPI specification (JSON):** https://mdapi.io/.well-known/openapi.json or https://mdapi.io/openapi.json
- **OpenAPI specification (YAML):** https://mdapi.io/.well-known/openapi.yaml or https://mdapi.io/openapi.yaml
- **MAPI specification:** https://mdapi.io/.well-known/mapi.md or https://mdapi.io/mapi.md
- **Skill specification:** https://mdapi.io/.well-known/skill.md or https://mdapi.io/skill.md
- **ARD manifest:** https://mdapi.io/.well-known/ard.json or https://mdapi.io/.well-known/ai-catalog.json or https://mdapi.io/ard.json
- **Agent Plugins manifest:** https://mdapi.io/.well-known/plugin/plugin.json or https://mdapi.io/.well-known/plugin.json
- **Agent Plugins MCP config:** https://mdapi.io/.well-known/plugin/mcp.json
- **Agent Plugins conversion skill:** https://mdapi.io/.well-known/plugin/skills/mdapi-conversion/SKILL.md
- **API documentation pages:** https://mdapi.io/docs
- **Example pages:** https://mdapi.io/docs/examples

## External Links

- **github.com** https://github.com/mdapiio/mdapi.io
- **skills.sh** https://www.skills.sh/mdapiio/mdapi.io
- **skillsmp.com** https://skillsmp.com/creators/mdapiio/mdapi.io
- **clawhub.ai** https://clawhub.ai/mdapiio
- **x.com** https://x.com/mdapiio

## Disclaimer

**The service is provided "AS IS".**


> mdapi.io is an edge-native service-transport primitive for AI, autonomous agents, and the Web4 ecosystem.
