DocsIntentforgeapi specification

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:

ParameterTypeDefaultDescription
qString(Required)The search query.
limitInteger15Number of results to return.
offsetInteger0Number of results to skip.
categoryStringNoneFilter results by category (e.g., news, web).
media_typeStringNoneFilter by media type (text, image, video).
semantic_ratioFloat0.7The 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 ImageResult objects.

GET /videos

Dedicated video search endpoint.

  • Parameters: q, limit
  • Response: List of VideoResult objects.

GET /news

Real-time news aggregation.

  • Parameters: q, limit, location
  • Response: List of NewsResult objects.

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.