OpenGraph.ioOpenGraph.io
AI and RAG

Web scraping for LLMs and RAG pipelines

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 tool
Starting price for a page of Markdown
1 credit
Characters per chunk by default, split at headings
~2,000
Metadata fields with every page, ready for citations
7
Adds prompt injection protection to any request
+1 credit
The pipeline

Web scraping for RAG, from URL to embeddings

  1. Send a URL

    Any public page. Pages built with JavaScript are detected and rendered for you.

  2. Get clean Markdown

    Navigation, ads and scripts are removed. Headings, lists, tables and links stay.

  3. Receive chunks

    Add chunking=true and the page arrives split at headings, each chunk with its heading path and position.

  4. Embed and cite

    Store each chunk with the page title and canonical URL so every answer can point back to its source.

Built for retrieval

Everything your ingestion step needs

01Chunking

Chunks that keep their context

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.

02Query focused

Send only the passages that matter

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.

03Cost and safety

Stay inside your token budget, safely

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.

Drop it into your pipeline

A loader in a few lines

Each chunk comes back ready for your vector store, with its source and heading path as metadata.

load_chunks.py
Python
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.

Documented

Every field, documented

Know exactly what comes back

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 chunks section of the Markdown API docs, showing the fields returned for each chunk
Agents too

The same output inside Claude or Cursor

Let your agent read pages on demand

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

FAQ

It means fetching web pages and turning them into text a language model can use well: clean Markdown without navigation or ads, split into chunks, with metadata that lets the model cite its source.
Send each page URL to the Markdown API with format=json and chunking=true. You get chunks with heading paths, token counts and page metadata, ready to embed. Chunking parameters →
About 2,000 characters by default, split at headings. Each chunk reports its own character and token counts so you can size batches for your embedding model.
Yes. On version 3 the API detects JavaScript app shells and renders them automatically, and uses proxies when a site blocks plain requests.
Title, description, canonical URL, site name, image, language and the final URL after redirects, so every chunk can be cited.

Start feeding your RAG pipeline

Clean Markdown and ready to embed chunks from any URL.

No credit card required to start.