Appearance
API Reference
Complete reference documentation for the UnWeb API.
Base URL
https://api.unweb.infoAuthentication
UnWeb supports two authentication methods:
API Key Authentication
Include your API key in the X-API-Key header:
bash
X-API-Key: unweb_your_api_key_hereUse API keys for:
- CLI tools
- Backend services
- Scripts and automation
- Any programmatic access
JWT Bearer Authentication
Include your JWT token in the Authorization header:
bash
Authorization: Bearer your_jwt_token_hereUse JWT tokens for:
- Dashboard web application
- Short-lived access (60 minute expiry)
- User-facing applications
Learn more about authentication →
Quick Reference
Conversion Endpoints
| Method | Endpoint | Description | Auth |
|---|---|---|---|
POST | /api/convert/paste | Convert HTML from JSON body | API Key or JWT |
POST | /api/convert/upload | Convert HTML from file upload | API Key or JWT |
POST | /api/convert/url | Convert HTML from URL | API Key or JWT |
Crawler Endpoints
| Method | Endpoint | Description | Auth |
|---|---|---|---|
POST | /api/crawl | Start a new crawl job | API Key or JWT |
GET | /api/crawl | List crawl jobs | API Key or JWT |
GET | /api/crawl/{id}/status | Get crawl job status | API Key or JWT |
GET | /api/crawl/{id}/download | Download crawl results | API Key or JWT |
DELETE | /api/crawl/{id} | Cancel crawl job | API Key or JWT |
Usage Endpoints
| Method | Endpoint | Description | Auth |
|---|---|---|---|
GET | /api/usage/current | Current billing cycle usage | JWT |
GET | /api/usage/stats | Usage statistics with daily breakdown | JWT |
GET | /api/usage/history | Recent usage records | JWT |
Authentication Endpoints
| Method | Endpoint | Description | Auth |
|---|---|---|---|
POST | /api/auth/register | User registration | None |
POST | /api/auth/login | User login | None |
POST | /api/auth/change-password | Change password | JWT |
GET | /api/auth/me | Get current user | JWT |
PUT | /api/auth/profile | Update profile | JWT |
API Key Management
| Method | Endpoint | Description | Auth |
|---|---|---|---|
GET | /api/keys | List API keys | JWT |
POST | /api/keys | Create new API key | JWT |
DELETE | /api/keys/{id} | Revoke API key | JWT |
Subscription Management
| Method | Endpoint | Description | Auth |
|---|---|---|---|
GET | /api/subscription | Get current subscription | JWT |
POST | /api/subscription/checkout | Create checkout URL | JWT |
POST | /api/subscription/cancel | Cancel subscription | JWT |
Rate Limits & Quotas
All accounts have monthly credit quotas based on their subscription tier:
| Tier | Monthly Credits | Price |
|---|---|---|
| Free | 500 | $0 |
| Starter | 2,000 | $12/month |
| Pro | 15,000 | $39/month |
| Scale | 60,000 | $99/month |
Learn more about rate limits →
Response Format
All API endpoints return JSON responses:
Success Response (200 OK):
json
{
"data": { ... },
"message": "Success"
}Error Response (4xx or 5xx):
json
{
"error": "Error message",
"details": "Additional error details"
}HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created successfully |
202 | Accepted | Request accepted (async processing) |
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Missing or invalid authentication |
403 | Forbidden | Quota exceeded or insufficient permissions |
404 | Not Found | Resource not found |
413 | Payload Too Large | File upload exceeds 5MB limit |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server error |
Code Examples
See complete code examples in multiple languages:
Need Help?
- Check the FAQ
- View the Getting Started Guide