Documents to Markdown
Point the request at a document instead of a web page and ask for Markdown or text. Headings, paragraphs, lists and tables come back readable – from PDF, Word, Excel, PowerPoint, OpenDocument and CSV files.
You send
POST /v1/requests
{
"url": "https://example.com/reports/annual-report-2025.pdf",
"format": "markdown",
"format_options": {
"max_pages": 50
},
"redact": [
"email",
"phone"
]
}- Endpoint
POST /v1/requests- Cost
- No extra credits
- Plans
- All plans, Free included
- Failed requests
- Not charged
- Documentation
- Step-by-step guide
Reports, price lists and manuals often exist only as files. Every format needs its own library, tables fall apart, and scanned pages quietly come back empty.
How VirginProxy helps
- The same
"format": "markdown"or"text"as for web pages – the type of document is recognised by itself. format_options.max_pages reads up to 500 pages (100 by default); the answer says how many pages there were and whether the text was cut.- Tables from spreadsheets and documents become Markdown tables, and tokens estimates the length for your model.
"redact"blacks out e-mail addresses, phone numbers, IBANs, card numbers and IP addresses before the text reaches you.
How it works, step by step
Point to the document
Any address that returns a PDF, Word, Excel, PowerPoint, OpenDocument or CSV file – with the same request options as for a web page.
Ask for Markdown or text
"format": "markdown"keeps headings, lists and tables;"text"is the shortest form when you only need the words.Limit long files
format_options.max_pages reads 1 to 500 pages (100 by default); document.truncated tells you when the rest was left out.Black out personal data if needed
"redact": ["email","phone"] – or true for all kinds – replaces them with [email], [phone] … and counts them in redacted.
Example request
An annual report as a PDF: the first 50 pages as Markdown, with e-mail addresses and phone numbers blacked out.
curl https://api.virginproxy.com/v1/requests \
-H "Authorization: Bearer $VP_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/reports/annual-report-2025.pdf",
"format": "markdown",
"format_options": {
"max_pages": 50
},
"redact": [
"email",
"phone"
]
}'
import os, requests
r = requests.post(
"https://api.virginproxy.com/v1/requests",
headers={"Authorization": "Bearer " + os.environ["VP_KEY"]},
json={
"url": "https://example.com/reports/annual-report-2025.pdf",
"format": "markdown",
"format_options": {
"max_pages": 50
},
"redact": [
"email",
"phone"
]
},
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://example.com/reports/annual-report-2025.pdf",
"format": "markdown",
"format_options": {
"max_pages": 50
},
"redact": [
"email",
"phone"
]
}),
});
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://example.com/reports/annual-report-2025.pdf",
"format" => "markdown",
"format_options" => [
"max_pages" => 50,
],
"redact" => ["email", "phone"],
]),
CURLOPT_TIMEOUT => 150,
]);
$data = json_decode(curl_exec($ch), true);
echo $data["status"], " ", $data["exit"]["ip"], " ", $data["cost"]["credits"];
body := strings.NewReader(`{
"url": "https://example.com/reports/annual-report-2025.pdf",
"format": "markdown",
"format_options": {
"max_pages": 50
},
"redact": [
"email",
"phone"
]
}`)
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"])
What comes back
The document as Markdown, with its type, page count and what was blacked out:
{
"status": 200,
"format": "markdown",
"body": "# Annual report 2025\n\n## Key figures\n\n| Year | Revenue |\n|---|---|\n| 2025 | 4.2 m |\n…\nContact: [email]",
"document": { "type": "pdf", "pages": 50, "truncated": true, "text": true },
"tokens": 18240,
"redacted": { "email": 3, "phone": 2 },
"cost": { "credits": 3 }
}What it costs
The conversion costs nothing extra: you pay for the file as it was sent, 1 credit per started MB. A 2.4 MB PDF costs 3 credits, as Markdown or as raw file. 5,000 documents of about 1 MB in 30 days fit Starter (€19, 25,000 credits).
Good to know
- The type is recognised from the answer itself, so links without a file extension work too.
- Use
"text"for search indexes and"markdown"when tables and headings matter to your model. - tokens in the answer estimates the length, so you can split long documents before they reach a prompt.
- A scanned PDF has no text layer: the answer says so with document.text false instead of guessing.
Questions
Does the conversion cost extra?
No. You pay for the size of the file as usual – 1 credit per started MB – whatever the format of the result.
Can it read scanned PDFs?
Only PDFs with a text layer – there is no OCR. A scan without text comes back with an empty body and document.text false, so you can tell it apart; it is charged like any answer.
Which formats are converted?
PDF (with a text layer), Word (DOCX), Excel (XLSX), PowerPoint (PPTX), OpenDocument text and CSV.
What is the largest file I can convert?
As large as your plan allows for an answer – 2 MB on Free up to 25 MB on Scale – and up to 500 pages per request.
Does it work in jobs?
Yes. Set format in the requests of a job, and every document in the list comes back as Markdown or text. Crawls follow web pages and skip links to files.
Other features
- Web scraping API
- JavaScript rendering
- URL to Markdown for LLMs
- Data extraction
- Web search API
- Screenshot API
- Website map and link discovery
- Website crawler
- Batch jobs and webhooks
- Website monitoring
- MCP server for AI agents
Use cases
- Price and stock monitoring
- Travel and tickets
- Listings and classifieds
- Testing and verification
- Brand protection
Pricing and cost examplesSelf-hosting vs APIWeb scraping APIs comparedWhat is a web scraping API?Quick start
Use VirginProxy for lawful purposes and respect the terms and rights of the sites you visit.
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