{
  "openapi": "3.0.1",
  "info": {
    "title": "US Recalls Monitor - FDA Food, Drug, Device & NHTSA Recalls",
    "description": "One normalised feed of US product recalls: FDA food, drug and device enforcement reports plus NHTSA vehicle, tyre, equipment and child-seat recalls, ranked by severity with phone numbers and e-mail addresses stripped.",
    "version": "0.1",
    "x-build-id": "q8huYJD1Cymt01wST"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/borasipahi~us-recalls-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-borasipahi-us-recalls-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/borasipahi~us-recalls-monitor/runs": {
      "post": {
        "operationId": "runs-sync-borasipahi-us-recalls-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/borasipahi~us-recalls-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-borasipahi-us-recalls-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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which recall registers to read. The three FDA feeds are enforcement reports from the food, drug and device centres; NHTSA covers vehicles, tyres, equipment and child seats.",
            "items": {
              "type": "string",
              "enum": [
                "fda-food",
                "fda-drug",
                "fda-device",
                "nhtsa"
              ],
              "enumTitles": [
                "FDA — food",
                "FDA — drugs",
                "FDA — devices",
                "NHTSA — vehicles, tyres, child seats"
              ]
            },
            "default": [
              "fda-food",
              "fda-drug",
              "fda-device",
              "nhtsa"
            ]
          },
          "postedWithinDays": {
            "title": "Posted within days",
            "minimum": 1,
            "type": "integer",
            "description": "How far back to look, counted from today. Ignored when you set an explicit date window below. Note that FDA publishes enforcement reports with roughly a one to two week lag, so windows under 14 days often return NHTSA rows only.",
            "default": 30
          },
          "publishedFrom": {
            "title": "Published from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest report date, YYYY-MM-DD. Overrides Posted within days."
          },
          "publishedTo": {
            "title": "Published to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest report date, YYYY-MM-DD. Defaults to today."
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Comma-separated keywords. A recall is kept if any keyword appears in the firm, product type, product description, reason or consequence."
          },
          "firms": {
            "title": "Firms",
            "type": "array",
            "description": "Keep only recalls whose recalling firm or manufacturer name contains one of these, e.g. [\"Ford\", \"Nestle\"]. Case-insensitive substring match.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productTypes": {
            "title": "Product types",
            "type": "array",
            "description": "Keep only these product types, matched as substrings against the agency's own label: Food, Drugs, Devices, Vehicle, Tire, Equipment, Child Seat.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "FDA classifications",
            "type": "array",
            "description": "FDA hazard classes. Class I means a reasonable probability of serious harm or death, Class II temporary or reversible harm, Class III unlikely to cause harm. NHTSA does not publish classes, so setting this drops NHTSA rows.",
            "items": {
              "type": "string",
              "enum": [
                "class i",
                "class ii",
                "class iii"
              ],
              "enumTitles": [
                "Class I — serious harm or death",
                "Class II — temporary or reversible harm",
                "Class III — unlikely to cause harm"
              ]
            },
            "default": []
          },
          "severities": {
            "title": "Severity",
            "type": "array",
            "description": "One ranking across both agencies. FDA Class I is high, Class II medium, Class III low. An NHTSA recall is high when it carries a do-not-drive warning or a park-outside fire risk, and medium otherwise.",
            "items": {
              "type": "string",
              "enum": [
                "high",
                "medium",
                "low"
              ],
              "enumTitles": [
                "High",
                "Medium",
                "Low"
              ]
            },
            "default": []
          },
          "urgentOnly": {
            "title": "Urgent only",
            "type": "boolean",
            "description": "Shortcut for severity = high: FDA Class I recalls plus NHTSA do-not-drive and park-outside fire-risk campaigns.",
            "default": false
          },
          "states": {
            "title": "US states",
            "type": "array",
            "description": "Two-letter state codes matched against the recalling firm's state, e.g. [\"CA\", \"NY\"]. FDA rows only; NHTSA does not publish a state, so setting this drops NHTSA rows.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeFullDetails": {
            "title": "Include full details",
            "type": "boolean",
            "description": "Add the untruncated product description and reason, plus the health consequence, the corrective action, the affected lot and code ranges, the distribution pattern, the component and the manufacturer's campaign number. Charged as recall-detail on top of recall-record.",
            "default": false
          },
          "stripContactDetails": {
            "title": "Strip contact details",
            "type": "boolean",
            "description": "Replace e-mail addresses and phone numbers in free text with placeholders. Recall notices routinely embed manufacturer hotlines and occasionally an individual's address. Leave this on unless you have your own reason not to.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum recalls",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Bounds your cost.",
            "default": 1000
          },
          "incremental": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Remember every recall already delivered and skip it next time. Use with a daily schedule to get an alert feed instead of a full dump.",
            "default": false
          },
          "incrementalStoreName": {
            "title": "Incremental store name",
            "type": "string",
            "description": "Key-value store that holds delivered recall ids.",
            "default": "us-recalls-monitor-seen"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}