URL to Markdown for LLMs
Give AI agents and LLM workflows clean web context from any public HTTPS URL with built-in SSRF protection and 5-second timeout guardrails.
Why engineering teams use EdgeDocAPI
- Cut prompt token usage by 60–80% compared to raw HTML dumps
- Strict SSRF firewall blocking private IPs, metadata endpoints, and unsafe redirects
- Returns calibrated estimated_tokens alongside word_count and char_count
Copy-Paste Integration (/v1/url-to-markdown)
curl -X POST https://api.docopsapi.com/v1/url-to-markdown \
-H "Authorization: Bearer edk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/docs","include_links":true,"include_images":false}'import requests
resp = requests.post(
"https://api.docopsapi.com/v1/url-to-markdown",
headers={"Authorization": "Bearer edk_live_YOUR_API_KEY"},
json={
"url": "https://example.com/docs",
"include_links": true,
"include_images": false
},
timeout=15,
)
resp.raise_for_status()
print(resp.json())const res = await fetch("https://api.docopsapi.com/v1/url-to-markdown", {
method: "POST",
headers: {
"Authorization": "Bearer edk_live_YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://example.com/docs",
"include_links": true,
"include_images": false
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);