# searchFoodRecalls

**Identifier:** `openfda_searchFoodRecalls`

**Provider:** [OpenFDA](https://kirha.com/providers/openfda.md)

Search U.S. food enforcement reports and recalls. Find food product recalls by product, company, reason (e.g., salmonella, undeclared allergen), or classification.

## Run it with the CLI

```bash
kirha tools run openfda_searchFoodRecalls \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "openfda_searchFoodRecalls",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "classification": {
      "enum": [
        "Class I",
        "Class II",
        "Class III"
      ],
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 20,
      "minimum": 1,
      "type": "integer"
    },
    "productDescription": {
      "type": "string"
    },
    "reasonForRecall": {
      "description": "e.g., salmonella, undeclared allergen",
      "type": "string"
    },
    "recallingFirm": {
      "type": "string"
    },
    "state": {
      "description": "e.g., CA, NY",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "recallNumbers": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "recalls": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "classification": {
            "type": "string"
          },
          "distributionPattern": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "reasonForRecall": {
            "type": "string"
          },
          "recallInitiationDate": {
            "description": "YYYY-MM-DD",
            "type": "string"
          },
          "recallNumber": {
            "type": "string"
          },
          "recallingFirm": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "recallNumber"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "total": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "total",
    "recalls",
    "recallNumbers"
  ],
  "type": "object"
}
```

-----

[All OpenFDA tools](https://kirha.com/providers/openfda.md) · [< Back to tools list](https://kirha.com/tools.md)