API Specification
IntentForge v2 exposes a RESTful API on port 9100. This reference covers the primary endpoints used for searching, crawling, and monitoring.
1. Search
GET /search
Performs a hybrid semantic + keyword search with real-time meta-search fallback.
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
q | String | (Required) | The search query. |
limit | Integer | 15 | Number of results to return. |
offset | Integer | 0 | Number of results to skip. |
category | String | None | Filter results by category (e.g., news, web). |
media_type | String | None | Filter by media type (text, image, video). |
semantic_ratio | Float | 0.7 | The weight of semantic search vs keyword search (0.0 to 1.0). |
Response Example:
{
"query": "rust programming",
"results": [
{
"id": "ext-abc123",
"title": "Rust Programming Language",
"url": "https://www.rust-lang.org/",
"description": "A language empowering everyone to build reliable and efficient software.",
"category": "web",
"source": "discovery",
"media_type": "text",
"intent_score": 0.98,
"relevance_score": 0.95
}
],
"total": 125,
"latency_ms": 42.5,
"self_improving": false,
"query_type": "Informational",
"attributes": {
"skill_level": "beginner",
"content_type": "documentation"
}
}
2. Media Search
GET /images
Dedicated image search endpoint.
- Parameters:
q,limit - Response: List of
ImageResultobjects.
GET /videos
Dedicated video search endpoint.
- Parameters:
q,limit - Response: List of
VideoResultobjects.
GET /news
Real-time news aggregation.
- Parameters:
q,limit,location - Response: List of
NewsResultobjects.
3. Crawler & Content
GET /crawl
Trigger a manual crawl of a specific URL.
- Parameters:
url
GET /content/:id
Retrieve the full, cleaned content of a document stored in the Redis cache.
4. Discovery & Administration
POST /discovery/enqueue
Manually enqueue a URL into the autonomous discovery pipeline.
- Body:
{"url": "...", "priority": 5, "category": "manual"}
GET /health
Liveness check. Returns {"status": "ok"}.
GET /metrics
Prometheus-formatted metrics for monitoring system performance, index size, and cache hits.