/v1/markdown endpoint

Strips nav, ads, and footers. Returns clean Markdown ready for LLM ingestion.

Language:
POST

/v1/markdown

5 credits

Fetches 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

fieldtypereqdescription
urlstringyesFull URL to scrape. Must include protocol (https://).
options.includeImagesbooleannoEmbed image alt-text in Markdown output. Default: false.
options.timeoutnumbernoTimeout 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"
}
← Full API reference: authentication, errors, rate limits, billing