{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Approval Catalyst: Approvals Plus Insider Buying",
    "description": "For each ticker, correlates recent FDA wins on openFDA (drug approvals, device PMA, 510(k) clearances) with insider open-market buying around the decision date, scores conviction 0 to 100, and tiers each as approval_confirmed, accumulation, or watch.",
    "version": "0.1",
    "x-build-id": "ZwcEDCcbmVeDDobJz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemint~fda-approval-catalyst-pipeline/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemint-fda-approval-catalyst-pipeline",
        "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/scrapemint~fda-approval-catalyst-pipeline/runs": {
      "post": {
        "operationId": "runs-sync-scrapemint-fda-approval-catalyst-pipeline",
        "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/scrapemint~fda-approval-catalyst-pipeline/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemint-fda-approval-catalyst-pipeline",
        "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": [
          "tickers"
        ],
        "properties": {
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock tickers to scan. Each is resolved to its company name via the SEC company map, then matched against openFDA sponsor/applicant records.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "eventTypes": {
            "title": "FDA event types",
            "uniqueItems": true,
            "type": "array",
            "description": "Which openFDA event types to include. Drug approvals (NDA/BLA), device PMA approvals, and 510(k) clearances.",
            "items": {
              "type": "string",
              "enum": [
                "drug_approval",
                "device_pma",
                "device_510k"
              ],
              "enumTitles": [
                "Drug approvals (NDA/BLA)",
                "Device PMA approvals",
                "Device 510(k) clearances"
              ]
            },
            "default": [
              "drug_approval",
              "device_pma",
              "device_510k"
            ]
          },
          "maxAgeDays": {
            "title": "FDA lookback (days)",
            "minimum": 1,
            "maximum": 1095,
            "type": "integer",
            "description": "How far back to pull FDA decisions. Default 120 days catches the recent catalyst window.",
            "default": 120
          },
          "insiderWindowDays": {
            "title": "Insider window (days)",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Days on each side of an FDA decision date to count insider open-market buys and sells.",
            "default": 30
          },
          "includeInsider": {
            "title": "Include insider transactions",
            "type": "boolean",
            "description": "Pull SEC Form 4 open-market buys and sells and correlate them with each FDA event. Turn off to score FDA events alone.",
            "default": true
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop events scoring below this 0 to 100 convergence score. Zero returns every event in range.",
            "default": 0
          },
          "maxEventsPerCompany": {
            "title": "Max events per company",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap FDA events pulled per company before scoring.",
            "default": 25
          },
          "maxEventsTotal": {
            "title": "Max events total",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap total FDA events scored across all tickers in one run.",
            "default": 200
          },
          "userAgent": {
            "title": "User-Agent (with email)",
            "type": "string",
            "description": "SEC EDGAR requires a User-Agent containing a contact email. Example: 'yourname research@yourdomain.com'. Leave blank to use a default.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy, passed through to the Form 4 child. openFDA and the EDGAR ticker map are called directly and do not need a proxy.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}