{
"url": "https://example.com/",
"http_status": 200,
"title": "Example Domain",
"markdown": "This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.",
"word_count": 131,
"estimated_tokens": 174,
"cached": false
}
curl --location --request GET 'https://zylalabs.com/api/15992/webpage+url+to+clean+markdown+api/45062/convert+webpage+url+to+clean+markdown?url=https://example.com&main_content_only=true&include_links=true&include_images=false&wait_for_network_idle=true&timeout_ms=20000&no_cache=false' --header 'Authorization: Bearer YOUR_API_KEY'
{
"markdown": "## Page 1\n\nDummy PDF file",
"pages": 1,
"ocr_used": true,
"format": "pdf",
"word_count": 6,
"estimated_tokens": 7,
"bytes_processed": 13264
}
curl --location --request GET 'https://zylalabs.com/api/15992/webpage+url+to+clean+markdown+api/45063/convert+document+or+image+url+to+markdown?url=https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf' --header 'Authorization: Bearer YOUR_API_KEY'
{
"content_type": "application/pdf",
"size_bytes": 91911,
"base64": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoRXhhbXBsZSBEb21haW4pCi9DcmVhdG9yIChN..."
}
curl --location --request GET 'https://zylalabs.com/api/15992/webpage+url+to+clean+markdown+api/45064/convert+webpage+url+or+html+to+pdf?url=https://example.com&paper_width=8.5&paper_height=11&landscape=false&print_background=true&scale=1.0&return_base64=true' --header 'Authorization: Bearer YOUR_API_KEY'
{
"content_type": "image/webp",
"size_bytes": 15188,
"base64": "UklGRkw7AABXRUJQVlA4IEA7AACQ1QCdASqAAmgBPpFEnUulo6KhotOaELASCWlu/F/0hDYYfCd78Of2..."
}
curl --location --request GET 'https://zylalabs.com/api/15992/webpage+url+to+clean+markdown+api/45065/capture+website+screenshot?url=https://example.com&width=1280&height=720&full_page=false&format=webp&quality=85&delay_ms=Optionaltimeout_ms=20000&return_base64=true' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Webpage URL to Clean Markdown API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
(Save 2 months with annual billing 🎉)
Convert any public webpage including JavaScript-rendered sites into clean, token-efficient Markdown with page title, word count, and estimated token count.
Yes. Webpage Markdown conversion and screenshots use headless Chromium and wait for network idle before extracting content or capturing images.
The document endpoint supports PDF, DOCX, XLSX, PPTX, HTML, TXT, CSV, PNG, JPEG, and WEBP, with automatic Tesseract OCR for scanned PDFs and images.
By default on GET endpoints (return_base64=true), responses return JSON containing content_type, size_bytes, and the base64 string. Set return_base64=false to receive raw binary bytes.
No. Only public HTTP and HTTPS URLs are permitted; localhost, private IP ranges, and cloud metadata endpoints are blocked. Max document download size is 20 MB.
Repeated identical requests may return cached results (cached: true). Pass no_cache=true to force a fresh headless browser render.
Page navigation timeouts support 2,000 to 30,000 ms, with optional post-load capture delays up to 5,000 ms. Screenshot viewports support 320-2560 px width and 200-2560 px height.
The response includes the requested URL, HTTP status, page title, extracted Markdown, word count, estimated token count, and a `cached` flag. Use the Markdown as the page’s readable content and the counts to estimate its size for downstream processing.
The response contains extracted Markdown plus the detected format, page count, OCR status, word count, estimated token count, and bytes processed. Page headings may separate content—for example, `## Page 1`—and `ocr_used` indicates whether OCR was applied.
It can extract text and structured content from public PDF, DOCX, XLSX, PPTX, HTML, TXT, CSV, and image files. The result is Markdown; scanned PDFs and images can be processed with OCR.
It returns a PDF with `content_type`, `size_bytes`, and, by default, a Base64-encoded `base64` field. Decode that field to obtain the PDF file. The endpoint can render either a public webpage URL or raw HTML markup.
The response identifies the image MIME type in `content_type`, gives its byte size in `size_bytes`, and includes the image as Base64 by default. Decode the Base64 value to save the PNG, JPEG, or WEBP screenshot.
Yes. Choose a supported output format—PNG, JPEG, or WEBP—and set the viewport width and height. Supported dimensions are 320–2560 pixels wide and 200–2560 pixels high.
Check the document conversion response’s `ocr_used` field. A value of `true` means OCR was used; the response also reports the detected format and page count to help interpret the extracted Markdown.
The PDF and screenshot endpoints accept raw HTML markup as an alternative to a webpage URL. Their responses contain the rendered PDF or image data, respectively.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund