import Link from 'next/link' export default function Docs() { return (

API Documentation

API reference for Crawl API — 9 endpoints for crawling, scraping, screenshots, PDFs, and more.

Base URL

https://crawlapi.dev

Authentication

All requests require an API key sent via the x-api-key header.

x-api-key: YOUR_API_KEY

Request format

Every endpoint accepts a POST request with a JSON body. The url field is always required.

{`curl -X POST https://crawlapi.dev/api/screenshot \\
  -H "Content-Type: application/json" \\
  -H "x-api-key: YOUR_API_KEY" \\
  -d '{"url": "https://example.com"}'`}
        

Endpoints

{[ { path: '/api/crawl', desc: 'Full JS-rendered page crawl' }, { path: '/api/content', desc: 'Raw HTML content' }, { path: '/api/screenshot', desc: 'PNG screenshot' }, { path: '/api/pdf', desc: 'PDF export' }, { path: '/api/markdown', desc: 'Markdown extraction' }, { path: '/api/snapshot', desc: 'HTML + screenshot' }, { path: '/api/scrape', desc: 'CSS selector extraction' }, { path: '/api/json', desc: 'Structured JSON' }, { path: '/api/links', desc: 'Extract all links' }, ].map((ep) => (
POST{' '} {ep.path}
{ep.desc}
))}

Rate limits

{[ { label: 'Requests per minute', value: '60' }, { label: 'Max concurrent', value: '10' }, { label: 'Request timeout', value: '30s' }, ].map((row) => ( ))}
{row.label} {row.value}

Error handling

{`{ "success": false, "error": "Missing or invalid API key" }`}
        
{[ { code: '400', meaning: 'Missing or invalid URL / bad options' }, { code: '401', meaning: 'Missing or invalid API key' }, { code: '403', meaning: 'Insufficient credits' }, { code: '405', meaning: 'Wrong HTTP method (use POST)' }, { code: '429', meaning: 'Rate limit exceeded' }, { code: '500', meaning: 'Server error' }, ].map((row) => ( ))}
{row.code} {row.meaning}
) }