{
  "openapi": "3.0.1",
  "info": {
    "title": "US Recall Change Audit — FDA / CPSC / NHTSA",
    "description": "Read official U.S. recall records from openFDA, CPSC and NHTSA, normalise them, and optionally report changes observed since your previous snapshot. Not safety, medical or legal advice. NHTSA only covers vehicles you specify.",
    "version": "0.1",
    "x-build-id": "yKWagqnaEcqLa84Ws"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/embellished_dewberry~us-recall-change-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-embellished_dewberry-us-recall-change-audit",
        "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/embellished_dewberry~us-recall-change-audit/runs": {
      "post": {
        "operationId": "runs-sync-embellished_dewberry-us-recall-change-audit",
        "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/embellished_dewberry~us-recall-change-audit/run-sync": {
      "post": {
        "operationId": "run-sync-embellished_dewberry-us-recall-change-audit",
        "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": "Mode",
            "enum": [
              "snapshot",
              "delta"
            ],
            "type": "string",
            "description": "snapshot = return normalised records for the window. delta = compare against your previous baseline and return only new/changed records. The first delta run with no baseline only establishes a baseline (not charged as recall-record).",
            "default": "snapshot"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Official sources to query. FDA food/drug/device are separate openFDA enforcement endpoints. NHTSA requires vehicles. Sources are never cross-merged into one recall.",
            "items": {
              "type": "string",
              "enum": [
                "fda_food",
                "fda_drug",
                "fda_device",
                "cpsc",
                "nhtsa"
              ],
              "enumTitles": [
                "openFDA food enforcement",
                "openFDA drug enforcement",
                "openFDA device enforcement",
                "CPSC product recalls",
                "NHTSA vehicle recalls (by make/model/year only)"
              ]
            },
            "default": [
              "fda_food",
              "cpsc"
            ]
          },
          "lastNDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Publication/report-date window ending today (UTC), counting today as day 1. Ignored when Published from is set. For NHTSA, filters ReportReceivedDate client-side after the vehicle query.",
            "default": 30
          },
          "publishedFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional start of the date range (inclusive). Overrides last N days."
          },
          "publishedTo": {
            "title": "Published to (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional end of the date range (inclusive). Defaults to today (UTC)."
          },
          "vehicles": {
            "title": "NHTSA vehicles (max 10)",
            "type": "array",
            "description": "Required when sources includes nhtsa. Each entry must be a complete make / model / modelYear. This Actor does not query a full NHTSA recall feed."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of records to output in this run (across all sources).",
            "default": 200
          },
          "baselineRecords": {
            "title": "Baseline records (delta)",
            "type": "array",
            "description": "Optional. Paste the previous snapshot records (or a snapshot object with a records array). Preferred isolation method: baseline stays in your input, never in the author account."
          },
          "baselineDatasetId": {
            "title": "Baseline dataset ID (delta)",
            "type": "string",
            "description": "Optional. ID of a dataset from your previous run (under your Apify account) to use as baseline."
          },
          "snapshotStoreName": {
            "title": "Named snapshot store (optional)",
            "type": "string",
            "description": "Optional. Customer-chosen Apify named key-value store (created under the account that runs this Actor) used to save/load the snapshot for delta mode. Do not reuse another customer's store name. Leave empty to rely on baselineRecords or baselineDatasetId only."
          },
          "snapshotKey": {
            "title": "Snapshot key",
            "type": "string",
            "description": "Key inside the named snapshot store. Default recall-snapshot.",
            "default": "recall-snapshot"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}