> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/web-scraper-api/features/result-processing-and-storage/output-types/markdown-output.md).

# Markdown Output

Request markdown-formatted output from the Oxylabs Web Scraper API by setting "markdown": true in your payload - ideal for AI workflows and lightweight content.

This feature allows you to receive the markdown representation of a web page as an alternative option to HTML or parsed JSON. Markdown output provides an easy-to-read format, simplifying integration into various content workflows.

Markdown format is especially useful when working with LLMs due to its light weight and clear syntax. It's the de-facto standard for the RAG (retrieval-augmented generation) use case, especially when it concerns ingesting web data.

### Usage

To get the markdown content of a web page in the response, set the `"markdown": true` in your request payload. By default, this parameter is set to `false`. When it is set, markdown becomes the default output of the job and replaces the HTML in the response; to receive both, request them explicitly as shown in the second example below.

### Request example

Here's how to submit a request for markdown output:

```
POST https://data.oxylabs.io/v1/queries
```

```json
{
    "url": "https://example.com",
    "markdown": true
}
```

You can also add `?type=raw,markdown` in the Real-Time API endpoint URL to get both the markdown and the raw HTML result.

```
POST https://realtime.oxylabs.io/v1/queries?type=raw,markdown
```

```json
{
    "url": "https://example.com",
    "markdown": true
}
```

### Response example

The response will contain the content of the web page formatted in markdown as a string. This string will include standard markdown syntax for headings, paragraphs, lists, links, images, and other structured elements present on the page.

```json
{
    "results": [
        {
            "content": "# Example Domain\n\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\n\n[Learn more](https://iana.org/domains/example)",
            "created_at": "2026-09-14 11:22:13",
            "updated_at": "2026-09-14 11:22:14",
            "page": 1,
            "url": "https://example.com",
            "job_id": "7505224385041566721",
            "status_code": 200,
            "type": "markdown"
        }
    ],
    "job": {...}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/products/web-scraper-api/features/result-processing-and-storage/output-types/markdown-output.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
