{
  "openapi": "3.0.1",
  "info": {
    "title": "openFDA Recalls Search: Food, Drug and Device Enforcement",
    "description": "Search openFDA food, drug and device recall enforcement reports by keyword, firm, classification, status, state, country and date. Firm, classification, product description, reason and dates. Unofficial, not affiliated with or endorsed by the FDA.",
    "version": "0.1",
    "x-build-id": "HKmnOGFaJ2AcFc2Zc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fecklesspleb~openfda-recalls-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fecklesspleb-openfda-recalls-search",
        "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/fecklesspleb~openfda-recalls-search/runs": {
      "post": {
        "operationId": "runs-sync-fecklesspleb-openfda-recalls-search",
        "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/fecklesspleb~openfda-recalls-search/run-sync": {
      "post": {
        "operationId": "run-sync-fecklesspleb-openfda-recalls-search",
        "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": {
          "productTypes": {
            "title": "Product types",
            "type": "array",
            "description": "Which openFDA enforcement endpoints to query: food, drug and/or device. Empty means food. When several are selected they are queried in that order (food, then drug, then device), each newest first.",
            "items": {
              "type": "string",
              "enum": [
                "food",
                "drug",
                "device"
              ]
            },
            "default": [
              "food"
            ]
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Optional. Text matched against openFDA's searchable fields (product description, reason, firm and others). Leave empty to list recent records for the selected types and filters."
          },
          "recallingFirm": {
            "title": "Recalling firm",
            "type": "string",
            "description": "Optional. Only records whose recalling firm matches this name."
          },
          "classifications": {
            "title": "Classification",
            "type": "array",
            "description": "Optional. Only these FDA classifications. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ]
            }
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "Optional. Only these openFDA status values. Empty means all. FDA does not update a record's status after it is classified (see the disclaimer in the README).",
            "items": {
              "type": "string",
              "enum": [
                "Ongoing",
                "Completed",
                "Terminated"
              ]
            }
          },
          "state": {
            "title": "Firm state",
            "type": "string",
            "description": "Optional. Recalling firm's state (for example WA or California)."
          },
          "country": {
            "title": "Firm country",
            "type": "string",
            "description": "Optional. Recalling firm's country (for example United States)."
          },
          "dateField": {
            "title": "Date field",
            "enum": [
              "report_date",
              "recall_initiation_date"
            ],
            "type": "string",
            "description": "Which date the date range and the newest/oldest sort use.",
            "default": "report_date"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Optional. Inclusive start of the date range (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Optional. Inclusive end of the date range (YYYY-MM-DD)."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Order by the selected date field. Default is newest first.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Stop after this many records are saved (up to 25,000). openFDA skip/limit paging allows a skip of at most 25,000 (https://open.fda.gov/apis/query-parameters/).",
            "default": 10
          },
          "onlyNew": {
            "title": "Only new records",
            "type": "boolean",
            "description": "When true, returns only records not seen in previous runs, identified by recall_number and event_id and stored in a named key-value store. Off by default. Use stateKey to keep more than one independent list.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional. Name of the seen-record list used when onlyNew is true (letters, digits, hyphen and underscore). Default is default."
          },
          "apiKey": {
            "title": "openFDA API key (optional, recommended)",
            "type": "string",
            "description": "Your own free openFDA API key (https://open.fda.gov/apis/authentication/). Without it, limits are 240 requests per minute and 1,000 per day per IP address, shared on Apify IPs. With a key, the daily limit is 120,000 requests per key. Stored encrypted, sent only as the api_key query parameter, never logged or saved. There is no team key."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}