> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get markdown for a model

> Get any Stophy response as readable markdown instead of JSON. Send accept: text/markdown to give a model short, clean text with links kept.

Every endpoint can answer with markdown instead of JSON. Use it when a model reads the result. Use JSON when your code reads it.

## Ask for markdown

Send `accept: text/markdown`:

```bash theme={null}
curl -X POST https://api.stophy.dev/v1/web/search \
  -H "content-type: application/json" \
  -H "accept: text/markdown" \
  -d '{"query":"bun runtime","limit":2}'
```

This is the response to that request. Web search works without a key, so you can run it as is.

```markdown theme={null}
**web.search**: 2 results

## Results

| Title | Description | Domain |
| --- | --- | --- |
| [Bun — A fast all-in-one JavaScript runtime](https://bun.com/) | Bundle, install, and run JavaScript & TypeScript — all in Bun. Bun is a fast JavaScript runtime & toolkit with a bundler, test runner, and npm-compatible package manager built in. | bun.com |
| [GitHub - oven-sh/bun: Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one](https://github.com/oven-sh/bun) | 3 days ago - At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. | github.com |
```

## What you get

* The first line names the endpoint and how many results it returned.
* Short rows become tables. Longer items get their own heading.
* Links stay links, so the model can cite its sources.
* Empty values are left out.
* When there is another page, the last line says which `cursor` to send. See [Page through results](/guides/paging).

## Headers and errors

* The response is `content-type: text/markdown; charset=utf-8`.
* What the call cost is in the `x-credits-used` header.
* Errors are still JSON, with the same shape as always. See [Errors](/api-reference/errors).

Over [MCP](/mcp-server), results are markdown by default. Pass `format: "json"` to `stophy_call` for JSON.
