{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Recall Monitor",
    "description": "Watch FDA food, drug and device recalls for any product, ingredient, brand or supplier. Returns the firm, the reason, the severity class, the distribution area and the dates, and flags new recalls and FDA reclassifications since your last run.",
    "version": "0.1",
    "x-build-id": "co0KWHkTsZg3pfHkn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arched_friend~fda-recall-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arched_friend-fda-recall-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/arched_friend~fda-recall-monitor/runs": {
      "post": {
        "operationId": "runs-sync-arched_friend-fda-recall-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/arched_friend~fda-recall-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-arched_friend-fda-recall-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",
        "required": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Product, ingredient or brand",
            "type": "array",
            "description": "What to watch for, one per line, for example peanut, listeria or your own brand name. Each is matched against the product description, the recall reason and the firm name.",
            "items": {
              "type": "string"
            }
          },
          "firms": {
            "title": "Recalling firms",
            "type": "array",
            "description": "Optional. Limit to specific companies, one per line. Use this to watch a supplier or a competitor.",
            "items": {
              "type": "string"
            }
          },
          "productTypes": {
            "title": "Product types",
            "type": "array",
            "description": "Which FDA recall databases to search.",
            "items": {
              "type": "string",
              "enum": [
                "food",
                "drug",
                "device"
              ],
              "enumTitles": [
                "Food",
                "Drugs",
                "Medical devices"
              ]
            },
            "default": [
              "food",
              "drug",
              "device"
            ]
          },
          "lastDays": {
            "title": "Reported in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "How far back to search. Keep this short for a scheduled run.",
            "default": 90
          },
          "classifications": {
            "title": "Severity classes",
            "type": "array",
            "description": "Limit the search to these classes. Class I means a reasonable probability of serious harm or death. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ],
              "enumTitles": [
                "Class I (serious harm)",
                "Class II (temporary harm)",
                "Class III (unlikely harm)"
              ]
            },
            "default": []
          },
          "statuses": {
            "title": "Recall status",
            "type": "array",
            "description": "Limit to these statuses, for example Ongoing. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Ongoing",
                "Completed",
                "Terminated",
                "Pending"
              ],
              "enumTitles": [
                "Ongoing",
                "Completed",
                "Terminated",
                "Pending"
              ]
            },
            "default": []
          },
          "states": {
            "title": "Firm states",
            "type": "array",
            "description": "Optional. Two-letter US state codes, one per line, for example CA.",
            "items": {
              "type": "string"
            }
          },
          "maxSeverity": {
            "title": "Most serious class to keep",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "1 keeps only Class I, 2 keeps Class I and II, 0 keeps everything. Recalls FDA has not classified yet are always kept, because unclassified is not the same as harmless.",
            "default": 0
          },
          "firmExcludes": {
            "title": "Exclude firms",
            "type": "array",
            "description": "Drop recalls whose firm name contains any of these, one per line.",
            "items": {
              "type": "string"
            }
          },
          "descriptionExcludes": {
            "title": "Exclude wording",
            "type": "array",
            "description": "Drop recalls whose product description or reason contains any of these, one per line.",
            "items": {
              "type": "string"
            }
          },
          "onlyChanged": {
            "title": "Only new and changed recalls",
            "type": "boolean",
            "description": "Return nothing on a quiet run. Turn this on for a scheduled search so you only hear about new recalls, reclassifications and status changes.",
            "default": false
          },
          "maxResultsPerType": {
            "title": "Maximum recalls per product type",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most recalls to pull from each database in one run, newest first.",
            "default": 200
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for a single page of results before giving up on it.",
            "default": 45
          },
          "timeBudgetSecs": {
            "title": "Time budget (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "How long the run may spend paging before it returns what it has. Keeps a scheduled run predictable.",
            "default": 180
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}