{
  "openapi": "3.0.1",
  "info": {
    "title": "Recall Watch: FDA, CPSC & NHTSA (Unofficial)",
    "description": "New FDA (drug, device, food), CPSC and NHTSA recalls in one clean feed: firm and role, product, UPC/NDC/model, hazard, class, remedy, units. Firm and UPC watchlist, new-since-last-run mode. Unofficial; no API key needed.",
    "version": "1.0",
    "x-build-id": "eeuCiNUcseBeYfowt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saiberops~product-recall-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saiberops-product-recall-watch",
        "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/saiberops~product-recall-watch/runs": {
      "post": {
        "operationId": "runs-sync-saiberops-product-recall-watch",
        "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/saiberops~product-recall-watch/run-sync": {
      "post": {
        "operationId": "run-sync-saiberops-product-recall-watch",
        "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": {
          "mode": {
            "title": "What to fetch",
            "enum": [
              "latest",
              "newSinceLastRun",
              "dateRange"
            ],
            "type": "string",
            "description": "latest: recalls from the last N days. newSinceLastRun: only recalls your previous runs didn't return (use it on a schedule). dateRange: a fixed start and end date (up to 366 days per run).",
            "default": "latest"
          },
          "lookbackDays": {
            "title": "Days to look back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "For 'latest' and 'newSinceLastRun'. Calendar days including today. FDA publishes its enforcement report weekly, so use at least 14 days; 30 is a good default.",
            "default": 30
          },
          "startDate": {
            "title": "Start date (date range mode)",
            "type": "string",
            "description": "First date to include, YYYY-MM-DD."
          },
          "endDate": {
            "title": "End date (date range mode)",
            "type": "string",
            "description": "Last date to include, YYYY-MM-DD. Defaults to today."
          },
          "sources": {
            "title": "Agencies and feeds",
            "type": "array",
            "description": "FDA drug, device and food enforcement reports, CPSC consumer-product recalls and NHTSA vehicle, equipment, tire and child-seat recalls. All are selected by default.",
            "items": {
              "type": "string",
              "enum": [
                "fda-drug",
                "fda-device",
                "fda-food",
                "cpsc",
                "nhtsa"
              ],
              "enumTitles": [
                "FDA drugs",
                "FDA medical devices",
                "FDA food and cosmetics",
                "CPSC consumer products",
                "NHTSA vehicles and equipment"
              ]
            },
            "default": [
              "fda-drug",
              "fda-device",
              "fda-food",
              "cpsc",
              "nhtsa"
            ]
          },
          "watchFirms": {
            "title": "Firm watchlist",
            "type": "array",
            "description": "Company names to flag: suppliers, brands, your own company or competitors. Matching ignores case, punctuation and words like Inc or LLC, so 'Acme' also matches 'ACME Foods, Inc.'. Checks every firm on the recall (recalling firm, manufacturer, importer, distributor, retailer) and vehicle makes.",
            "items": {
              "type": "string"
            }
          },
          "watchCodes": {
            "title": "UPC, NDC and model watchlist",
            "type": "array",
            "description": "Product codes to flag: UPCs or GTINs (leading zeros and check digit optional), NDCs (product or package level) and model numbers. Paste your catalog's codes to see which recalls touch what you sell.",
            "items": {
              "type": "string"
            }
          },
          "watchlistOnly": {
            "title": "Only return watchlist matches",
            "type": "boolean",
            "description": "Return only recalls that match your firm or code watchlist. Each match also costs the watchlist add-on (see Pricing).",
            "default": false
          },
          "fdaClassifications": {
            "title": "FDA classes",
            "type": "array",
            "description": "Keep only these FDA recall classes (Class I is the most serious). Leave empty for all. Does not affect CPSC or NHTSA recalls.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ],
              "enumTitles": [
                "Class I (most serious)",
                "Class II",
                "Class III"
              ]
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep recalls whose title, product, reason, hazard, component or firm names contain any of these words, for example peanut, lithium, airbag. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max recalls",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The run stops after this many recalls. When there are more, each agency gets a fair share. Each returned recall is one charged event.",
            "default": 50
          },
          "dateBasis": {
            "title": "Which date the window uses",
            "enum": [
              "reportDate",
              "lastUpdated"
            ],
            "type": "string",
            "description": "reportDate: when the recall was published (FDA report date, CPSC recall date, NHTSA report date). lastUpdated: when CPSC last republished it or NHTSA added it to its file, which also catches updated recalls. FDA always uses its report date.",
            "default": "reportDate"
          },
          "cursorName": {
            "title": "Cursor name (new since last run)",
            "type": "string",
            "description": "Keeps a separate 'new since last run' position per name, so different scheduled watches (for example one per client) don't share one. Letters, numbers and dashes.",
            "default": ""
          },
          "maxRecordsPerSource": {
            "title": "Max records to read per feed",
            "minimum": 50,
            "maximum": 5000,
            "type": "integer",
            "description": "When filters, the watchlist-only option or 'new since last run' are on, each feed reads up to this many records in the window before filtering.",
            "default": 1000
          },
          "openFdaApiKey": {
            "title": "Your openFDA API key (optional)",
            "type": "string",
            "description": "Not needed: the Actor works without a key. Add your own free openFDA key only if you run very large or very frequent jobs. It is stored encrypted and sent only to api.fda.gov."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}