{
  "openapi": "3.1.0",
  "info": {
    "title": "Ask The Independent AI",
    "version": "1.0.0",
    "summary": "Look up AI claims, stories and tools in The Independent AI's published coverage.",
    "description": "One read-only lookup across The Independent AI's Hype or Fact? checks (each with a verdict), news (live news briefings and Community picks), Worth testing entries and the AI tools directory. Only checks carry a verdict; other results are coverage, not verdicts. Cite the individual result. Free, no key; signed agents (Web Bot Auth) are recorded as verified.",
    "contact": { "name": "The Independent AI", "url": "https://theindependentai.com/about#contact" }
  },
  "servers": [{ "url": "https://theindependentai.com" }],
  "paths": {
    "/ask": {
      "get": {
        "operationId": "askTheIndependentAI",
        "summary": "Ask about an AI claim, story or tool",
        "description": "Ask The Independent AI about an AI claim, story or tool. Searches its published Hype or Fact? checks (each with a verdict: Fact, Partly fact or Hype), news (live news briefings and Community picks), Worth testing entries and the AI tools directory. Best match first: an entry titled exactly as the question leads, and a check leads when it matches about as well as other coverage; only checks carry a verdict, and news, Worth testing and tool results are coverage, not verdicts. Each result has a link and a cite_as line: cite the individual result. Returns plain text by default for agents; send format=json or Accept: application/json for JSON.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The claim, story or tool to look up, in a few words.",
            "schema": { "type": "string", "minLength": 1, "maxLength": 200 },
            "example": "cursor security incident"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Response format. Defaults to text for agents and HTML for browsers.",
            "schema": { "type": "string", "enum": ["json", "text", "html"] }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching results, best first (at most three checks). An empty results list means nothing we have published covers the question.",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/AskAnswer" } },
              "text/plain": { "schema": { "type": "string" } }
            }
          },
          "503": {
            "description": "The lookup is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"] }
              },
              "text/plain": { "schema": { "type": "string" } }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AskAnswer": {
        "type": "object",
        "required": ["query", "result_count", "results", "note", "suggest_a_claim"],
        "properties": {
          "query": { "type": "string", "description": "The question as received, trimmed to 200 characters." },
          "result_count": { "type": "integer", "minimum": 0 },
          "results": { "type": "array", "maxItems": 5, "items": { "$ref": "#/components/schemas/AskResult" } },
          "note": { "type": "string" },
          "suggest_a_claim": { "type": "string", "format": "uri", "description": "Where to suggest a claim we have not checked." }
        }
      },
      "AskResult": {
        "type": "object",
        "required": ["type", "type_label", "title", "url", "verdict", "verdict_summary", "claim_by", "date", "cite_as"],
        "properties": {
          "type": { "type": "string", "enum": ["check", "news", "worth_testing", "tool"] },
          "type_label": { "type": "string", "enum": ["Hype or Fact? check", "News", "Worth testing", "Tool"] },
          "title": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "verdict": {
            "type": ["string", "null"],
            "enum": ["Fact", "Partly fact", "Hype", null],
            "description": "Only Hype or Fact? checks have a verdict; null for every other type."
          },
          "verdict_summary": { "type": ["string", "null"] },
          "claim_by": { "type": ["string", "null"], "description": "Who made the claim (checks only)." },
          "date": { "type": ["string", "null"], "description": "Checked, published or last-checked date (YYYY-MM-DD)." },
          "cite_as": { "type": "string", "description": "How to cite this result." }
        }
      }
    }
  }
}
