{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC N-PORT Holdings Diff - Fund Position Changes",
    "description": "Period-over-period holdings changes for any SEC-registered mutual fund, ETF or closed-end fund, straight from Form N-PORT on EDGAR: new positions, exits, buys and sells with balance, USD value and portfolio weight before and after.",
    "version": "0.1",
    "x-build-id": "oXUVcLbibcLHIQWRs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datadeltas~sec-nport-holdings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datadeltas-sec-nport-holdings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/datadeltas~sec-nport-holdings/runs": {
      "post": {
        "operationId": "runs-sync-datadeltas-sec-nport-holdings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/datadeltas~sec-nport-holdings/run-sync": {
      "post": {
        "operationId": "run-sync-datadeltas-sec-nport-holdings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "tickers": {
            "title": "Fund tickers to watch",
            "type": "array",
            "description": "Share-class tickers of the funds you want — mutual funds or ETFs (e.g. VFIAX, VOO, BND, AGG, FXAIX). Resolved to a fund series via SEC's own public company_tickers_mf.json, no API key. A ticker that is not in that file (SPY, for example — a unit investment trust with no series) has to be watched by registrant CIK instead.",
            "items": {
              "type": "string"
            }
          },
          "seriesIds": {
            "title": "Fund series IDs to watch",
            "type": "array",
            "description": "SEC series ids (e.g. S000002839). N-PORT is filed per SERIES, so this is the precise way to watch one fund inside a big trust — PIMCO Funds filed 94 separate N-PORT reports for one quarter.",
            "items": {
              "type": "string"
            }
          },
          "ciks": {
            "title": "Registrant CIKs to watch",
            "type": "array",
            "description": "SEC CIK numbers of the fund registrants (trusts), any zero-padding — e.g. 0000884394 for the SPDR S&P 500 ETF Trust. Watches EVERY fund series the trust files for, which for a large family is dozens of funds and dozens of multi-MB documents. Narrow with tickers or seriesIds unless you really want the whole trust.",
            "items": {
              "type": "string"
            }
          },
          "changeTypes": {
            "title": "Change types to emit",
            "type": "array",
            "description": "Which portfolio actions count. Default: all four.",
            "items": {
              "type": "string",
              "enum": [
                "new-position",
                "exited",
                "increased",
                "decreased"
              ],
              "enumTitles": [
                "new-position — the fund did not hold it last period",
                "exited — the fund held it last period and no longer does",
                "increased — balance went up",
                "decreased — balance went down"
              ]
            },
            "default": [
              "new-position",
              "exited",
              "increased",
              "decreased"
            ]
          },
          "minChangePct": {
            "title": "Minimum relative balance move (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Floor on |balanceAfter - balanceBefore| / |balanceBefore| for increased/decreased rows. new-position and exited are never filtered. Default 5%, and it matters: an index fund's share count moves on EVERY line each quarter because creations and redemptions scale the whole portfolio (measured on SPY: 494 of 504 positions moved, none flat, 461 of them by under 5%), and a bond fund's principal amounts fall monthly as mortgage pools amortise (4,658 of one fund's 5,210 sub-5% moves were ABS-MBS). Neither is a portfolio decision. Set 0 for the raw, unfiltered diff.",
            "default": 5
          },
          "minValUSD": {
            "title": "Minimum position value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional floor applied to the larger ABSOLUTE before/after USD value — use it to cut a fund's long tail. Absolute, because short positions and sold protection carry a negative valUSD. 0 = no floor.",
            "default": 0
          },
          "assetCategories": {
            "title": "Asset categories to keep",
            "type": "array",
            "description": "Optional allow-list of N-PORT assetCat codes. Empty = all. Use EC alone for a clean equity-ownership feed: derivatives, FX forwards and repos have no stable identity across periods (filers key them on per-trade internal ids), so they churn.",
            "items": {
              "type": "string",
              "enum": [
                "EC",
                "EP",
                "DBT",
                "ABS-MBS",
                "ABS-CBDO",
                "ABS-O",
                "LON",
                "SN",
                "STIV",
                "RA",
                "DE",
                "DFE",
                "DIR",
                "DCR",
                "COMM",
                "RE"
              ],
              "enumTitles": [
                "EC — equity, common",
                "EP — equity, preferred",
                "DBT — debt",
                "ABS-MBS — mortgage-backed",
                "ABS-CBDO — CDO/CBO",
                "ABS-O — other asset-backed",
                "LON — loan",
                "SN — structured note",
                "STIV — short-term investment vehicle",
                "RA — repurchase agreement",
                "DE — derivative, equity",
                "DFE — derivative, foreign exchange",
                "DIR — derivative, interest rate",
                "DCR — derivative, credit",
                "COMM — commodity",
                "RE — real estate"
              ]
            },
            "default": []
          },
          "maxItems": {
            "title": "Max holding changes per run",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on changes emitted in a single run (cost control). Biggest positions come first; anything over the cap carries over to the next run with no duplicates, and the cap is split fairly between the funds you watch so one bond fund cannot starve the rest.",
            "default": 1000
          },
          "emitInitialSnapshot": {
            "title": "Emit an opening snapshot for a fund's first-ever N-PORT",
            "type": "boolean",
            "description": "Only applies when a fund series has exactly ONE public N-PORT on file and there is nothing to diff against. Off (default): the filing is recorded and nothing is emitted. On: every holding is emitted as new-position with null before-values — which for a bond fund is over 10,000 rows. Funds with two or more filings always produce a real period-over-period diff on the first run.",
            "default": false
          },
          "userAgent": {
            "title": "SEC User-Agent (identify yourself)",
            "type": "string",
            "description": "SEC's fair-access policy requires a User-Agent identifying who you are, e.g. 'my-company research you@example.com'. Please set your own contact here.",
            "default": "apify-actor-sec-nport-holdings daniel@apexwebstudio.co.nz"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}