{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Intel: Device Clearance Monitor",
    "description": "Every new FDA 510(k), PMA, and De Novo clearance plus device recalls, enforcement actions, and establishment registrations for your product codes or companies, with weekly diff mode. Clean rows, summary links.",
    "version": "0.1",
    "x-build-id": "h5HvC3qpVpZTozB3V"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/iceni-data~fda-device-clearance-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-iceni-data-fda-device-clearance-monitor",
        "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/iceni-data~fda-device-clearance-monitor/runs": {
      "post": {
        "operationId": "runs-sync-iceni-data-fda-device-clearance-monitor",
        "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/iceni-data~fda-device-clearance-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-iceni-data-fda-device-clearance-monitor",
        "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": {
          "record_types": {
            "title": "Record types",
            "type": "array",
            "description": "Which FDA record types to fetch. 'Clearance' covers 510(k), PMA, and (optionally) De Novo decisions. 'Recall' covers device recalls and enforcement reports. 'Registration' covers establishment registrations & device listings. Combine any of the three in one run — product_codes and applicant_contains apply to all of them; review_panel applies to clearance only, and decision_after applies to clearance and recall only (registrations have no decision date to diff on).",
            "items": {
              "type": "string",
              "enum": [
                "clearance",
                "recall",
                "registration"
              ],
              "enumTitles": [
                "Clearance (510(k) / PMA / De Novo)",
                "Recall & enforcement",
                "Registration & listing"
              ]
            },
            "default": [
              "clearance"
            ]
          },
          "product_codes": {
            "title": "Product codes",
            "type": "array",
            "description": "FDA device product codes to filter on (e.g. the 3-letter classification codes assigned by FDA, such as 'QAS' or 'OBO'). Applies to every selected record_type. Leave empty to match any product code — combine with applicant_contains, review_panel, or decision_after to keep the result set reasonable, since an unfiltered query returns the entire FDA device history.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "applicant_contains": {
            "title": "Applicant contains",
            "type": "string",
            "description": "Case-insensitive substring match against the applicant/requester company name for clearances, the recalling firm for recalls/enforcement, or the owner/operator firm name for registrations (e.g. 'Medtronic'). Applies to every selected record_type. Leave blank to match any applicant.",
            "default": ""
          },
          "review_panel": {
            "title": "Review panel",
            "type": "string",
            "description": "FDA medical specialty / review (advisory committee) panel, as either the two-letter code (e.g. 'CV' for Cardiovascular, 'RA' for Radiology) or the full panel name (e.g. 'Cardiovascular'). Applies to clearance rows only (recall/enforcement and registration data has no review panel field). Leave blank to match any panel.",
            "default": ""
          },
          "decision_after": {
            "title": "Decision after (diff mode)",
            "type": "string",
            "description": "Only return decisions/events dated on or after this date (YYYY-MM-DD). Applies to clearance (decision date) and recall/enforcement (report date) rows; registrations have no decision date and are unaffected. Leave blank to return full matching history. Run the Actor on a schedule with yesterday's or last week's date to get a diff of only new decisions since the last run.",
            "default": ""
          },
          "include_de_novo": {
            "title": "Include De Novo decisions",
            "type": "boolean",
            "description": "When record_types includes 'clearance', include FDA De Novo classification grants alongside 510(k) and PMA decisions. De Novo data has no official openFDA API or bulk-download file, so it is served from a weekly cache built by refresh_de_novo runs rather than fetched live on every run. If the cache hasn't been built yet, De Novo rows are simply omitted (no charge, no error).",
            "default": true
          },
          "refresh_de_novo": {
            "title": "Refresh De Novo cache (maintenance mode)",
            "type": "boolean",
            "description": "Maintenance mode, meant for a weekly schedule. When true, the Actor scrapes FDA's De Novo decision database, updates the cached copy in the key-value store, then exits immediately — it does not query 510(k)/PMA or return any decision rows in this run, and no events are charged. Requires the SCRAPER_API_KEY environment variable to be set; if it isn't, the refresh is skipped with a warning.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}