{
  "openapi": "3.1.0",
  "info": {
    "title": "Pareto Frontier read-only intelligence API",
    "version": "1.0.0",
    "description": "Source-linked public AI intelligence. Not investment advice."
  },
  "servers": [
    {
      "url": "https://signal-stories-free.pages.dev"
    }
  ],
  "paths": {
    "/api/v1/briefing": {
      "get": {
        "operationId": "getLatestBriefing",
        "summary": "Get the current finite briefing",
        "responses": {
          "200": {
            "description": "Current or explicitly stale briefing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stories": {
      "get": {
        "operationId": "searchStories",
        "summary": "Search public stories",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search result page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stories/{id}": {
      "get": {
        "operationId": "getStory",
        "summary": "Get one story",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Story",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "headline",
                    "summary",
                    "publishedAt",
                    "publisher",
                    "originalSourceUrl",
                    "paretoUrl"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "headline": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "whyItMatters": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "evidenceStatus": {
                      "type": "string"
                    },
                    "publishedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "collectedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "freshness": {
                      "type": "string"
                    },
                    "publisher": {
                      "type": "object"
                    },
                    "originalSourceUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "paretoUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "entities": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown story"
          }
        }
      }
    },
    "/api/v1/entities/{slug}": {
      "get": {
        "operationId": "getEntityUpdates",
        "summary": "Get an entity and its updates",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entity timeline"
          },
          "404": {
            "description": "Unknown entity"
          }
        }
      }
    },
    "/api/v1/sources/health": {
      "get": {
        "operationId": "getSourceHealth",
        "summary": "Get collection health without secret diagnostics",
        "responses": {
          "200": {
            "description": "Source health"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Story": {
        "type": "object",
        "required": [
          "id",
          "headline",
          "summary",
          "publishedAt",
          "publisher",
          "originalSourceUrl",
          "paretoUrl"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "headline": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "whyItMatters": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "evidenceStatus": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "collectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "freshness": {
            "type": "string"
          },
          "publisher": {
            "type": "object"
          },
          "originalSourceUrl": {
            "type": "string",
            "format": "uri"
          },
          "paretoUrl": {
            "type": "string",
            "format": "uri"
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}
