Article-to-Markdown Converter ๐Ÿ“ avatar

Article-to-Markdown Converter ๐Ÿ“

Pricing

from $0.005 / actor start

Go to Apify Store
Article-to-Markdown Converter ๐Ÿ“

Article-to-Markdown Converter ๐Ÿ“

Extract article content from any URL and convert to clean Markdown. Strips navigation, sidebars, and ads using readability algorithms. Returns title, author, date, excerpt, word count, reading time. Batch up to 10 URLs.

Pricing

from $0.005 / actor start

Rating

0.0

(0)

Developer

Perry AY

Perry AY

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Article-to-Markdown Converter ๐Ÿ“ โ€” Web Content to Clean Markdown

Extract the main article content from any webpage and convert it to clean, well-formatted Markdown โ€” stripping navigation, sidebars, ads, and clutter using readability algorithms.


What does it do?

Every article on the web is surrounded by navigation menus, sidebar widgets, related-post links, advertisement blocks, cookie notices, and footer content. When you just want the article โ€” the text, headings, images, and structure โ€” these distractions make manual copying tedious and automated extraction unreliable.

Article-to-Markdown Converter solves this by fetching any article URL, running it through readability algorithms that identify and extract the main content, and converting the clean HTML to beautifully formatted Markdown. It automatically strips away everything that isn't the article, returning only what matters.

The actor goes beyond simple content extraction. It also harvests metadata from Open Graph tags, Twitter cards, JSON-LD structured data, and HTML meta tags โ€” giving you the article's title, author, publication date, excerpt, word count, and estimated reading time alongside the full Markdown output.

For teams managing content workflows, the batch mode processes up to 10 article URLs in a single run, making it ideal for content migration, RSS feed enrichment, or building training datasets for AI models.


Who is it for?

PersonaWhat they use it for
Content WriterRepublishing articles across platforms โ€” extract from a source URL and reformat for a new CMS
Data ScientistBuilding text datasets for NLP training โ€” clean article extraction without HTML boilerplate
DeveloperCreating offline reading experiences โ€” fetch and cache clean Markdown versions of documentation
ResearcherGathering article content for literature reviews and citation management
AI/ML EngineerPreprocessing web content for LLM training data โ€” structured output with extracted metadata
Technical WriterMigrating documentation between platforms โ€” HTML to Markdown with preserved formatting
SEO SpecialistAnalyzing competitor content structure and extracting article metadata for competitive analysis

Why use this?

  • Readability-first extraction, not regex scraping โ€” Uses the readability-lxml library (the same algorithm powering Firefox Reader View and Pocket) to identify the main content block. It understands article structure, not just HTML tags.

  • Strips everything non-essential โ€” No navigation, no sidebars, no related-posts widgets, no cookie banners, no footer links, no comment sections. Just the article content.

  • Metadata extraction from multiple sources โ€” Pulls title, author, and date from Open Graph tags (og:title, article:published_time), Twitter cards, JSON-LD structured data, HTML meta tags, and <time> elements. If data exists anywhere in the page head, the actor finds it.

  • Clean Markdown output with html2text โ€” Converts the extracted HTML to well-structured Markdown. Preserves headings, links, images, bold/italic, code blocks, lists, and blockquotes. No raw HTML leaking into the output.

  • Reading time estimation โ€” Automatically calculates reading time at 200 words per minute, a standard metric used by Medium and other publishing platforms.

  • Word count and content length metrics โ€” Know exactly how long each article is before you read or process it. Useful for content planning and dataset quality checks.

  • Batch processing for content workflows โ€” Submit up to 10 article URLs and get a consolidated dataset. Perfect for migrating a blog, enriching an RSS feed, or building a content archive.

  • No API key required โ€” Just point it at any public article URL. No signups, no rate limits, no third-party dependencies for the core extraction.


Features

1. Readability-Based Content Extraction

Uses the readability-lxml library, the same algorithm behind Firefox Reader View. It analyzes the HTML structure to find the main content block โ€” looking at text density, paragraph distribution, and semantic HTML5 elements like <article> and <main>. If readability-lxml is not available, it falls back to a container-based extraction that looks for common content div IDs and classes (content, post, article, entry, main).

2. Multi-Source Metadata Extraction

Metadata is gathered from every available source in priority order:

  • Title: og:title โ†’ twitter:title โ†’ <title> tag
  • Author: meta name="author" โ†’ JSON-LD author.name
  • Date: article:published_time โ†’ meta name="date" โ†’ <time datetime="">
  • Excerpt: og:description โ†’ meta name="description" (truncated to 300 chars)

3. HTML to Markdown Conversion

The extracted HTML is converted to Markdown using html2text with strict settings:

  • No line wrapping (respects original paragraph breaks)
  • Inline link format for readability
  • Unicode-aware (preserves special characters and non-Latin scripts)
  • Emphasis preserved (bold, italic, code)
  • Images and links converted to Markdown syntax
  • Internal links (#fragment) skipped

4. Structured Output with Metrics

Every extraction returns a comprehensive data object including:

  • Full URL and domain
  • Article title, author, and publication date
  • Excerpt/description
  • Word count (accurate, not estimated)
  • Reading time in minutes (rounded to nearest minute)
  • Content length in characters
  • Image count within the article
  • Extraction method used
  • HTTP status and fetch time

5. Batch Mode (Up to 10 URLs)

Submit multiple article URLs in a single run for batch processing. Each article is fetched and extracted independently. Failed URLs are reported individually without affecting successful extractions. All results are pushed to the same dataset.

6. Configurable Output Fields

Control how much data is returned per article:

  • includeMarkdown: true (default) โ€” Full Markdown content in output
  • includeHtml: false (default) โ€” No raw HTML in output (saves space)
  • Both can be disabled to return only metadata and metrics

7. Graceful Error Handling

  • Automatic retries with backoff for transient network errors
  • Timeout handling (60-second read timeout for large articles)
  • Content size limits (5MB max HTML)
  • Minimum content threshold (100 chars minimum to be considered valid)
  • Partial batch results preserved on individual failures

Input Parameters

FieldTypeRequiredDefaultDescription
urlstringYes*โ€”Single article URL to extract content from
batchModebooleanNofalseEnable batch processing for multiple URLs
batchDataarrayNo*โ€”Array of objects with url fields for batch mode (max 10 items)
includeMarkdownbooleanNotrueInclude converted Markdown in output
includeHtmlbooleanNofalseInclude extracted HTML content in output

*Either url (single mode) or batchMode: true with batchData[] must be provided.


Example Input

Single Article

{
"url": "https://example.com/article",
"includeMarkdown": true,
"includeHtml": false
}

Batch Mode (Multiple Articles)

{
"batchMode": true,
"batchData": [
{ "url": "https://example.com/article-1" },
{ "url": "https://example.com/article-2" },
{ "url": "https://example.com/article-3" }
],
"includeMarkdown": true,
"includeHtml": false
}

Output Structure

FieldTypeDescription
urlstringThe article URL that was processed
titlestringExtracted article title from og:title or
authorstringAuthor name from meta tags or JSON-LD
date_publishedstringPublication date in ISO format
domainstringDomain of the source URL
excerptstringArticle description or excerpt (first 300 chars)
word_countintegerTotal word count of the extracted content
reading_time_minutesintegerEstimated reading time at 200 words/minute
content_markdownstringFull article content in Markdown format (when includeMarkdown=true)
content_htmlstringExtracted article as clean HTML (when includeHtml=true)
content_textstringPlain text version of the article
content_lengthintegerLength of plain text content in characters
images_countintegerNumber of images in the extracted content
extraction_methodstringMethod used: readability-lxml or fallback-container
fetch_time_msnumberTime to fetch and process in milliseconds
http_statusintegerHTTP status code from the fetch
content_typestringContent-Type of the response
errorstringError message if extraction failed
successbooleanWhether extraction succeeded

Use Cases

  • Content migration between CMS platforms โ€” Moving from WordPress to a static site generator? Extract all articles as Markdown and import them into your new platform with metadata intact.

  • Building NLP datasets โ€” Researchers and data scientists need clean text for training. Batch-extract thousands of articles with structured metadata for fine-tuning language models.

  • Offline reading pipelines โ€” Fetch articles from your reading list and save them as Markdown files for offline consumption in any Markdown reader.

  • RSS feed enrichment โ€” Parse RSS feeds, extract the full article content for each entry, and republish enriched feeds. No more truncated "Read more..." links.

  • Content archival โ€” Archive important web articles as Markdown files before they disappear. Preserve the content, not just the URL.

  • AI training data preparation โ€” Extract articles as clean Markdown for LLM training datasets. Remove HTML boilerplate, navigation, and ads in one pass.

  • Documentation migration โ€” Converting HTML documentation to Markdown for docs-as-code workflows. Preserve formatting while stripping navigation chrome.


FAQ

What URL types does this support? Any public HTML webpage containing article-style content. Works best with news articles, blog posts, documentation pages, and long-form content. May not work well with video pages, product pages, or JavaScript-heavy single-page apps.

How accurate is the content extraction? The readability-lxml algorithm is the same technology behind Firefox Reader View and Pocket. It correctly identifies the main content block on approximately 85โ€“95% of article pages. For pages with unusual layouts, the fallback container extraction may include some non-content elements.

What happens if the URL requires JavaScript to render content? This actor fetches raw HTML, it does not execute JavaScript. For JS-rendered pages (SPAs, React apps), the content may not be available in the initial HTML. For such cases, consider using the Website Content Crawler or a browser-based actor.

Does this work with paywalled articles? Paywalls are site-specific and usually require authentication. This actor does not handle cookies, sessions, or login forms. Public article content is extracted, but paywalled or login-required pages will not return full content.

How large can the article be? The actor accepts up to 5MB of HTML (far larger than any single article). The reading timeout is 60 seconds, sufficient for large multi-page articles. Output size depends on the content but is typically 5โ€“50KB per article in Markdown.

Can I control what's included in the output? Yes. Set includeMarkdown to false to get only metadata without the full article text. Set includeHtml to true to include the extracted clean HTML alongside the Markdown. Both default to reasonable values for most use cases.

How is reading time calculated? Standard formula: word count รท 200 words per minute, rounded up to the nearest minute. This is the same metric used by Medium, supporting 3+ studies on average adult reading speed.

What metadata can be extracted? Title (from og:title, twitter:title, or

Can I use this in CI/CD pipelines? Yes. Call the Apify API with the actor input and parse the dataset output. The structured JSON output is designed for programmatic consumption.

What languages does it support? The extraction works on any language since readability algorithms analyze HTML structure, not content language. Metadata extraction works best with English meta tags but is format-agnostic.


Usage & Billing

This actor uses a pay-per-event pricing model. You are charged only for successful operations:

Event NamePrice (USD)Trigger
apify-actor-start$0.005Every run (once per run)
article-extract$0.015Per article successfully extracted
convert-markdown$0.010Per article converted to Markdown
batch-process$0.005One-time charge when using batch mode

Example cost:

  • Single article with Markdown: $0.005 + $0.015 + $0.010 = $0.03
  • Batch of 5 articles with Markdown: $0.005 + $0.005 + (5 ร— $0.015) + (5 ร— $0.010) = $0.135

Only successfully extracted articles are charged. Failed fetches or parsing errors are not billed.


MCP Integration

This actor can be used as a tool inside any MCP-compatible AI client (Claude Desktop, Cursor, VS Code with Copilot) via the Apify MCP server.

Quick Start

  1. Ensure your MCP client is configured to use the Apify MCP server:
{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com"
}
}
}

On first connection, your browser will open to sign in to Apify and authorize access.

  1. Ask your AI assistant to extract article content. Example prompts:

"Extract the article from https://example.com/article and return it as Markdown."

"Fetch these three articles and give me their titles, word counts, and full Markdown content: example.com/article-1, example.com/article-2, example.com/article-3."

Bearer Token Alternative

For headless environments (CI/CD, VS Code without browser-based OAuth), configure with a personal API token:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
}
}
}
}

Note: The OAuth flow is recommended for security. API tokens should be treated as secrets and never committed to version control.