LinkIntel

API reference

Base URL https://api.linkintel.dev. Authenticate with Authorization: Bearer <key> — create one on your dashboard. The full machine-readable spec is at /openapi.json.

Authentication

curl https://api.linkintel.dev/v1/capabilities \
  -H 'authorization: Bearer li_live_xxx'

POST/v1/check

Classify one URL. Returns the verdict plus the full evidence trace.

curl -X POST https://api.linkintel.dev/v1/check \
  -H 'authorization: Bearer li_live_xxx' \
  -H 'content-type: application/json' \
  -d '{
    "url": "https://shop.com/old-product",
    "includeRaw": false      // attach the full raw fetch payload (large)
  }'
{
  "url": "https://shop.com/old-product",
  "finalUrl": "https://shop.com/old-product",
  "status": "dead",              // alive | moved | parked | out_of_stock | dead
  "confidence": 0.99,
  "method": "heuristic",         // or "llm_tiebreak"
  "reachable": true,             // false = we couldn't fetch it (≠ dead)
  "signals": { "http": 404, "heuristic": { … } },
  "evidence": {
    "engineVersion": "0.1.0",
    "fetch": { "finalUrl": …, "httpStatus": 404, "durationMs": 512 },
    "page": { "title": "Page Not Found", "canonical": null, "contentHash": "…", "bodyExcerpt": "…" },
    "signals": { … },
    "decision": { "method": "heuristic", "confidence": 0.99, "reachable": true }
    // "raw": { … }  ← only when includeRaw=true
  }
}

POST/v1/heal

Classify, and if broken, find the best live replacement within allowedDomains. Fail-open cascade: confident replacement → your fallbackUrl → the original.

curl -X POST https://api.linkintel.dev/v1/heal \
  -H 'authorization: Bearer li_live_xxx' \
  -H 'content-type: application/json' \
  -d '{
    "url": "https://shop.com/old-shoe",
    "allowedDomains": ["shop.com"],
    "context": "old running shoe",
    "fallbackUrl": "https://shop.com/shoes"
  }'
{
  "status": "dead", "healed": true,
  "href": "https://shop.com/products/old-shoe-v2",
  "hrefSource": "replacement",   // replacement | fallback | original
  "resolveConfidence": 0.93,
  "coverage": { "shop.com": "sitemap" },
  "evidence": { … }
}

POST/v1/batch

Check up to 50 URLs in one call. Each item carries its own verdict + evidence; one bad URL never fails the batch.

curl -X POST https://api.linkintel.dev/v1/batch \
  -H 'authorization: Bearer li_live_xxx' \
  -H 'content-type: application/json' \
  -d '{ "urls": ["https://a.com/1", "https://a.com/2"] }'
# → { "count": 2, "results": [ { "url": …, "ok": true, "result": { … } }, … ] }

GET/v1/capabilities

What this deployment supports — features and classifications. Introspect instead of guessing.

{
  "version": "v1", "engineVersion": "0.1.0",
  "features": { "check": true, "heal": true, "batch": true,
                "includeRaw": true, "jsRendering": true },
  "classifications": ["alive", "moved", "parked", "out_of_stock", "dead"]
}

Pricing & credits

Pay as you go: $0.10 per successful check (1 credit). /heal = 1 credit; /batch = 1 per successful URL. Unreachable URLs and validation errors are free. Buy credits on your dashboard; with a 0 balance, calls return 402 insufficient_credits.

Errors

Errors return a JSON envelope { error, message } with the right HTTP status: 401 (missing/invalid key), 402 (insufficient credits), 400 (invalid request). Every response carries an x-request-id header for support.