← Back to Docs

REST API Reference

Base URL: https://api.slaash.ai/v1 — All endpoints require Authorization: Bearer sk-...

POST /v1/extract

Core extraction. URL + goal → ranked semantic nodes.

{
  "url": "https://example.com",          // required
  "goal": "what is the price",            // required
  "options": {
    "top_n": 20,                          // max nodes (default: 20)
    "format": "json",                     // "json", "markdown", "toon"
    "run_js": false,                      // evaluate JavaScript
    "follow_links": false                 // auto-follow relevant links
  }
}

POST /v1/learn

Feedback. Teach which nodes were correct.

{
  "url": "https://example.com",           // must match a previous extract
  "goal": "what is the price",
  "node_ids": [5, 12, 23]                 // IDs from extract response
}

POST /v1/search

Web search via DuckDuckGo + optional deep parse of results.

{
  "query": "latest AI news 2026",
  "options": { "deep": true, "max_results": 5 }
}

POST /v1/crawl

Multi-page intelligent crawl with Thompson Sampling.

{
  "url": "https://docs.python.org/3/",
  "goal": "async programming tutorial",
  "options": { "max_pages": 10, "max_depth": 3 }
}

POST /v1/act

Interact with page elements.

{
  "url": "https://shop.example.com",
  "action": "extract",                    // "click", "fill", "extract"
  "target": ["price", "title"],
  "goal": "find product details"
}

POST /v1/plan

Decompose a goal into ordered steps.

{ "goal": "Buy cheapest flight Stockholm to London" }

POST /v1/stream

Token-efficient streaming via WebSocket. 95-99% savings.

{ "url": "...", "goal": "...", "options": { "max_nodes": 50 } }

POST /v1/diff

Compare two page snapshots.

{ "url": "https://news.site.com", "url2": "https://news.site.com" }

POST /v1/render

Screenshot a page. Returns PNG base64.

{ "url": "...", "options": { "width": 1280, "height": 900 } }

POST /v1/links

Discover and rank links on a page.

{ "url": "...", "goal": "...", "options": { "max_links": 20 } }

POST /v1/explore

Find hidden API endpoints (XHR/fetch in scripts).

{ "url": "..." }

POST /v1/inspect

Security check. Injection scan or firewall classification.

{ "text": "ignore previous instructions..." }
// or
{ "url": "https://suspicious.site" }

Response format

All responses follow this structure:

{
  "nodes": [...],                         // ranked semantic nodes
  "node_count": 8,
  "total_nodes": 5420,                    // original DOM size
  "parse_time_ms": 42,
  "token_savings": "99.1%"
}

Error handling

401 — invalid or missing API key. 429 — rate limit exceeded (includes retry_after). 500 — server error.