getOgMarkdown
Convert any URL into clean Markdown, stripping navigation, ads, and boilerplate for LLM-ready prose. Supports targeting specific sections with CSS selectors.
Instructions
Convert any URL's HTML into clean Markdown via the OpenGraph.io API (v3 markdown endpoint). Strips navigation, ads, and boilerplate by default — the result is main-content prose, headings, links, and images ready to read or feed into another model. Use include_tags / exclude_tags to target or remove specific page sections.
IMPORTANT — JavaScript-heavy pages: the v3 smart defaults (auto_render) do NOT apply to the markdown pipeline. If the target URL is an SPA or requires JS execution, you must explicitly set full_render: true to get rendered HTML before conversion. Without it, you will receive the raw server-side HTML (which may be mostly empty for JS apps).
The Markdown text block is capped at 6 000 characters; the full content is always available in the structured markdown field.
Pick the right tool: getOgData → Open Graph tags, social preview metadata (title, description, image, favicon) getOgMarkdown → Clean readable text / article prose — ideal for feeding into an LLM getOgScrapeData → Raw HTML — use when you need to do your own parsing or link extraction getOgExtract → Targeted elements by tag (html_elements) or named CSS selectors (selectors) getOgScreenshot → Visual capture of a page as an image getOgQuery → Natural-language question answered from page content (100–200 credits/request)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the webpage to convert to Markdown. | |
| retry | No | Automatically retry failed requests. | |
| cache_ok | No | Use cached results. Set to false to bypass cache. Defaults to true. | |
| use_proxy | No | Route the request through a standard proxy. | |
| auto_proxy | No | Automatically escalate to a proxy if the direct request fails. | |
| accept_lang | No | Accept-Language header for the outbound request. Defaults to 'auto'. | |
| ai_sanitize | No | Scan the fetched content for prompt-injection attempts. | |
| full_render | No | Fully render the page with JavaScript before conversion. REQUIRED for SPAs and JS-heavy sites — v3 auto_render does NOT apply to the markdown pipeline. | |
| max_retries | No | Maximum number of retry attempts (1–4). Defaults to 4. | |
| use_premium | No | Route the request through a premium proxy. | |
| exclude_tags | No | CSS selectors to remove before conversion. Supports wildcard/regex patterns. Example: ['nav', 'footer', '.sidebar', '.ad*']. | |
| include_tags | No | CSS selectors — keep only elements matching these selectors. Example: ['article', 'main', '.content'] to target the main content area only. | |
| use_superior | No | Route the request through a superior-tier proxy. | |
| max_cache_age | No | Maximum cache age in milliseconds. Defaults to 432000000 (5 days). | |
| proxy_country | No | Two-letter ISO country code for geo-targeted proxy exit node. | |
| load_more_wait | No | Milliseconds to wait after each load_more click (0–5000). Defaults to 1500. | |
| retry_escalate | No | Escalate proxy tier on each retry attempt. Defaults to true. | |
| ai_sanitize_mode | No | 'sanitize' cleans the content, 'warn' returns a safety report, 'block' returns HTTP 422. | |
| load_more_clicks | No | Number of times to click the load_more_selector (1–10). Defaults to 3. | |
| scroll_to_bottom | No | Scroll to the bottom of the page before conversion. Forces full_render. | |
| only_main_content | No | Heuristically strip navigation, header, footer, and ads, keeping only main prose content. Defaults to true server-side. Set to false to convert the full page. | |
| wait_for_selector | No | CSS selector to wait for before converting. Forces full_render. | |
| load_more_selector | No | CSS selector for a 'load more' button to click before conversion. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| length | Yes | Character count of the Markdown content | |
| markdown | Yes | Full Markdown content of the page | |
| requestInfo | No | ||
| onlyMainContent | No |