{
  "openapi": "3.0.1",
  "info": {
    "title": "EU & France Product Recalls – RappelConso + Safety Gate",
    "description": "Search, look up and watch product recalls from RappelConso (France) and the EU Safety Gate (RAPEX): brand, risk, measures, lots, barcodes, images, official notice. Unofficial tool using official open data.",
    "version": "0.1",
    "x-build-id": "A0c6JFjy2v2LrJpe7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shadow-tools~eu-france-product-recalls/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shadow-tools-eu-france-product-recalls",
        "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/shadow-tools~eu-france-product-recalls/runs": {
      "post": {
        "operationId": "runs-sync-shadow-tools-eu-france-product-recalls",
        "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/shadow-tools~eu-france-product-recalls/run-sync": {
      "post": {
        "operationId": "run-sync-shadow-tools-eu-france-product-recalls",
        "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": [
              "search",
              "watch",
              "lookup"
            ],
            "type": "string",
            "description": "Pick one. \"search\" = use for a question about recalls in a period (is product X recalled, which recalls this week): returns recalls matching your filters. \"watch\" = use only for scheduled (hourly or daily) runs: returns only recalls not delivered by a previous run with the same filters, state is kept per Actor and user store, and the first watch run returns the recent alerts of the period. \"lookup\" = use when you already have a reference: a RappelConso recall id like 2026-11-0037, a Safety Gate case like SR/03023/26 or an official notice URL (put it in lookupIds). Allowed values: search, watch, lookup. Default: search.",
            "default": "search"
          },
          "sources": {
            "title": "Sources",
            "maxItems": 2,
            "type": "array",
            "description": "Sources to read, as a list, e.g. [\"RAPPELCONSO\"]. Allowed values: RAPPELCONSO (France, all consumer products incl. food, cars, children's items; French text) and SAFETY_GATE (EU/EEA alerts on dangerous non-food products; text in the chosen language). Default: both.",
            "items": {
              "type": "string",
              "enum": [
                "RAPPELCONSO",
                "SAFETY_GATE"
              ],
              "enumTitles": [
                "RappelConso (France)",
                "Safety Gate / RAPEX (EU)"
              ]
            },
            "default": [
              "RAPPELCONSO",
              "SAFETY_GATE"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Words searched in the product name, brand, category and risk, as a list, e.g. [\"lait\", \"poussette\"]. ANY of them matches (OR), at the start of a word, accents and case ignored. RappelConso is in French, Safety Gate in the chosen language: add both (\"jouet\", \"toy\"). Empty = no keyword filter.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "brands": {
            "title": "Brands",
            "maxItems": 50,
            "type": "array",
            "description": "Brand names as a list, e.g. [\"Lidl\", \"Philips\"]. A recall matches if its brand contains ANY of them. Empty = all brands.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "categories": {
            "title": "Categories",
            "maxItems": 50,
            "type": "array",
            "description": "Category words as a list, e.g. [\"alimentation\"] for RappelConso (French: alimentation, maison-habitat, hygiène-beauté, sports-loisirs, automobiles...) or [\"Toys\"] for Safety Gate (English: Toys, Cosmetics, Electrical appliances and equipment...). Any of them matches (OR). Empty = all categories.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "hazards": {
            "title": "Risks / hazards",
            "maxItems": 50,
            "type": "array",
            "description": "Risk words as a list, e.g. [\"listeria\", \"salmonelle\", \"fire\", \"choking\"]. Matched against the risk type and the recall reason; any of them matches (OR). Empty = all risks.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "distributors": {
            "title": "Distributors (RappelConso only)",
            "maxItems": 50,
            "type": "array",
            "description": "Retailers or marketplaces as a list, e.g. [\"leclerc\", \"amazon\"] (RappelConso only). Safety Gate has no distributor data: if you set this, Safety Gate is skipped and the run log says so. Empty = all distributors.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "barcodes": {
            "title": "Barcodes (GTIN/EAN)",
            "maxItems": 50,
            "type": "array",
            "description": "Barcodes (GTIN/EAN, 8 to 14 digits) as a list, e.g. [\"3467980036813\"]. Only recalls listing a matching barcode are returned; spaces and dashes are ignored. To check a catalogue, also set daysBack to 365. Empty = no barcode filter.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "lookupIds": {
            "title": "Notices to look up (lookup mode)",
            "maxItems": 50,
            "type": "array",
            "description": "Used only in lookup mode: list of references, e.g. [\"2026-11-0037\", \"SR/03023/26\"]. Accepts a RappelConso recall id (YYYY-MM-NNNN), a Safety Gate case number (SR/NNNNN/YY) or the official notice URL. Safety Gate lookup scans the last year of alerts (or the year in the case number).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Period length in days ending today, integer 1-365, e.g. 7 (default 7). Ignored if dateFrom is set. A small value is faster; Safety Gate is read in blocks of 28 days.",
            "default": 7
          },
          "dateFrom": {
            "title": "Start date (optional)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Start of the period, format YYYY-MM-DD, e.g. 2026-10-01. Overrides daysBack. Leave empty to use daysBack."
          },
          "dateTo": {
            "title": "End date (optional)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "End of the period, format YYYY-MM-DD, e.g. 2026-10-31. Default: today. Must be on or after dateFrom."
          },
          "onlyNew": {
            "title": "Only new alerts (search mode)",
            "type": "boolean",
            "description": "Search mode only, true or false (default false): skip recalls already delivered by a previous run with the same sources and filters. Always on in watch mode. A new version of a RappelConso sheet counts as new.",
            "default": false
          },
          "maxResults": {
            "title": "Max results per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of recalls returned per source, integer 1-5000, default 20, e.g. 20. Keep it small; raise it only if the run SUMMARY says a source is capped. Your run cost limit also applies to the total.",
            "default": 20
          },
          "language": {
            "title": "Language of Safety Gate texts",
            "enum": [
              "en",
              "fr",
              "de",
              "es",
              "it",
              "nl",
              "pt",
              "pl"
            ],
            "type": "string",
            "description": "Language of Safety Gate texts. Allowed values: en, fr, de, es, it, nl, pt, pl (default en). RappelConso is always French.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}