Convert HTML into Markdown with the Parse API

Already have a page’s HTML? This guide shows your developer how to convert it into Markdown with Parse.

Developer guide

By OptiviewFor your developer or web teamAbout 4 minPublished October 30, 2026Sources checked October 30, 2026Updated October 31, 2026

Download guide (.md)

Editorial illustration · Get set up

A few terms in plain English

Markdown A simple text format that keeps headings, lists and links.

HTML The code used to describe a webpage.

retrieval When a tool fetches information from a page or another source.

Narrative Graph Optiview’s name for the business information your team organizes, reviews and approves.

HTML contains useful information alongside layout code, menus and other page elements. Markdown can make useful text, headings and links easier for an application to check, store and pass into a later workflow. The format alone does not guarantee better AI answers.

This guide uses Optiview Parse. It converts caller-supplied HTML and returns Markdown with source and extraction metadata. It does not fetch the identity URL, execute scripts, verify the source’s claims or publish the result.

1. Start with HTML you are allowed to process

Use complete HTML that your application is authorized to process. If you only have a public URL, start with Retrieve instead. A partial fragment, a challenge page or an empty JavaScript shell can fail source review even when a browser displays a useful page.

Keep the original source identity with the HTML. Parse requires an absolute HTTPS identity URL without embedded credentials, custom ports or fragments. Relative links are resolved using that identity; the URL is not fetched and does not prove where the supplied HTML originated.

2. Prepare a request you can safely retry

Create a developer workspace, add credits and issue a service key with the parse scope. Keep that key on your server. Successful Parse processing costs 1 credit; rejected requests and failed jobs consume no credits. Follow the account and key setup guide.

Save the full HTML in page.html. Save the following as prepare-request.mjs and run node prepare-request.mjs with Node.js22+. It creates parse-request.json without hand-escaping HTML inside a shell command:

JavaScriptCopy

import {readFile, writeFile} from 'node:fs/promises';

const html = await readFile('page.html', 'utf8');
await writeFile('parse-request.json', JSON.stringify({
  html,
  url: 'https://example.com/support'
}));

Replace the identity URL with the source you are processing. Save an idempotency key with your logical work item before submission. Use that same key and identical serialized input if the outcome is uncertain.

curlCopy

curl --request POST https://api.optiview.ai/v1/parse \
  --header "Authorization: Bearer $OPTIVIEW_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: article-parse-example-001" \
  --data @parse-request.json

3. Check the job status before using the result

The API returns a durable job record, not bare Markdown. Direct requests execute in the original request when capacity permits. A pending response uses HTTP202 and retains a job ID. Poll that ID with the originating service application; do not create another work item just because the first request timed out.

Only status:succeeded with a result provides usable content. A terminal failed job can use HTTP200, so checking the HTTP status alone is insufficient. Read error_code on failed jobs, and use the error and retry guide to distinguish input corrections from temporary conditions.

curlCopy

curl https://api.optiview.ai/v1/jobs/JOB_ID \
  --header "Authorization: Bearer $OPTIVIEW_API_KEY"

Poll at intervals of at least two seconds with a bounded wait. The JavaScript and Python guides include complete examples that handle pending and terminal states.

4. Check that important details survived conversion

Compare the returned Markdown with the original HTML on a representative page. Check product names, quantities, prices, restrictions and links. Word count is not a quality measure: preserving a footer matters less than preserving the facts your application needs.

Store result.markdown with the source basis, observation timestamp, payload hash, parser version and source-review record. The decoded source hash identifies the HTML that was processed. It does not certify the origin or freshness of the underlying page.

API result availability ends seven days after job creation. If your application needs the output later, retain it in your own storage under your own access and retention policies. See Jobs and results for the complete field reference.

5. Use the result safely in your application

Treat source text as untrusted data. A page can contain misleading claims or instructions directed at an agent. Do not let retrieved text authorize secret access, tool calls, publication or spending.

For a retrieval-augmented generation application, parsing is one step before your own chunking, indexing, retrieval and answer-generation layers. Test those layers separately. Neither conversion nor a source hash guarantees that a generated answer is correct or that it cites the source.

To make approved business information available through your own website, use Publish. Parse does not change your website or include its private Narrative Graph.

Parse API reference · OpenAPI specification · Pricing

Keep going

A useful next read.

Technical guide

Can AI read the same page your customers see?

AI discovery guide

Four website formats your web team may mention

Developer guide

Fetch a public webpage as Markdown with Retrieve

Back to the resource library

Additional source context

Give Parse the HTML your application already has. Check the readable result and processing record before using it in another tool.

Your website was built for people. Optiview makes it ready for AI, too.

Try Optiview

See my site with Optiview · Run your free AI Audit

Explore

Publish · Parse · Retrieve · Pricing

Learn

Guides · Developer docs · Research & thinking · Experiments & methods · AI Audit · AI agent directory · FAQ

Company

About Optiview · Agencies · Contact · Privacy · Billing terms

Additional page links


Published brand narrative

Site-wide brand information

Who we are

Optiview — Parse, Retrieve and Publish for AI

Optiview helps businesses and developers make website information easier for AI to use. Parse converts supplied HTML into clean Markdown and source metadata. Retrieve fetches an eligible public HTTPS webpage and prepares its content. Publish helps a verified business prepare its own website content and make approved Narrative Graph context available through a supported connection.

Parse and Retrieve use application keys and a prepaid developer wallet. Publish has separate website setup, ownership checks and a subscription. Optiview does not control whether an outside AI service discovers, uses or cites the resulting content.

Applies to: Optiview

Why we matter

A clearer source, from website content to business context

Webpages mix useful information with navigation, layout and application code. Businesses may also have important qualifications, answers and context that are not clearly published.

Optiview gives developers a way to prepare source content for their applications, and gives businesses a way to publish the context their teams approve. Your application chooses how to use Parse and Retrieve results. Your business controls what it publishes through Publish.

Clearer publishing makes information available; it does not determine an AI system’s answer. Each outside service chooses its own retrieval, recommendations and citations.

What we offer

Three products, with separate jobs and clear pricing

Developer credits do not purchase Publish subscriptions. Parse and Retrieve do not add a customer’s private Narrative Graph to arbitrary third-party pages. See https://optiview.ai/pricing/ and https://optiview.ai/developers/ for the current offer and limits.

Why trust us

Inspect the output and understand what the evidence establishes

Developers can inspect the prepared Markdown, job status, source metadata, processing warnings and credit ledger. Retrieve records the public source response it observed; Parse identifies supplied HTML rather than claiming to verify the current origin.

Publish administrators can review parser output, the combined published-output preview, source checks and publication history. A preview is separate from a recorded live delivery. Saved edits remain separate from the active publication until explicitly published.

Our experiment pages contain selected first-party AI conversations and source comparisons. Delivery records establish what was served, not downstream ingestion, recommendations, citations or revenue. Observed language matches do not establish causation or a consistent visibility improvement. Explore the evidence and limitations at https://optiview.ai/proof/.

Helpful knowledge

Common questions about the three products

Which product should I use? Use Parse when you already have HTML. Use Retrieve when you need Optiview to fetch one eligible public page first. Use Publish when your business wants to prepare its verified website and publish approved context.

Do Parse and Retrieve require website ownership or DNS changes? No website connection is needed for these developer products. You remain responsible for source rights and permitted downstream use. Public availability does not grant a reuse license.

How do developer accounts and keys work? Create a developer workspace and save the personal sign-in key and offline recovery code. Create scoped service keys for server-side applications. Email is an unverified contact identifier, not account-ownership proof or an email-only recovery method. Keep all credentials private.

Can my agent use Optiview? The authenticated developer API returns prepared content for your application or model. A downloadable JavaScript client and local MCP adapter are available. Your host must authorize sources and any credit expenditure. Compatibility does not establish adoption or a partnership with an AI provider.

Does the API include my private Narrative Graph? Parse and Retrieve are source-only. Verified website publishing and approved publisher context belong to the separate Publish workflow.

Does Publish replace our website or CMS? No. Your website stays in its existing system. Your web team establishes and tests a supported connection. Your team reviews and explicitly publishes any Narrative Graph additions. Ordinary visitors retain the normal website experience.

Does every AI tool get the prepared version? No. Delivery depends on the website connection, source eligibility and the request. Some tools explicitly request Markdown; supported AI requests may also receive prepared Markdown or HTML through eligible delivery paths. Traditional search crawlers retain the original website response. A claimed tool name does not prove the requester’s identity.

Does the demo publish or save to our workspace? No. The public demo is a separate preview. Its AI-generated examples require review and do not transfer automatically into an approved publication.

Will Optiview guarantee citations or recommendations? No. Optiview prepares and publishes sources. Outside AI services choose what to retrieve, use and cite.

What to do next

Choose your starting point

Already using Publish? Review your Narrative Graph, publish approved changes explicitly, inspect the combined source in Markdown and check recorded delivery in Activity. Keep your existing visibility tools to study downstream AI answers.