Getting Started

Quickstart

Get up and running with the Markdown for Agents API in under 5 minutes.

1

Get Your API Key

Sign up for an account to get your API key. The free tier includes 100 requests per hour.

2

Make Your First Request

Send a POST request to /extract with your API key in the x-api-key header.

bash
curl -X POST https://api.markdownforagents.com/extract \
  -H "Content-Type: application/json" \
  -H "x-api-key: your_api_key_here" \
  -H "x-api-version: 1.0.0" \
  -d '{"url": "https://example.com/article"}'
Replace your_api_key_here with your actual API key
3

Use Strict Mode & Idempotency

Strict Mode

Enable strict mode with x-strict-mode: 1 to reject pages with extraction issues rather than returning partial content.

bash
curl -X POST https://api.markdownforagents.com/extract \
  -H "Content-Type: application/json" \
  -H "x-api-key: your_api_key_here" \
  -H "x-api-version: 1.0.0" \
  -H "x-strict-mode: 1" \
  -d '{"url": "https://example.com/article"}'

Idempotency Key

Include an Idempotency-Key header to safely retry requests without duplicate processing.

bash
curl -X POST https://api.markdownforagents.com/extract \
  -H "Content-Type: application/json" \
  -H "x-api-key: your_api_key_here" \
  -H "x-api-version: 1.0.0" \
  -H "Idempotency-Key: extract-req-001" \
  -d '{"url": "https://example.com/article"}'
4

Handle Common Errors

ErrorStatusCauseFix
unauthorized401Missing or invalid API keyInclude your API key in the x-api-key header
invalid_url400URL is malformed or uses unsupported protocolEnsure the URL starts with http:// or https://
fetch_failed400Cannot reach the target URLVerify the URL is accessible and not behind a firewall
rate_limited429Too many requestsWait for the rate limit window to reset or upgrade your plan
5

Next Steps

Ready to start building?

Get your API key and make your first request.

Get API Key