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

> ## Agent Instructions
> Setting up Context.dev for a user? Follow https://docs.context.dev/agent-quickstart.md. MCP clients sign in with OAuth and need no API key; application code reads CONTEXT_DEV_API_KEY.

# Result content

> Read Markdown with search results and handle each page’s outcome.

Set `markdownOptions.enabled` to `true` to fetch each result’s page. A search result can remain useful even when its page content cannot be read.

## Request page content

Send this body to `POST /web/search`. See the [Quickstart](/quickstart) for authentication and SDK setup.

```json theme={null}
{
  "query": "Stripe API authentication",
  "markdownOptions": {
    "enabled": true,
    "useMainContentOnly": true,
    "includeLinks": true
  }
}
```

## Read each outcome

Check the result’s `markdown.code` before using its content:

| Code                   | Meaning                              |
| ---------------------- | ------------------------------------ |
| `SUCCESS`              | Page content is available.           |
| `NOT_REQUESTED`        | Markdown was disabled.               |
| `TIMEOUT`              | The page exceeded its deadline.      |
| `CONTENT_TOO_LARGE`    | The page exceeded the content limit. |
| `WEBSITE_ACCESS_ERROR` | The page could not be accessed.      |
| `ERROR`                | Another extraction failure.          |

`finalDOMState: "still-loading"` indicates an incomplete render.

## Options

`markdownOptions` supports `includeLinks` (default true), `includeImages` (false), `shortenBase64Images` (true), `useMainContentOnly` (false), `includeFrames` (false), and `maxAgeMs` (one day). Use `pdf` for PDF parsing and page ranges.

`waitForMs` accepts 0–30,000 ms. Each page has a default 45-second deadline; set `markdownOptions.timeoutOpts` to shorten it. Top-level `timeoutOpts` limits the whole search.

Keep the URL, title, and description when a content read fails. For page-specific recovery, call [Scrape](/scrape/overview) with appropriate waits or filters.
