{
  "openapi": "3.1.0",
  "info": {
    "title": "Stillhouse Data API",
    "version": "v1",
    "description": "REST access to public SEC/FINRA data: Form ADV investment advisers (firm search and detail, rep movements, 13F holdings), ADV Part 2 brochure full text, securities holder rollups (13F + N-PORT + N-MFP, incl. private/pre-IPO marks and issuer financials), a Form D / Reg A / crowdfunding fundraising feed with per-filing detail, Form D company search, IPO and proxy-statement feeds, structured 8-K events with full-text search, newly registered advisers, X-17A-5 broker-dealer reports, Reg CF funding portals, new fund launches, and the full EDGAR filing spine: for EVERY registered filing family, a faceted search (/filings + the live /filings/families registry), a per-filing lookup with structured family detail (/filing/{accession}), the document itself as markdown (/doc-text) or original bytes (/edgar/doc), full-text search across ten corpora (/text-search), and company resolution (/companies/search).\n\nEvery request needs an API key (free self-serve at https://docs.stillhousedata.com/keys.html). Two independent per-key rate-limit buckets (search and general; defaults 10/min each \u2014 higher per-key limits available, contact us). Responses carry standard RateLimit-* headers; all responses complete in seconds. Human docs: https://docs.stillhousedata.com/",
    "contact": {
      "email": "tj@shcove.com",
      "url": "https://docs.stillhousedata.com/"
    }
  },
  "servers": [
    {
      "url": "https://api.stillhousedata.com/v1"
    }
  ],
  "security": [
    {
      "bearerKey": []
    },
    {
      "xApiKey": []
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "summary": "Echo the authenticated key's context and effective rate limits",
        "operationId": "me",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Key context",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyId": {
                      "type": "string"
                    },
                    "uid": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "limits": {
                      "type": "object",
                      "properties": {
                        "search": {
                          "type": "string",
                          "description": "e.g. \"10/min\""
                        },
                        "general": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "DB-free connectivity probe. `limits` reflects any per-key overrides (partner keys), falling back to the defaults."
      }
    },
    "/adv/advisers/search": {
      "get": {
        "summary": "Firm name typeahead",
        "operationId": "adv.advisers.search",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Matching firms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "CRD number"
                      },
                      "firm_name": {
                        "type": "string"
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "state": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Name fragment, minimum 2 characters (shorter returns []).",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max results.",
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 25
            }
          }
        ]
      }
    },
    "/adv/advisers/list": {
      "get": {
        "summary": "Filtered, sorted, paginated firm list",
        "operationId": "adv.advisers.list",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Paginated firm rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Firm summary row",
                        "additionalProperties": true
                      }
                    },
                    "total": {
                      "type": "number"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Firm name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Two-letter state code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adviser_type",
            "in": "query",
            "description": "Adviser registration type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fund_type",
            "in": "query",
            "description": "Private fund type filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_terminated",
            "in": "query",
            "description": "Exclude terminated registrations.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "has_disciplinary",
            "in": "query",
            "description": "Only firms with disciplinary (DRP) history.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "raum",
                "date",
                "name"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}": {
      "get": {
        "summary": "Firm profile (compact core by default)",
        "operationId": "adv.adviser",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Firm profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "adviser": {
                      "type": "object",
                      "description": "Identity: crd, firm_name, address, registration status, RAUM.",
                      "additionalProperties": true
                    },
                    "latest_filing": {
                      "type": "object",
                      "description": "Latest ADV filing summary.",
                      "additionalProperties": true
                    },
                    "funds_total": {
                      "type": "number"
                    },
                    "funds_by_type": {
                      "type": "object",
                      "description": "Private fund counts by type.",
                      "additionalProperties": true
                    },
                    "sections": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "included": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Comma-separated extra sections, or \"all\". Sections: filings, funds, service_providers, drp, people, branches, part1a, sma, linked. Absent = compact core (identity, latest-filing summary, fund counts; a few KB). Full (=all) can exceed 100KB for large firms.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}/rep-flows": {
      "get": {
        "summary": "Rep arrivals/departures by year (IAPD history, 1985-present)",
        "operationId": "adv.adviser.rep-flows",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Rep flow summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "crd": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "gained": {
                          "type": "integer"
                        },
                        "lost": {
                          "type": "integer"
                        },
                        "net": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    },
                    "byYear": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}/holdings-13f": {
      "get": {
        "summary": "Latest 13F equity holdings",
        "operationId": "adv.adviser.holdings-13f",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Holdings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Latest 13F holdings for the firm.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}/registered-funds": {
      "get": {
        "summary": "N-CEN registered funds",
        "operationId": "adv.adviser.registered-funds",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Registered funds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "N-CEN registered funds advised by the firm.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}/money-market-funds": {
      "get": {
        "summary": "N-MFP money market funds",
        "operationId": "adv.adviser.money-market-funds",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Money market funds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "N-MFP money market funds advised by the firm.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}/headcount": {
      "get": {
        "summary": "Monthly rep headcount time series",
        "operationId": "adv.adviser.headcount",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Headcount series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Monthly headcount time series.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}/filing-activity": {
      "get": {
        "summary": "Per-day filing activity",
        "operationId": "adv.adviser.filing-activity",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Filing activity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Per-day filing counts.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "years",
            "in": "query",
            "description": "Window in years.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/adv/advisers/by-crd/{crd}/similar": {
      "get": {
        "summary": "Similar firms",
        "operationId": "adv.adviser.similar",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Similar firms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Similar firms with similarity scores.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max results.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/adv/rep/{indvlPk}/movements": {
      "get": {
        "summary": "One rep's career history",
        "operationId": "adv.rep.movements",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Career movements",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Firm-to-firm movements for one rep.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "indvlPk",
            "in": "path",
            "required": true,
            "description": "Rep identifier (from rep-flows rows).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/adv/securities": {
      "get": {
        "summary": "Search the securities rollup (13F + N-PORT + N-MFP)",
        "operationId": "adv.securities.search",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Securities rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cusip": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sec_id": {
                            "type": "string"
                          },
                          "is_private": {
                            "type": "boolean"
                          },
                          "issuer_name": {
                            "type": "string"
                          },
                          "title_of_class": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "asset_cat": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "f13_holders": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "f13_value": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fund_count": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "nport_value": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "combined_value": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "Covers public securities (CUSIP-keyed) and private/pre-IPO issuers priced in N-PORT fund marks.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Issuer name fragment, or an exact CUSIP.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Restrict to public or private securities.",
            "schema": {
              "type": "string",
              "enum": [
                "public",
                "private"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "value",
                "f13_holders",
                "fund_count",
                "name"
              ],
              "default": "value"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/adv/securities/{cusip}": {
      "get": {
        "summary": "Security holder detail from all three sources",
        "operationId": "adv.security",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Holder detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cusip": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "is_private": {
                      "type": "boolean"
                    },
                    "issuer_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "title_of_class": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "asset_cat": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "f13": {
                      "type": "object",
                      "properties": {
                        "holder_count": {
                          "type": "integer"
                        },
                        "total_value": {
                          "type": "string"
                        },
                        "holders": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      },
                      "additionalProperties": true
                    },
                    "nport": {
                      "type": "object",
                      "properties": {
                        "fund_count": {
                          "type": "integer"
                        },
                        "total_value": {
                          "type": "string"
                        },
                        "holders": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      },
                      "additionalProperties": true
                    },
                    "nmfp": {
                      "type": "object",
                      "properties": {
                        "fund_count": {
                          "type": "integer"
                        },
                        "total_value": {
                          "type": "number"
                        },
                        "holders": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "cusip",
            "in": "path",
            "required": true,
            "description": "CUSIP (6-9 alphanumeric), or a name-keyed private-security id (\"name~<base64url>\") as returned in search rows' sec_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max holders per source.",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/adv/securities/{cusip}/price-history": {
      "get": {
        "summary": "N-PORT mark history (incl. private-company marks)",
        "operationId": "adv.security.price-history",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Mark history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Per-period fund marks for the security/company.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "cusip",
            "in": "path",
            "required": true,
            "description": "CUSIP (6-9 alphanumeric), or a name-keyed private-security id (\"name~<base64url>\") as returned in search rows' sec_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "description": "\"company\" merges all name variants of the issuer (wrapper vehicles, share classes); \"exact\" restricts to this identifier.",
            "schema": {
              "type": "string",
              "enum": [
                "company",
                "exact"
              ],
              "default": "company"
            }
          }
        ]
      }
    },
    "/adv/securities/{cusip}/financials": {
      "get": {
        "summary": "Issuer financial statements (10-K/10-Q key metrics)",
        "operationId": "adv.security.financials",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Financial history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cusip": {
                      "type": "string"
                    },
                    "cik": {
                      "type": "integer"
                    },
                    "ticker": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "company_name": {
                      "type": "string"
                    },
                    "latest": {
                      "type": "object",
                      "description": "Most recent period's metrics.",
                      "additionalProperties": true
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Per-period: revenue, net income, EPS, assets, liabilities, equity, cash, filing link.",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "cusip",
            "in": "path",
            "required": true,
            "description": "CUSIP (6-9 alphanumeric). Public issuers only \u2014 requires a CUSIP-to-CIK mapping.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/feed": {
      "get": {
        "summary": "Fundraising feed: Form D, Reg A, and crowdfunding filings",
        "operationId": "public.fundraising-feed",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Feed rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "description": "formd | rega | crowdfunding"
                          },
                          "accession": {
                            "type": "string"
                          },
                          "entity_name": {
                            "type": "string"
                          },
                          "cik": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "city": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "filing_date": {
                            "type": "string"
                          },
                          "submission_type": {
                            "type": "string"
                          },
                          "industry": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "amount": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "raised": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "website": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Comma-separated sources; default all.",
            "schema": {
              "type": "string",
              "description": "formd, rega, crowdfunding"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Company name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Comma-separated two-letter state codes.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "description": "Comma-separated industry values (any match qualifies).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "amount",
                "name",
                "state"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset (alternative to cursor).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Keyset cursor from a previous page (default date-desc ordering only).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fund-launches": {
      "get": {
        "summary": "New fund launches (ETF/open-end series + closed-end funds)",
        "operationId": "public.fund-launches",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Launch rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accession": {
                            "type": "string"
                          },
                          "cik": {
                            "type": "string"
                          },
                          "form": {
                            "type": "string"
                          },
                          "filing_date": {
                            "type": "string"
                          },
                          "trust_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "series_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "series_name": {
                            "type": "string"
                          },
                          "class_count": {
                            "type": "integer"
                          },
                          "tickers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "bucket": {
                            "type": "string",
                            "description": "ETF/OEF | CEF"
                          }
                        },
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Series or trust name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bucket",
            "in": "query",
            "description": "Restrict to ETF/open-end series or closed-end funds.",
            "schema": {
              "type": "string",
              "enum": [
                "etf",
                "cef"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "name"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/brochures/search": {
      "get": {
        "summary": "Full-text brochure search (one row per firm)",
        "operationId": "brochures.search",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Matching firms with highlighted excerpts.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Query, minimum 2 characters.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "maximum": 50
            }
          }
        ]
      }
    },
    "/brochures/firm/{crd}": {
      "get": {
        "summary": "All brochure versions for a firm, newest first",
        "operationId": "brochures.firm-versions",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "versions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "crd": {
                            "type": "string"
                          },
                          "filing_date": {
                            "type": "string"
                          },
                          "char_count": {
                            "type": "integer"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "crd",
            "in": "path",
            "required": true,
            "description": "Firm CRD number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/brochures/{id}": {
      "get": {
        "summary": "One brochure including full markdown text",
        "operationId": "brochures.get",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Brochure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "crd": {
                      "type": "string"
                    },
                    "markdown": {
                      "type": "string",
                      "description": "Full brochure text as markdown."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Brochure id (from firm versions or search).",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/fund-launches/by-accession/{accession}": {
      "get": {
        "summary": "Fund launch detail for one filing",
        "operationId": "public.fund-launch",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Launch detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filing": {
                      "type": "object",
                      "description": "EDGAR filing header.",
                      "additionalProperties": true
                    },
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "focus_series": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "fees": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "RR1 fee-table facts (management fee, 12b-1, net expenses).",
                        "additionalProperties": true
                      }
                    },
                    "narrative": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Objective/strategy/risk text blocks as markdown.",
                        "additionalProperties": true
                      }
                    },
                    "advisers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "authorized_participants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "directors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "other_filings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "Sections degrade gracefully: a just-filed 485APOS has filing+series only; effective funds add fees/narrative; established funds add N-CEN service providers and N-PORT AUM.",
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "SEC accession number, dashed (0001234567-26-000001) or 18 digits.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/ipos": {
      "get": {
        "summary": "IPO pipeline (S-1/F-1 registrations and pricings)",
        "operationId": "public.ipos",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "IPO rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accession": {
                            "type": "string"
                          },
                          "cik": {
                            "type": "string"
                          },
                          "form_type": {
                            "type": "string"
                          },
                          "filed_date": {
                            "type": "string"
                          },
                          "company_name": {
                            "type": "string"
                          },
                          "sic": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sic_description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tickers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "exchanges": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "is_spac": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Company name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stage",
            "in": "query",
            "description": "Pipeline stage filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "spac",
            "in": "query",
            "description": "SPAC handling.",
            "schema": {
              "type": "string",
              "enum": [
                "exclude",
                "only"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "name"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/ipos/by-accession/{accession}": {
      "get": {
        "summary": "IPO filing detail",
        "operationId": "public.ipo",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "IPO detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Filing header + issuer + offering details.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "SEC accession number, dashed (0001234567-26-000001) or 18 digits.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/proxies": {
      "get": {
        "summary": "Proxy statement feed (DEF 14A family)",
        "operationId": "public.proxies",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Proxy rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Proxy filing row.",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Company name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Proxy category filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "name"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/proxies/by-accession/{accession}": {
      "get": {
        "summary": "Proxy filing detail",
        "operationId": "public.proxy",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Proxy detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Filing header + issuer details.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "SEC accession number, dashed (0001234567-26-000001) or 18 digits.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/new-advisers": {
      "get": {
        "summary": "Newly registered investment advisers",
        "operationId": "public.new-advisers",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "New adviser rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "crd": {
                            "type": "string"
                          },
                          "firm_name": {
                            "type": "string"
                          },
                          "city": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "first_filing_date": {
                            "type": "string"
                          },
                          "adviser_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "latest_raum": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "has_disciplinary": {
                            "type": "boolean"
                          },
                          "primary_website": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Firm name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Comma-separated state codes.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "City filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "feed",
            "in": "query",
            "description": "Registration feed.",
            "schema": {
              "type": "string",
              "enum": [
                "IA_FIRM_SEC",
                "IA_FIRM_STATE"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Adviser type.",
            "schema": {
              "type": "string",
              "enum": [
                "IA",
                "ERA"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Keyset cursor from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/eightk/search": {
      "get": {
        "summary": "Full-text search over 8-K filings",
        "operationId": "public.eightk.search",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "item": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Query, minimum 2 characters.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "item",
            "in": "query",
            "description": "8-K item code filter, e.g. \"5.02\".",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}\\.\\d{2}$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Filed-date lower bound (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Filed-date upper bound (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max results.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/eightk/events": {
      "get": {
        "summary": "Structured 8-K event feed",
        "operationId": "public.eightk.events",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Event rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "Extracted events: officer/director changes (5.02), earnings releases (2.02), delistings (3.01), or a presence feed for any item code with excerpts.",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "description": "Event type.",
            "schema": {
              "type": "string",
              "enum": [
                "officer",
                "earnings",
                "delisting",
                "item"
              ]
            }
          },
          {
            "name": "item",
            "in": "query",
            "description": "Required when kind=item: any 8-K item code, e.g. \"4.02\" (restatements), \"1.03\" (bankruptcy).",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}\\.\\d{2}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/eightk/by-accession/{accession}": {
      "get": {
        "summary": "One 8-K: header, carved item sections, extracted events",
        "operationId": "public.eightk.filing",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "8-K detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filing": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Per-item: item_code, excerpt, body text.",
                        "additionalProperties": true
                      }
                    },
                    "officers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "earnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "delisting": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "Dashed accession number (0001234567-26-000001).",
            "schema": {
              "type": "string",
              "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
            }
          }
        ]
      }
    },
    "/formd/companies/search": {
      "get": {
        "summary": "Form D company name typeahead",
        "operationId": "formd.companies.search",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Matching companies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "entity_name": {
                        "type": "string"
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "state": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Name fragment, minimum 2 characters (shorter returns []).",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max results.",
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 25
            }
          }
        ]
      }
    },
    "/formd/filings/by-accession/{accession}": {
      "get": {
        "summary": "Form D filing detail",
        "operationId": "formd.filing",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Filing detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filing": {
                      "type": "object",
                      "description": "Offering economics: amounts offered/sold/remaining, exemptions, min investment, investor count, industry, security types.",
                      "additionalProperties": true
                    },
                    "company": {
                      "type": "object",
                      "description": "Issuer: name, address, entity type, jurisdiction, year incorporated.",
                      "additionalProperties": true
                    },
                    "other_filings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "The company's other Form D filings.",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "SEC accession number, dashed (0001234567-26-000001) or 18 digits.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rega/filings/by-accession/{accession}": {
      "get": {
        "summary": "Reg A (Form 1-A family) filing detail",
        "operationId": "rega.filing",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Filing detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "submission": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "issuer": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "offering": {
                      "type": "object",
                      "description": "Offering terms and financial statement summary (balance sheet + income items, auditor).",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "SEC accession number, dashed (0001234567-26-000001) or 18 digits.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/crowdfunding/filings/by-accession/{accession}": {
      "get": {
        "summary": "Crowdfunding (Form C family) filing detail",
        "operationId": "crowdfunding.filing",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Filing detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "submission": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "issuer": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "offering": {
                      "type": "object",
                      "description": "Offering terms, intermediary (funding portal), and two-year financial comparison.",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "SEC accession number, dashed (0001234567-26-000001) or 18 digits.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/brokers": {
      "get": {
        "summary": "Broker-dealer annual reports (X-17A-5)",
        "operationId": "brokers.list",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Broker rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "brokers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Latest annual report per broker: name, CIK, auditor, opinion flags.",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Broker name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Two-letter state code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "auditor",
            "in": "query",
            "description": "Auditor name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "weakness",
            "in": "query",
            "description": "Only reports disclosing a material weakness.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "name"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 100).",
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/brokers/{cik}": {
      "get": {
        "summary": "One broker-dealer: profile + report history",
        "operationId": "brokers.firm",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Broker detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "broker": {
                      "type": "object",
                      "description": "Name, file number, registrant type, address, contact.",
                      "additionalProperties": true
                    },
                    "filings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Annual reports, newest first: accession, formType, filedDate, auditorName, materialWeakness, signer.",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "cik",
            "in": "path",
            "required": true,
            "description": "Broker CIK (digits).",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    },
    "/cfportal": {
      "get": {
        "summary": "Reg CF funding portals",
        "operationId": "cfportal.list",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Portal rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "One row per portal: name, website, state, filing counts, latest filing.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Portal or company name filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Two-letter state code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Registration status.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "withdrawn"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "name",
                "first",
                "filings"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 100).",
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/cfportal/filing/{accession}": {
      "get": {
        "summary": "One CFPORTAL filing",
        "operationId": "cfportal.filing",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Filing detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Full CFPORTAL registration/amendment content.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "SEC accession number, dashed (0001234567-26-000001) or 18 digits.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/filings/families": {
      "get": {
        "summary": "The filing-family registry \u2014 every family's API contract",
        "operationId": "filings.families",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Family catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "families": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "group": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "form_types": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "status": {
                            "type": "string",
                            "description": "live | approved | ledger"
                          },
                          "bespoke_route": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Richer per-filing endpoint pattern when one exists, e.g. /formd/{accession}."
                          },
                          "feed_spec": {
                            "type": "object",
                            "description": "The family's feed contract: columns (response fields) and facets (filterable fields with types) usable in /filings?family=\u2026&filters=\u2026.",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "This catalog IS the per-family API surface: each entry's facets define what /filings can filter on for that family. Poll it to discover new families \u2014 they appear without any API deploy."
      }
    },
    "/filings/coverage": {
      "get": {
        "summary": "Per-family extraction coverage statistics",
        "operationId": "filings.coverage",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Coverage snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "families": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Per family: filings count, extracted count, pct, tier (structured|reader|listed|ledger).",
                        "additionalProperties": true
                      }
                    },
                    "totals": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "generated_at": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/filings": {
      "get": {
        "summary": "Search filings across every family (the EDGAR firehose)",
        "operationId": "filings.feed",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Filing rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Plus per-family bound rows (fam_rows) when the family's feed_spec binds tables, and parties[] for co-filed accessions.",
                        "properties": {
                          "accession": {
                            "type": "string"
                          },
                          "cik": {
                            "type": "string"
                          },
                          "company_name": {
                            "type": "string"
                          },
                          "form_type": {
                            "type": "string"
                          },
                          "filed_date": {
                            "type": "string"
                          },
                          "period_of_report": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "has_text": {
                            "type": "boolean"
                          },
                          "family": {
                            "type": "object",
                            "properties": {
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": true
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "One query surface over the full EDGAR spine (1993\u2192today, every registered family). Filter generically (q/cik/form/dates) or per-family via family= + filters= using that family's facet vocabulary from /filings/families.",
        "parameters": [
          {
            "name": "family",
            "in": "query",
            "description": "Family slug. The live vocabulary \u2014 every family with its label, form types, and filterable facet fields \u2014 is served by GET /filings/families; it grows as new families are registered, with no API version change.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Company name filter (substring).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "Filer CIK.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "form",
            "in": "query",
            "description": "Exact form code, e.g. 8-K.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item",
            "in": "query",
            "description": "8-K item code filter, e.g. 5.02.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Filed-date lower bound (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Filed-date upper bound (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort key.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "name"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "URL-encoded JSON AND/OR filter tree over the universal fields (company_name, form_type, form_in, family_in, filed_date, period_of_report, cik, has_text, item) plus, when family= is set, that family's facet fields from /filings/families. Node shape: {\"and\":[...]} / {\"or\":[...]} / {\"field\",\"op\",\"value\"}. Operators by field type \u2014 text: contains|not_contains|starts_with|ends_with|equals|not_equals|is_empty|is_not_empty; number/date: equals|not_equals|between|gt|gte|lt|lte; enum: equals|not_equals|in; bool: is_true. Invalid trees return 400, never 500. Max 8000 chars.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Page offset (max 100000). No cursor pagination yet.",
            "schema": {
              "type": "integer",
              "maximum": 100000
            }
          }
        ]
      }
    },
    "/filing/{accession}": {
      "get": {
        "summary": "One filing: header, capabilities, and per-family structured detail",
        "operationId": "filings.lookup",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Filing detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filing": {
                      "type": "object",
                      "description": "Header: accession, cik, company_name, form_type, filed_date, accepted_at, period_of_report, act, file_numbers, sic, states.",
                      "additionalProperties": true
                    },
                    "family": {
                      "type": "object",
                      "properties": {
                        "slug": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "additionalProperties": true
                    },
                    "capabilities": {
                      "type": "object",
                      "properties": {
                        "original": {
                          "type": "boolean",
                          "description": "Raw members fetchable via /edgar/doc/{accession}/{seq}."
                        },
                        "reader": {
                          "type": "boolean",
                          "description": "Markdown/plain text via /doc-text/{source}/{accession}."
                        },
                        "struct": {
                          "type": "boolean"
                        },
                        "tier2": {
                          "type": "boolean"
                        },
                        "tables": {
                          "type": "boolean"
                        },
                        "bespoke": {
                          "type": "boolean",
                          "description": "A richer per-family endpoint exists (family.bespoke_route pattern)."
                        }
                      },
                      "additionalProperties": true
                    },
                    "family_data": {
                      "type": "object",
                      "description": "The family's structured extraction, keyed by table \u2014 the 'more detailed lookup' for every family with a view_spec.",
                      "additionalProperties": true
                    },
                    "documents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Member manifest: seq, filename, type, size.",
                        "additionalProperties": true
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "timeline": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Latest 40 filings by the same CIK.",
                        "additionalProperties": true
                      }
                    },
                    "amendments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "The universal per-filing lookup. `capabilities` tells an agent exactly which follow-up endpoints apply to THIS filing; `family_data` carries the family's structured extraction inline.",
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "Dashed accession number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
            }
          }
        ]
      }
    },
    "/doc-text/{source}/{accession}": {
      "get": {
        "summary": "Filing text as markdown (plain-text fallback)",
        "operationId": "doc-text.read",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Document text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string"
                    },
                    "accession": {
                      "type": "string"
                    },
                    "cik": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "form": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "filed": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "company_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "format": {
                      "type": "string",
                      "description": "markdown | text"
                    },
                    "text": {
                      "type": "string",
                      "description": "The full document \u2014 no size cap; a large 10-K can be several MB."
                    },
                    "has_original": {
                      "type": "boolean"
                    },
                    "siblings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "facts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "description": "Text corpus.",
            "schema": {
              "type": "string",
              "enum": [
                "tenx",
                "ncsr",
                "fundreg",
                "x17",
                "s1",
                "sc13"
              ]
            }
          },
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "Dashed accession number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
            }
          }
        ]
      }
    },
    "/doc-text/by-cik/{cik}": {
      "get": {
        "summary": "Every readable document for a registrant across corpora",
        "operationId": "doc-text.by-cik",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Readable documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Per-corpus lists of readable filings for the CIK.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "cik",
            "in": "path",
            "required": true,
            "description": "Registrant CIK (digits).",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "sources",
            "in": "query",
            "description": "Comma-separated corpus filter (default all six).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/edgar/doc/{accession}/{seq}": {
      "get": {
        "summary": "One original filing member \u2014 the raw bytes",
        "operationId": "edgar.doc",
        "x-rate-limit-bucket": "general",
        "description": "Serves the original member (HTML, PDF, images, XML, TXT) from the dissemination-archive cache. First fetch of a filing takes ~1-2s (archive download + split), immutable-cached after. Member seq numbers come from /filing/{accession}'s documents manifest. Send Accept: application/json (or ?format=json) to receive error bodies as JSON; success bodies are the original bytes with their native content type. ?raw=1 returns XML members unwrapped. 413 above 250MB.",
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "description": "Dashed accession number.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "required": true,
            "description": "Member sequence number from the documents manifest.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "raw",
            "in": "query",
            "description": "Return XML members as raw text instead of an HTML-wrapped view.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Set to \"json\" for JSON error bodies (or send Accept: application/json).",
            "schema": {
              "type": "string",
              "enum": [
                "json"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The original member bytes (content type per file extension)."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "413": {
            "description": "Submission exceeds the 250MB buffer cap.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/text-search": {
      "get": {
        "summary": "Full-text search across the filing text corpora",
        "operationId": "text-search.query",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "total_is_estimate": {
                      "type": "boolean"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "size": {
                      "type": "integer"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "coverage": {
                      "type": "object",
                      "description": "Which corpora answered / timed out \u2014 partial results are flagged, never silent.",
                      "additionalProperties": true
                    },
                    "offline": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "corpus": {
                            "type": "string"
                          },
                          "accession": {
                            "type": "string"
                          },
                          "cik": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "form": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "family": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "filed": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "company_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "section": {
                            "type": "object",
                            "description": "Item/section the hit landed in, when carved (e.g. 8-K item code).",
                            "additionalProperties": true
                          },
                          "snippet": {
                            "type": "string"
                          },
                          "snippet_kind": {
                            "type": "string",
                            "description": "matched passage, or 'opening' for the cold tier where only the document opening is stored inline."
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "Ten corpora spanning 10-K/10-Q, N-CSR, fund registrations, X-17A-5, S-1, SC 13D/G, carved 8-K item sections, structured-XML projections (Form D, insider, 13F), and the 21.7M-document cold tier back to 1993. Per-corpus time budgets keep responses bounded; partial coverage is reported explicitly.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Query, minimum 3 characters. Quoted phrases supported.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "family",
            "in": "query",
            "description": "Comma-separated family slugs (from /filings/families) \u2014 expands to their form types.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "form",
            "in": "query",
            "description": "Comma-separated form codes; overrides family.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "corpus",
            "in": "query",
            "description": "Comma-separated corpus slugs (see /text-search/corpora).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Filed-date lower bound (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Filed-date upper bound (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Results per page (max 50).",
            "schema": {
              "type": "integer",
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/text-search/corpora": {
      "get": {
        "summary": "Catalog of searchable text corpora",
        "operationId": "text-search.corpora",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Corpora",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "corpora": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "reader": {
                            "type": "boolean"
                          },
                          "available": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/companies/search": {
      "get": {
        "summary": "Resolve a company by name, ticker, or CIK",
        "operationId": "companies.search",
        "x-rate-limit-bucket": "search",
        "responses": {
          "200": {
            "description": "Matching companies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cik": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "tickers": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            }
                          },
                          "exchanges": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            }
                          },
                          "sic": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sic_description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "entity_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state_of_incorporation": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "business_city": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "business_state": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "total_filings": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "description": "Pass exactly one of q / ticker / cik (precedence: cik > ticker > q). The resolved cik feeds /filings?cik=\u2026 for the company's filing feed.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Company name fragment, minimum 2 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticker",
            "in": "query",
            "description": "Exact ticker symbol.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "Exact CIK.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max results.",
            "schema": {
              "type": "integer",
              "maximum": 25,
              "default": 10
            }
          }
        ]
      }
    },
    "/companies/{cik}": {
      "get": {
        "summary": "One company profile",
        "operationId": "companies.get",
        "x-rate-limit-bucket": "general",
        "responses": {
          "200": {
            "description": "Company profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "sec_companies row: identity, tickers/exchanges, SIC, addresses, former names, total_filings, plus filings_url pointing at /filings?cik=.",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "cik",
            "in": "path",
            "required": true,
            "description": "CIK (digits).",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer cove_..."
      },
      "xApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "X-Api-Key: cove_..."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing, invalid, or revoked API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Key lacks the required \"api\" scope",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown endpoint (only documented endpoints exist) or entity not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded \u2014 check the RateLimit-Reset header",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
