{
  "openapi": "3.1.0",
  "info": {
    "title": "Treasurer Fund Rank API",
    "version": "1.0.0",
    "summary": "Asset managers ranked by assets, and the people named on their Form ADV filings.",
    "description": "Free, no key. 60 requests a minute per IP address (REST and MCP together). All amounts in US dollars. Data from public filings with the SEC (Form ADV, Form 13F, IAPD), the Hong Kong SFC and KOFIA. Contact details are not provided. An MCP server with the same data is at https://api.aum.treasurer.net/mcp. Docs: https://api.aum.treasurer.net/docs",
    "contact": { "url": "https://aum.treasurer.net" }
  },
  "servers": [{ "url": "https://api.aum.treasurer.net" }],
  "tags": [
    { "name": "Firms" },
    { "name": "People" },
    { "name": "Data" }
  ],
  "paths": {
    "/v1/firms": {
      "get": {
        "tags": ["Firms"],
        "operationId": "listFirms",
        "summary": "Firms ranked by assets",
        "description": "Largest first. `rank` follows the chosen metric.",
        "parameters": [
          { "$ref": "#/components/parameters/region" },
          { "name": "scope", "in": "query", "schema": { "type": "string", "enum": ["all", "hedge", "any_hedge", "private"], "default": "all" }, "description": "hedge: hedge fund firms. any_hedge: any firm that runs a hedge fund. private: firms with private funds." },
          { "name": "metric", "in": "query", "schema": { "type": "string", "enum": ["best", "adv", "private_funds", "13f", "kofia"], "default": "best" }, "description": "best: the best figure each firm has (Form ADV AUM, then KOFIA, then 13F)." },
          { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "Words in the firm name." },
          { "$ref": "#/components/parameters/limit" },
          { "$ref": "#/components/parameters/offset" }
        ],
        "responses": {
          "200": { "description": "A page of firms", "content": { "application/json": { "schema": { "type": "object", "required": ["total", "limit", "offset", "rows"], "properties": { "total": { "type": "integer" }, "limit": { "type": "integer" }, "offset": { "type": "integer" }, "rows": { "type": "array", "items": { "allOf": [{ "$ref": "#/components/schemas/Firm" }, { "type": "object", "properties": { "rank": { "type": "integer" } } }] } } } } } } },
          "400": { "$ref": "#/components/responses/Invalid" },
          "429": { "$ref": "#/components/responses/Limited" },
          "503": { "$ref": "#/components/responses/Building" }
        }
      }
    },
    "/v1/firms/{id}": {
      "get": {
        "tags": ["Firms"],
        "operationId": "getFirm",
        "summary": "One firm",
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "A firm id (crd:160885) or slug (marshall-wace-llp).", "example": "marshall-wace-llp" }],
        "responses": {
          "200": { "description": "The firm", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FirmDetail" } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/Limited" }
        }
      }
    },
    "/v1/people": {
      "get": {
        "tags": ["People"],
        "operationId": "listPeople",
        "summary": "People at asset managers",
        "description": "Everyone named as an executive, director or owner on Form ADV Schedules A and B. Each row shows the one firm that fits the filters: a current role before a former one, then the largest stake when sorting by stake, otherwise the largest firm.",
        "parameters": [
          { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "Words of the name, any order. Reaches former roles too." },
          { "name": "country", "in": "query", "schema": { "type": "string" }, "description": "The firm's country, as in /v1/people/countries. Wins over region.", "example": "Hong Kong" },
          { "$ref": "#/components/parameters/region" },
          { "name": "role", "in": "query", "schema": { "type": "string", "enum": ["ceo", "founder", "cio", "cfo", "coo", "cco", "legal", "director", "partner"] }, "description": "Matched on the filed title. founder includes chairs; cio includes portfolio managers; partner includes principals." },
          { "name": "min_stake", "in": "query", "schema": { "type": "integer", "enum": [5, 10, 25, 50, 75] }, "description": "Owns at least this percent." },
          { "name": "status", "in": "query", "schema": { "type": "string", "enum": ["current", "former", "all"] }, "description": "current by default; all when q is set." },
          { "name": "hedge_fund_firms", "in": "query", "schema": { "type": "boolean" }, "description": "Only people at hedge fund firms." },
          { "name": "sort", "in": "query", "schema": { "type": "string", "enum": ["senior", "stake", "firm", "tenure", "recent", "seats", "name"], "default": "senior" }, "description": "senior: each firm's most senior person, largest firms first, then each firm's next. seats: most firms." },
          { "name": "order", "in": "query", "schema": { "type": "string", "enum": ["asc", "desc"] }, "description": "Reverse a sort." },
          { "$ref": "#/components/parameters/limit" },
          { "$ref": "#/components/parameters/offset" }
        ],
        "responses": {
          "200": { "description": "A page of people", "content": { "application/json": { "schema": { "type": "object", "required": ["total", "limit", "offset", "rows"], "properties": { "total": { "type": "integer" }, "limit": { "type": "integer" }, "offset": { "type": "integer" }, "rows": { "type": "array", "items": { "$ref": "#/components/schemas/PersonRow" } } } } } } },
          "400": { "$ref": "#/components/responses/Invalid" },
          "429": { "$ref": "#/components/responses/Limited" }
        }
      }
    },
    "/v1/people/countries": {
      "get": {
        "tags": ["People"],
        "operationId": "listCountries",
        "summary": "Countries with people",
        "description": "Countries of firms that name people on a current filing, with how many people.",
        "responses": {
          "200": { "description": "Countries, most people first", "content": { "application/json": { "schema": { "type": "object", "properties": { "countries": { "type": "array", "items": { "type": "object", "properties": { "country": { "type": "string" }, "people": { "type": "integer" } } } } } } } } },
          "429": { "$ref": "#/components/responses/Limited" }
        }
      }
    },
    "/v1/people/{id}": {
      "get": {
        "tags": ["People"],
        "operationId": "getPerson",
        "summary": "One person",
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "A person slug (paul-r-marshall) or id (crd:5060093).", "example": "paul-r-marshall" }],
        "responses": {
          "200": { "description": "The person with every firm that named them", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Person" } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/Limited" }
        }
      }
    },
    "/v1/people/{id}/network": {
      "get": {
        "tags": ["People"],
        "operationId": "getNetwork",
        "summary": "Colleagues",
        "description": "People named at the same firm while their terms overlapped, as a graph. depth 1: direct colleagues, up to 30 per firm. depth 2 or 3: also opens the 30 most senior people found at the step before, 10 per firm, up to 400 people.",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "paul-r-marshall" },
          { "name": "depth", "in": "query", "schema": { "type": "integer", "enum": [1, 2, 3], "default": 1 } }
        ],
        "responses": {
          "200": { "description": "The graph", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Network" } } } },
          "400": { "$ref": "#/components/responses/Invalid" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/Limited" }
        }
      }
    },
    "/v1/sources": {
      "get": {
        "tags": ["Data"],
        "operationId": "listSources",
        "summary": "Data sources and freshness",
        "description": "The latest file loaded from each source, its date and row count.",
        "responses": {
          "200": { "description": "Sources", "content": { "application/json": { "schema": { "type": "object", "properties": { "sources": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string" }, "label": { "type": "string" }, "latest_as_of": { "type": "string" }, "rows": { "type": "integer" }, "fetched_at": { "type": "string" }, "url": { "type": ["string", "null"] }, "snapshots_kept": { "type": "integer" } } } } } } } } },
          "429": { "$ref": "#/components/responses/Limited" }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "region": { "name": "region", "in": "query", "schema": { "type": "string", "default": "global" }, "description": "global, hk, sg, jp, kr, us, us:<two-letter state> (us:NY) or country:<name> (country:United Kingdom)." },
      "limit": { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } },
      "offset": { "name": "offset", "in": "query", "schema": { "type": "integer", "minimum": 0, "default": 0 } }
    },
    "responses": {
      "Invalid": { "description": "A parameter is outside its allowed values", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "NotFound": { "description": "No firm or person with that id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "Limited": { "description": "More than 60 requests in a minute; see the retry-after header", "headers": { "retry-after": { "schema": { "type": "integer" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "Building": { "description": "The tables are being rebuilt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
    },
    "schemas": {
      "Error": { "type": "object", "properties": { "error": { "type": "object", "properties": { "code": { "type": "string", "enum": ["invalid_parameter", "not_found", "rate_limited", "building", "internal"] }, "message": { "type": "string" } } } } },
      "Ownership": { "type": ["string", "null"], "enum": ["NA", "A", "B", "C", "D", "E", "F", null], "description": "Schedule A/B band: NA under 5%, A 5-10%, B 10-25%, C 25-50%, D 50-75%, E 75% or more, F other." },
      "FirmRef": { "type": "object", "properties": { "id": { "type": ["string", "null"] }, "slug": { "type": ["string", "null"] }, "name": { "type": ["string", "null"] }, "country": { "type": ["string", "null"] }, "aum_usd": { "type": ["number", "null"] }, "aum_basis": { "type": ["string", "null"] }, "sec_crd": { "type": ["string", "null"] } } },
      "Firm": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "crd:160885" },
          "slug": { "type": ["string", "null"] },
          "name": { "type": "string" },
          "local_names": { "type": "object", "properties": { "ko": { "type": "string" }, "ja": { "type": "string" }, "zh": { "type": "string" } } },
          "country": { "type": ["string", "null"] },
          "region": { "type": ["string", "null"] },
          "city": { "type": ["string", "null"] },
          "us_state": { "type": ["string", "null"] },
          "aum_usd": { "type": ["number", "null"], "description": "The best figure the firm has." },
          "aum_basis": { "type": ["string", "null"], "enum": ["RAUM", "PF_GROSS", "KOFIA", "F13", null], "description": "RAUM: Form ADV 5F. PF_GROSS: private fund gross assets, Form ADV 7B. KOFIA: Korean fund and discretionary assets. F13: 13F long US equity, a floor and not AUM." },
          "hedge_fund_firm": { "type": "boolean" },
          "sec_adv": { "type": "object", "properties": { "aum_usd": { "type": ["number", "null"] }, "basis": { "type": ["string", "null"] }, "filed": { "type": ["string", "null"] }, "prior_aum_usd": { "type": ["number", "null"] }, "prior_filed": { "type": ["string", "null"] }, "regulatory_aum_usd": { "type": ["number", "null"] }, "private_fund_gross_usd": { "type": ["number", "null"] }, "private_funds": { "type": ["integer", "null"] }, "hedge_funds": { "type": ["integer", "null"] }, "registration": { "type": ["string", "null"], "description": "RIA or ERA" } } },
          "sec_13f": { "type": "object", "properties": { "value_usd": { "type": ["number", "null"] }, "period": { "type": ["string", "null"] }, "filed": { "type": ["string", "null"] }, "positions": { "type": ["integer", "null"] }, "prior_value_usd": { "type": ["number", "null"] }, "prior_period": { "type": ["string", "null"] } } },
          "kofia": { "type": "object", "properties": { "aum_usd": { "type": ["number", "null"] }, "as_of": { "type": ["string", "null"] }, "krw_per_usd": { "type": ["number", "null"] }, "fx_date": { "type": ["string", "null"] } } },
          "sources": { "type": "object", "properties": { "sec_ria": { "type": "boolean" }, "sec_era": { "type": "boolean" }, "sec_13f": { "type": "boolean" }, "sfc": { "type": "boolean" }, "kofia": { "type": "boolean" } } },
          "ids": { "type": "object", "properties": { "sec_crd": { "type": ["string", "null"] }, "sec_cik": { "type": ["string", "null"] }, "sec_file_no": { "type": ["string", "null"] }, "sfc_ce": { "type": ["string", "null"] } } },
          "url": { "type": ["string", "null"], "format": "uri" }
        }
      },
      "FirmDetail": {
        "allOf": [
          { "$ref": "#/components/schemas/Firm" },
          {
            "type": "object",
            "properties": {
              "ranks": { "type": "object", "additionalProperties": { "type": "object", "properties": { "rank": { "type": "integer" }, "of": { "type": "integer" } } } },
              "history": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "as_of": { "type": "string" }, "value": { "type": "number" }, "source": { "type": "string" } } } } },
              "people_as_of": { "type": ["string", "null"] },
              "people": { "type": "array", "items": { "$ref": "#/components/schemas/RosterEntry" } },
              "private_fund_totals": { "type": ["object", "null"] },
              "private_funds": { "type": "array", "items": { "$ref": "#/components/schemas/Fund" } },
              "service_providers": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": "string", "enum": ["auditor", "prime_broker", "custodian", "administrator", "marketer"] }, "name": { "type": "string" }, "funds": { "type": "integer" }, "as_of": { "type": "string" } } } }
            }
          }
        ]
      },
      "RosterEntry": {
        "type": "object",
        "properties": {
          "id": { "type": "string" }, "slug": { "type": ["string", "null"] }, "name": { "type": "string" }, "filed_name": { "type": "string" },
          "kind": { "type": "string", "enum": ["individual", "domestic_entity", "foreign_entity", "other"] }, "schedule": { "type": ["string", "null"], "enum": ["A", "B", null] },
          "title": { "type": ["string", "null"] }, "earlier_titles": { "type": "array", "items": { "type": "string" } },
          "ownership_code": { "$ref": "#/components/schemas/Ownership" }, "ownership": { "type": ["string", "null"] }, "control_person": { "type": ["string", "null"] },
          "since": { "type": ["string", "null"], "description": "YYYY-MM: the month the firm filed for the title, else the first filing that names the person." },
          "first_named": { "type": "string" }, "last_named": { "type": "string" }, "ended": { "type": ["string", "null"], "description": "The first later filing that no longer names the person." },
          "filings": { "type": "integer" }, "url": { "type": ["string", "null"] }
        }
      },
      "Fund": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": ["string", "null"] }, "country": { "type": ["string", "null"] }, "gross_assets_usd": { "type": ["number", "null"] }, "as_of": { "type": "string" }, "first_filed": { "type": "string" }, "last_filed": { "type": "string" }, "ended": { "type": ["string", "null"] }, "owners": { "type": ["integer", "null"] }, "non_us_owned_pct": { "type": ["number", "null"] }, "min_investment_usd": { "type": ["number", "null"] } } },
      "PersonRow": {
        "type": "object",
        "properties": {
          "id": { "type": "string" }, "slug": { "type": ["string", "null"] }, "name": { "type": "string" }, "filed_name": { "type": "string" },
          "title": { "type": ["string", "null"] }, "ownership_code": { "$ref": "#/components/schemas/Ownership" }, "ownership": { "type": ["string", "null"] },
          "since": { "type": ["string", "null"] }, "ended": { "type": ["string", "null"] },
          "firm": { "$ref": "#/components/schemas/FirmRef" },
          "current_firms": { "type": "integer" }, "firms": { "type": "integer" }, "url": { "type": ["string", "null"] }
        }
      },
      "Person": {
        "type": "object",
        "properties": {
          "id": { "type": "string" }, "slug": { "type": ["string", "null"] }, "name": { "type": "string" }, "filed_name": { "type": "string" }, "sec_crd": { "type": ["string", "null"] },
          "firms": { "type": "integer" }, "current_firms": { "type": "integer" }, "first_named": { "type": "string" }, "last_named": { "type": "string" },
          "roles": { "type": "array", "items": { "type": "object", "properties": {
            "firm": { "$ref": "#/components/schemas/FirmRef" }, "title": { "type": ["string", "null"] }, "earlier_titles": { "type": "array", "items": { "type": "string" } },
            "ownership_code": { "$ref": "#/components/schemas/Ownership" }, "ownership": { "type": ["string", "null"] }, "control_person": { "type": ["string", "null"] }, "schedule": { "type": ["string", "null"] },
            "since": { "type": ["string", "null"] }, "first_named": { "type": "string" }, "last_named": { "type": "string" }, "ended": { "type": ["string", "null"] }, "filings": { "type": "integer" } } } },
          "url": { "type": ["string", "null"] }, "iapd_url": { "type": ["string", "null"] }
        }
      },
      "Network": {
        "type": "object",
        "properties": {
          "center": { "type": "string", "example": "p:crd:5060093" },
          "nodes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": ["person", "firm"] }, "label": { "type": "string" }, "slug": { "type": ["string", "null"] }, "key": { "type": ["string", "null"] }, "country": { "type": ["string", "null"] }, "value": { "type": ["number", "null"] }, "current_firms": { "type": ["integer", "null"] } } } },
          "links": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string" }, "target": { "type": "string" }, "title": { "type": ["string", "null"] }, "from": { "type": ["string", "null"] }, "to": { "type": ["string", "null"] }, "current": { "type": "boolean" }, "stake": { "$ref": "#/components/schemas/Ownership" } } } },
          "more": { "type": "object", "additionalProperties": { "type": "integer" }, "description": "Colleagues left out, per firm node." },
          "opened": { "type": "array", "items": { "type": "string" }, "description": "People whose colleagues are included." }
        }
      }
    }
  }
}
