{
  "openapi": "3.1.0",
  "info": {
    "title": "TortSignal Public API",
    "version": "1.1.0",
    "summary": "Read-only mass tort intelligence: scores, topics, glossary, clusters, provenance, feeds, AI endpoints.",
    "description": "Public endpoints for TortSignal — composite scoring, topic hubs, glossary, tort clusters, provenance, multi-format feeds, and AI-readable structured payloads.",
    "contact": {
      "name": "LawTegic Solutions Media",
      "url": "https://tortsignals.lawtegic.solutions"
    },
    "license": {
      "name": "CC BY 4.0",
      "identifier": "CC-BY-4.0"
    }
  },
  "servers": [
    {
      "url": "https://tortsignals.lawtegic.solutions"
    }
  ],
  "paths": {
    "/feeds/rss.xml": {
      "get": {
        "summary": "RSS 2.0 feed with tortsignal: namespace",
        "responses": {
          "200": {
            "description": "RSS XML"
          }
        }
      }
    },
    "/feeds/atom.xml": {
      "get": {
        "summary": "Atom 1.0 feed",
        "responses": {
          "200": {
            "description": "Atom XML"
          }
        }
      }
    },
    "/feeds/json": {
      "get": {
        "summary": "JSON Feed 1.1",
        "responses": {
          "200": {
            "description": "JSON feed"
          }
        }
      }
    },
    "/feeds/legal.json": {
      "get": {
        "summary": "Structured tort feed for law-firm intake systems",
        "responses": {
          "200": {
            "description": "Legal feed JSON"
          }
        }
      }
    },
    "/feeds/signals.json": {
      "get": {
        "summary": "Latest score, MDL, and news signal stream",
        "responses": {
          "200": {
            "description": "Signals JSON"
          }
        }
      }
    },
    "/ai/torts/{slug}.json": {
      "get": {
        "summary": "AI-readable structured tort payload",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tort intelligence"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/ai/topics/{slug}.json": {
      "get": {
        "summary": "AI-readable topic hub payload",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Topic"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/ai/glossary/{slug}.json": {
      "get": {
        "summary": "AI-readable glossary term payload",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Glossary term"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/vectors/{slug}": {
      "get": {
        "summary": "Content chunked into 300-500 token blocks for embeddings",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chunked content"
          }
        }
      }
    },
    "/provenance/{slug}": {
      "get": {
        "summary": "Content provenance, modification history, content hash, citations",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provenance record"
          }
        }
      }
    },
    "/mcp/": {
      "get": {
        "summary": "MCP-compatible tool surface description",
        "responses": {
          "200": {
            "description": "MCP server descriptor"
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "summary": "Sitemap index",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sitemap-pages.xml": {
      "get": {
        "summary": "Static + topic + glossary + cluster sitemap",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sitemap-torts.xml": {
      "get": {
        "summary": "Tort detail pages sitemap",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sitemap-ai.xml": {
      "get": {
        "summary": "AI/feed endpoints sitemap",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/status": {
      "get": {
        "summary": "Health, version, content counts, endpoint catalog",
        "responses": {
          "200": {
            "description": "Status payload"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TortIntel": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "canonicalUrl",
          "tortSignalScore"
        ],
        "properties": {
          "schemaType": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "shortName": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "canonicalUrl": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "tortSignalScore": {
            "type": "number"
          },
          "opportunityScore": {
            "type": "number"
          },
          "riskScore": {
            "type": "number"
          },
          "mdl": {
            "type": "string"
          },
          "defendant": {
            "type": "string"
          },
          "primaryInjury": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "VectorChunk": {
        "type": "object",
        "properties": {
          "chunkIndex": {
            "type": "integer"
          },
          "tokenEstimate": {
            "type": "integer"
          },
          "content": {
            "type": "string"
          },
          "headingContext": {
            "type": "string"
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "canonicalUrl": {
            "type": "string"
          },
          "chunkType": {
            "type": "string",
            "enum": [
              "intro",
              "body",
              "faq",
              "stat"
            ]
          }
        }
      }
    }
  }
}