URL to Markdown for LLMs

Most of a web page is navigation, scripts and layout. Ask for Markdown, and you get what a reader sees: headings, paragraphs, lists, links and tables – ready for a language model.

Start with 50 free creditsOpen playground

You send

POST /v1/requests
{
  "url": "https://blog.example/posts/42",
  "format": "markdown",
  "main_content": true,
  "format_options": {
    "exclude_selector": ".comments",
    "images": false
  }
}
Endpoint
POST /v1/requests
Cost
No extra credits
Plans
All plans, Free included
Failed requests
Not charged
Documentation
Step-by-step guide

Feeding raw HTML into a model wastes tokens on menus, cookie banners and scripts, and home-made converters break on tables, relative links and odd markup.

How VirginProxy helps

  • "format": "markdown", "text" or "clean_html" turns any HTML answer into the format you need.
  • "main_content": true keeps only the article or main area and drops navigation, footer and sidebars.
  • Links and images become absolute addresses, tables become Markdown tables, code stays code.
  • Works with rendering too, so pages that build their text with JavaScript come out complete.

How it works, step by step

  1. Fetch the page as usual

    Any request – with or without a browser.

  2. Choose the format

    "format": "markdown", "text" or "clean_html" converts the HTML before it comes back.

  3. Keep only the content

    "main_content": true drops navigation, header, footer, sidebars and forms first.

  4. Pass it on

    Into your search index, a summary step or a language model – without your own HTML cleaning.

Example request

A blog post as clean Markdown, reduced to the article itself.

curl https://api.virginproxy.com/v1/requests \
  -H "Authorization: Bearer $VP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://blog.example/posts/42",
    "format": "markdown",
    "main_content": true,
    "format_options": {
      "exclude_selector": ".comments",
      "images": false
    }
  }'
import os, requests

r = requests.post(
    "https://api.virginproxy.com/v1/requests",
    headers={"Authorization": "Bearer " + os.environ["VP_KEY"]},
    json={
        "url": "https://blog.example/posts/42",
        "format": "markdown",
        "main_content": True,
        "format_options": {
            "exclude_selector": ".comments",
            "images": False
        }
    },
    timeout=150,
)
data = r.json()
print(data["status"], data["exit"]["ip"], data["cost"]["credits"])
const res = await fetch("https://api.virginproxy.com/v1/requests", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VP_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://blog.example/posts/42",
    "format": "markdown",
    "main_content": true,
    "format_options": {
      "exclude_selector": ".comments",
      "images": false
    }
  }),
});
const data = await res.json();
console.log(data.status, data.exit.ip, data.cost.credits);
$ch = curl_init("https://api.virginproxy.com/v1/requests");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("VP_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "url" => "https://blog.example/posts/42",
        "format" => "markdown",
        "main_content" => true,
        "format_options" => [
            "exclude_selector" => ".comments",
            "images" => false,
        ],
    ]),
    CURLOPT_TIMEOUT => 150,
]);
$data = json_decode(curl_exec($ch), true);
echo $data["status"], " ", $data["exit"]["ip"], " ", $data["cost"]["credits"];
body := strings.NewReader(`{
  "url": "https://blog.example/posts/42",
  "format": "markdown",
  "main_content": true,
  "format_options": {
    "exclude_selector": ".comments",
    "images": false
  }
}`)
req, _ := http.NewRequest("POST", "https://api.virginproxy.com/v1/requests", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("VP_KEY"))
req.Header.Set("Content-Type", "application/json")

res, err := http.DefaultClient.Do(req)
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
var data map[string]any
json.NewDecoder(res.Body).Decode(&data)
fmt.Println(data["status"], data["exit"].(map[string]any)["ip"], data["cost"].(map[string]any)["credits"])

Documentation for this feature · Documents to Markdown · API reference

What comes back

Readable Markdown instead of HTML:

{
  "status": 200,
  "format": "markdown",
  "body": "# Quotes to Scrape\n\n> “The world as we have created it is a process of our thinking.”\n> by [Albert Einstein](https://quotes.toscrape.com/author/Albert-Einstein)\n…",
  "cost": { "credits": 1 }
}

What it costs

The conversion costs nothing extra; you pay for the page as usual, 1 credit up to 1 MB. 20,000 articles in 30 days fit Starter (€19, 25,000 credits).

Pricing and cost examples

Good to know

  • Markdown keeps headings, lists, links and tables – good for language models.
  • text is the shortest form when you only need the words.
  • With main_content the answer gets much shorter on pages with large menus.
  • Combine format with render for pages that build their content with JavaScript.
  • format_options keeps only one part with include_selector, leaves parts out with exclude_selector, and drops images or links with false.
  • Every Markdown or text answer estimates its length in tokens – to plan what fits into a prompt.
  • redact blacks out e-mail addresses, phone numbers, IBANs, card numbers and IP addresses before the text reaches you.

Questions

Does converting cost extra?

No. You pay for the data the target sent, not for the shorter result. Markdown with main content is often a tenth of the raw HTML.

What happens with JSON, PDFs or images?

Formats apply to HTML and to documents: PDF, Word, Excel, PowerPoint, OpenDocument and CSV. JSON, images and other answers come back unchanged, and the response says so.

Are links and images kept?

Yes, as Markdown links and images with absolute addresses.

What about tables?

They become GitHub-style Markdown tables; code becomes fenced code blocks.

Does the conversion work with non-HTML answers?

With documents, yes: PDF, Word, Excel, PowerPoint, OpenDocument and CSV become Markdown or text. JSON, images and other formats come back unchanged.

Try it with 50 free credits

Pick up where you left off

No card needed. Your first request takes two minutes.

Your credits, keys and recent requests are waiting in the dashboard.

Start with 50 free creditsGo to dashboard