Web Page HTML to Markdown, Main Content Only
Converts web pages to Markdown and keeps only the main article, dropping navigation, footers and scripts. Links are made absolute so they still work out of context.
Input
Output fields
Sign up on Apify or log in
The Document to Markdown for LLM & RAG (PDF, DOCX, PPTX, XLSX, OCR) Actor is ready to run with the inputs already set for "Web Page HTML to Markdown, Main Content Only". Sign up or log in and you'll land in Apify Console with a copy of this exact task.
Start the "Web Page HTML to Markdown, Main Content Only" task
The Document to Markdown for LLM & RAG (PDF, DOCX, PPTX, XLSX, OCR) Actor will start running based on the input automatically. You can also change all the input fields, like file urls and HTML: keep main content only, to match your specific use case.
Receive the "Web Page HTML to Markdown, Main Content Only" output
Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as file, title, markdown, and more.
Integrate into your workflow
The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "Web Page HTML to Markdown, Main Content Only" task via API.

Integrate "Web Page HTML to Markdown, Main Content Only" into your workflow
Connect "Web Page HTML to Markdown, Main Content Only" with 100+ integrations, or run it via API or MCP.
Webhook
n8n
Make
Zapier
Airbyte
Keboola
IFTTT
Hubspot
GDrive
Gmail
Apify MCP
GitHub
Slack
LangChain
LlamaIndex
Flowise
Pinecone
OpenAI
Mastra
Clay
$0.002 per converted document plus $0.0003 per page with text. OCR pages cost $0.0027 more. Failed, empty or unsupported files are free.
The actor keeps the page's main or article element when there is one and removes navigation, headers, footers and scripts. Turn htmlMainContentOnly off to keep everything.
No. It converts the HTML the server returns. Pages that build their content only in the browser may come back mostly empty.
Yes. The markdown field is ready to pass to a model. Set chunking to heading or tokens to also get chunks with token counts and page numbers for embedding.