Turn the pages you care about into LLM ready data. Every chunk keeps its heading path, its token count and the page it came from, so your answers can cite their source.
Or see the Markdown for any page with the free toolAny public page. Pages built with JavaScript are detected and rendered for you.
Navigation, ads and scripts are removed. Headings, lists, tables and links stay.
Add chunking=true and the page arrives split at headings, each chunk with its heading path and position.
Store each chunk with the page title and canonical URL so every answer can point back to its source.
Pages are split at headings, about 2,000 characters at a time. Each chunk carries its heading path, token count and offsets, so retrieval knows exactly where a passage came from.
Add a query and query_top_k, and the API ranks the chunks against it, best match first, each with a relevance score. Your model reads three passages instead of the whole page.
Every response reports character and token counts. Set max_chars to cap any page, and turn on ai_sanitize to strip hidden instructions before the text reaches your model.
Each chunk comes back ready for your vector store, with its source and heading path as metadata.
import requests
from urllib.parse import quote
BASE = "https://opengraph.io/api/3.0/markdown/"
def load_chunks(url):
data = requests.get(BASE + quote(url, safe=""), params={
"app_id": APP_ID, "format": "json", "chunking": "true",
}).json()
return [{
"text": c["text"],
"source": data["metadata"]["canonical_url"],
"heading_path": c["heading_path"],
} for c in data["chunks"]]Want the full walkthrough? Read URL to Markdown for RAG or browse the Markdown API docs.
Each chunk reports its index, heading path, character and token counts and its offsets, and the usage block tells you how many chunks the page produced in total.
Markdown API docs
The Markdown tool in our MCP server returns the same clean content and chunks, so an agent can read a page in the middle of a conversation.
MCP web scraping for AI agents