docs/examples/website-to-api/static/index.html
This example shows how to turn any website into an API using Crawl4AI.
URL:
QUERY:
Approach:LLM-based (More Flexible)Schema-based (Uses LLM once!)
Model:Select a Model
Extract Data
→
API Request (cURL):
curl -X POST http://localhost:8000/scrape -H "Content-Type: application/json" -d '{"url": "...", "query": "..."}'
# Or for LLM-based approach:
curl -X POST http://localhost:8000/scrape-with-llm -H "Content-Type: application/json" -d '{"url": "...", "query": "..."}'
JSON Response:
{
"success": true,
"extracted_data": [
{
"title": "Example Book",
"author": "John Doe",
"description": "A great book..."
}
]
}
Copy JSON
URL:
Query:
Model Used:
AI is analyzing the website and extracting data...
Configure and manage your AI model configurations
Model Name:
Provider:
API Token: Save Model
View and manage your previous API requests