Search and Auto-Audit
This endpoint requires authentication. Include a valid JWT bearer token in the Authorization header.
POST /api/v1/search
Process a search query and optionally trigger an audit if a URL is detected.
The search query. If a URL is detected, an audit will be automatically started.
Response
AI-generated response to the query
List of suggested actions or follow-up queries
ID of the automatically created audit (if a URL was detected)
Whether an audit was automatically triggered
Example Request
Example Response
Auto-Audit Behavior
When a URL is detected in the search query:- URL Extraction: The system uses regex to extract valid HTTP/HTTPS URLs
- Audit Creation: Automatically creates an audit with default settings:
max_crawl: 30 pagesmax_audit: 3 pages (detailed analysis)
- Background Processing: The audit runs asynchronously via Celery worker
- User Association: The audit is linked to the authenticated user
Monitor audit progress using the SSE endpoint or polling the audit status endpoint.
Error Codes
| Code | Description |
|---|---|
| 401 | Missing or invalid authentication token |
| 422 | Invalid request format |
| 500 | Internal server error |
| 503 | Celery worker unavailable (falls back to sync mode in debug) |
Next Steps
Audit API
View and manage created audits
SSE API
Monitor audit progress in real-time