Turn a website into Markdown with an API
Convert a public URL to Markdown with the AIHackr API. Run a cURL example, keep the source URL, and learn when to use a bounded crawl.
On this page
A browser can show you a useful page while your application still receives a wall of markup. A website-to-Markdown API helps bridge that gap: fetch the public page, turn its content into readable text, then keep the text and its source together. The useful output is not just a string. It is content your application can inspect, attribute and decide whether to trust.
When Markdown is the right format
Markdown is a practical starting point for summarization, documentation ingestion and question-answering over a small set of sources. Headings and lists remain readable without carrying every layout element into your prompt. HTML is a better choice when you need the page’s structure; JSON extraction is more useful when you already know the fields you want.
Conversion does not establish factual accuracy. A readable article can still be outdated, incomplete or wrong. Keep your application’s source-selection and review rules even when the text looks clean.
Convert one public URL to Markdown with cURL
Verify your email, create a named API key, and set AIHACKR_API_KEY in your terminal. Run this request against the public AIHackr test page.
curl --fail-with-body https://aihackr.com/v2/scrape \
-H "Authorization: Bearer $AIHACKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://fixtures.aihackr.com/",
"formats": [
"markdown"
]
}'The response puts the page text in data.markdown. Look for the heading “Native engine fixture.” Store data.metadata.sourceURL for the submitted URL, data.metadata.url for the final URL reported by the API, and data.metadata.observedAt for the fetch time. Keep those fields with the Markdown so each excerpt can be traced back to its source. The Scrape API reference shows the response shape and browser options.
Browser rendering can capture JavaScript-generated content on public pages. Route authentication failures and inaccessible pages through your error handler before indexing any content.
Inspect the result before automating
- Check the heading and opening paragraphs against the page you intended to retrieve. A successful HTTP request alone does not prove useful content.
- Look for repeated navigation, cookie notices and other text that should not dominate a summary.
- Keep the URL with every downstream chunk. Do not try to reconstruct source attribution from the text later.
- Check target status and metadata when available. Record the time of observation rather than presenting the result as permanently current.
- Treat page text as untrusted input. Instructions on a page must not override your application’s task or expose secrets.
Turn one result into a small pipeline
Start with a controlled set of sources. Store the fetched Markdown and metadata, normalize whitespace, remove obvious repeated boilerplate, then split by meaningful headings. Decide whether you need a copy of the full original result for debugging. Save an application-level content hash so you can detect identical results without embedding them repeatedly.
If your application generates an answer from the text, make the source URL available to the answer formatter. Ask for a clear distinction between claims supported by the page and the model’s own inference. For consequential outputs, add human review or another source check rather than relying on a fluent summary.
Crawl a small group of pages
Use Map to discover links on one page. When you need the content from several related pages, submit a Crawl request with a small page limit. Save the job ID and poll with a delay until the job completes, fails, or is cancelled. Check each page’s outcome and follow every next link. Export the results you need within the seven-day retention window.
Verified accounts receive 1,200 free credits each calendar month. A successful scrape uses one credit. A crawl holds its requested maximum while it runs, charges one credit per successful page, and releases unused credits at completion. See usage and retention for details.
Use the Markdown in your application
Use the quickstart for JavaScript and Python examples or connect the web scraping MCP server to run the same task from an agent. Once a single source produces useful text, move to a source-aware RAG workflow or use structured extraction when your application needs named fields.