API Documentation
Authentication
All API requests require an API token in the Authorization header:
Authorization: Bearer ce_your_token_hereExtract Content
Extract clean content from HTML:
POST /v1/extract
Content-Type: application/json
Authorization: Bearer ce_your_token_here
{
"html": "<!doctype html><html>...</html>",
"url": "https://example.com/article" // optional
}Response:
{
"title": "Article Title",
"content": "Clean article content as plain text...",
"excerpt": "Brief summary",
"author": "Author Name",
"publishedAt": "2024-01-01T00:00:00Z",
"language": "en"
}Example: cURL
curl -X POST http://localhost:4000/v1/extract \
-H "Authorization: Bearer ce_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"html": "<html><body><article><h1>Title</h1><p>Content</p></article></body></html>"
}'Error Responses
402 Payment Required: No remaining credits
{
"error": "QUOTA_EXCEEDED",
"message": "No remaining credits for this token."
}401 Unauthorized: Invalid or missing token
{
"error": "UNAUTHORIZED",
"message": "Invalid or inactive API token"
}