/v1/markdown endpoint
Strips nav, ads, and footers. Returns clean Markdown ready for LLM ingestion.
Language:
POST
/v1/markdown
5 creditsFetches the target URL via headless browser, extracts the main content block, and strips boilerplate - navigation, ads, footers, cookie banners. Returns structured Markdown with word count and metadata.
Request body
| field | type | req | description |
|---|---|---|---|
url | string | yes | Full URL to scrape. Must include protocol (https://). |
options.includeImages | boolean | no | Embed image alt-text in Markdown output. Default: false. |
options.timeout | number | no | Timeout in ms. Default: 30000. Max: 60000. |
Example
curl -X POST https://contextforai.ashutoshswamy.in/v1/markdown \
-H "Authorization: Bearer cfai_your_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'Response
200 OK
{
"url": "https://example.com",
"title": "Example Domain",
"markdown": "# Example Domain\n\nThis domain is for use in illustrative examples.",
"wordCount": 17,
"extractedAt": "2026-07-01T10:00:00Z"
}