{
  "openapi": "3.0.1",
  "info": {
    "title": "Taiwan Insider Share Transfers — 內部人持股轉讓申報",
    "description": "Taiwan insider share-transfer filings from MOPS: what a director, officer or 10% shareholder must announce before selling, gifting or trusting shares — method, size, transferee, stake before and after, valid window — plus the report of what went unsold, and why. TWSE, TPEx, Emerging, from 2002.",
    "version": "0.1",
    "x-build-id": "8Ib0HbTmcLO48UJzl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/chamarix~taiwan-insider-share-transfers/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-chamarix-taiwan-insider-share-transfers",
        "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/chamarix~taiwan-insider-share-transfers/runs": {
      "post": {
        "operationId": "runs-sync-chamarix-taiwan-insider-share-transfers",
        "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/chamarix~taiwan-insider-share-transfers/run-sync": {
      "post": {
        "operationId": "run-sync-chamarix-taiwan-insider-share-transfers",
        "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",
        "required": [
          "startDate"
        ],
        "properties": {
          "startDate": {
            "title": "Start date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Start date in YYYY-MM-DD format, matched against the filing date (申報日期). MOPS publishes these filings from 2002-08-01 onwards and earlier dates are moved up to it. The report is fetched a calendar month at a time — the finest granularity MOPS accepts — and then trimmed to your range.",
            "default": "2026-07-01"
          },
          "endDate": {
            "title": "End date",
            "pattern": "^(|\\d{4}-\\d{2}-\\d{2})$",
            "type": "string",
            "description": "End date in YYYY-MM-DD format (inclusive). Leave empty to query only the start date. Cost is one request per board per record type per calendar month touched, so a whole year of both boards is roughly 48 requests.",
            "default": "2026-07-31"
          },
          "markets": {
            "title": "Boards",
            "type": "array",
            "description": "Which boards to cover. Leave empty for all three. 公開發行 (registered but untraded) companies are not covered — MOPS publishes them without a security code, in a different column layout.",
            "items": {
              "type": "string",
              "enum": [
                "TWSE",
                "TPEX",
                "EMERGING"
              ],
              "enumTitles": [
                "TWSE — listed (上市)",
                "TPEx — OTC (上櫃)",
                "Emerging — pre-IPO (興櫃)"
              ]
            },
            "default": []
          },
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "TRANSFER_PLAN is the pre-transfer notice an insider files before disposing of shares. NOT_TRANSFERRED is the follow-up filed when the window closes with part of the plan unexecuted, and carries the stated reason. Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "TRANSFER_PLAN",
                "NOT_TRANSFERRED"
              ],
              "enumTitles": [
                "TRANSFER_PLAN — pre-transfer notice (持股轉讓事前申報)",
                "NOT_TRANSFERRED — unexecuted report (持股未轉讓申報)"
              ]
            },
            "default": []
          },
          "stockCodes": {
            "title": "Security codes filter",
            "type": "array",
            "description": "Optional list of security codes to keep (e.g., ['2330', '2454']). Leave empty for every company that filed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "insiderOffices": {
            "title": "Insider office filter",
            "type": "array",
            "description": "Keep only filings by a given class of insider. The office is derived from the filer's own 申報人身分 string, so 法人董事代表人配偶 (the spouse of a corporate director's representative) counts as DIRECTOR. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "DIRECTOR",
                "SUPERVISOR",
                "MANAGER",
                "MAJOR_SHAREHOLDER",
                "OTHER"
              ],
              "enumTitles": [
                "Director (董事)",
                "Supervisor (監察人)",
                "Manager / officer (經理人)",
                "10% shareholder (大股東)",
                "Other"
              ]
            },
            "default": []
          },
          "transferMethods": {
            "title": "Transfer method filter",
            "type": "array",
            "description": "Keep only TRANSFER_PLAN rows using at least one of these methods, written exactly as MOPS publishes them: 一般交易, 贈與, 信託, 洽特定人, 鉅額逐筆交易, 盤後定價交易, 轉讓私募股票, 辦理過額配售. Setting this drops every NOT_TRANSFERRED row, which carries no method.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPlannedShares": {
            "title": "Minimum planned transfer (shares)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only filings where the total planned transfer is at least this many shares. Useful for cutting the long tail of small gifts. Leave at 0 for everything.",
            "default": 0
          },
          "crossCheck": {
            "title": "Cross-check against the open-data mirror",
            "type": "boolean",
            "description": "Compare the day covered by TWSE's and TPEx's open-data mirrors of the same two reports against what was parsed here, and log the result. Costs up to four extra requests and never changes the output — it only tells you in the log whether the two publications agree.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}