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 key3
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
| Error | Status | Cause | Fix |
|---|---|---|---|
unauthorized | 401 | Missing or invalid API key | Include your API key in the x-api-key header |
invalid_url | 400 | URL is malformed or uses unsupported protocol | Ensure the URL starts with http:// or https:// |
fetch_failed | 400 | Cannot reach the target URL | Verify the URL is accessible and not behind a firewall |
rate_limited | 429 | Too many requests | Wait 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.