{
    "name": "ZACKTOK Search Engine API",
    "version": "1.0.0",
    "description": "RESTful API for the ZACKTOK open source search engine",
    "endpoints": [
        {
            "path": "\/search",
            "method": "GET",
            "description": "Search indexed pages",
            "parameters": {
                "q": "Search query (required)",
                "limit": "Number of results (default: 10, max: 100)",
                "offset": "Pagination offset (default: 0)"
            },
            "example": "\/search?q=php&limit=20"
        },
        {
            "path": "\/pages",
            "method": "GET",
            "description": "List all indexed pages",
            "parameters": {
                "limit": "Number of results (default: 50)",
                "offset": "Pagination offset (default: 0)"
            }
        },
        {
            "path": "\/pages",
            "method": "POST",
            "description": "Add a new page to the index",
            "body": {
                "url": "Page URL (required)",
                "title": "Page title (required)",
                "description": "Page description",
                "content": "Page content",
                "keywords": "Comma-separated keywords"
            }
        },
        {
            "path": "\/pages\/{id}",
            "method": "GET",
            "description": "Get a specific page by ID"
        },
        {
            "path": "\/pages\/{id}",
            "method": "DELETE",
            "description": "Delete a page from the index"
        },
        {
            "path": "\/stats",
            "method": "GET",
            "description": "Get search engine statistics"
        },
        {
            "path": "\/categories",
            "method": "GET",
            "description": "List all categories"
        },
        {
            "path": "\/crawl",
            "method": "POST",
            "description": "Crawl and index a URL",
            "parameters": {
                "url": "URL to crawl (required)",
                "depth": "Crawl depth (default: 1)"
            }
        }
    ],
    "authentication": "Most endpoints are public. Admin endpoints may require authentication in future versions."
}