How to convert any URL into AI ready Markdown for Free

Simple to use API for converting any html url content into markdown.

Share
How to convert any URL into AI ready Markdown for Free
Photo by Douglas Lopes / Unsplash

Working with AI often means feeding it the right data in the right format. But most web pages are messy. They come with headers, footers, menus, ads, and other distractions that add noise instead of value.

That’s where Lemino AI's URL to Markdown API comes in with up to 5000 free conversions. It can turn any Webpage or Document into clean, structured Markdown, perfect for use in AI pipelines, RAG systems, note-taking apps, or knowledge bases.

Key Features

  • Flexible content extraction – pulls out the main body text, images, and key content.
  • Noise filtering – reliably removes headers, footers, sidebars, menus, and ads.
  • JavaScript support – works on modern, dynamic websites.
  • HTML to Markdown – extracts main content, preserves formatting.
  • PDF to Markdown – preserves formatting, tables, and structure.
  • Document to Markdown - Many other document formats supported as well.
  • AI-ready output – gives you clean, structured Markdown with minimal fuss.

Quick Start: Try in Your Browser

Simply prepend this to any URL:

https://platform.lemino.ai/api/url2md/

Example: Click here or run in your terminal to convert example.com:

curl "https://platform.lemino.ai/api/url2md/https://www.example.com"

Yes it's that easy!


Example API Usage

With just a few lines of code, you can fetch Markdown from any webpage or PDF:

cURL

URL="https://www.example.com"
curl -X GET https://platform.lemino.ai/api/url2md/$URL \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept: text/plain"

JavaScript (Fetch)

const url = 'https://www.example.com';
const apiUrl = 'https://platform.lemino.ai/api/url2md/' + url;

const response = await fetch(apiUrl, {
  method: 'GET',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'accept': 'text/plain'
  }
});

const markdown = await response.text();
console.log(markdown);

Python (requests)

import requests

url = 'https://www.example.com'
api_url = 'https://platform.lemino.ai/api/url2md/' + url
headers = {
  'x-api-key': 'YOUR_API_KEY',
  'accept': 'text/plain'
}

response = requests.get(api_url, headers=headers)
markdown = response.text
print(markdown)

PHP (cURL)

<?php

$url = 'https://www.example.com';
$api_url = 'https://platform.lemino.ai/api/url2md/' . $url;

$headers = [
    'x-api-key: YOUR_API_KEY',
    'accept: text/plain'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

?>

More examples available here for Go, Ruby, Java, Kotlin, Swift, C++, and C#.

Chunked Output

Note that if you use json output, large content will automatically be chunked into pieces intelligently. For json output instead of plain text, just use the following header.

'accept': 'application/json'

Why This Matters

If you’re building AI applications—whether it’s a RAG system, chatbot, document pipeline, or knowledge base - having clean, structured, noise-free data is crucial. Lemino's URL to Markdown API ensures your AI consumes only what matters, the real content.


Get Started

Test it out now in Lemino Platform