{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Product Recall Checker – Safety Gate Alerts & Catalog Match",
    "description": "EU Safety Gate (RAPEX) product safety alerts as structured data – brand, model, barcodes, risk, measures – and a catalogue check of your GTINs or brand + model against all alerts since 2005. Built for GPSR recall processes of retailers and marketplaces.",
    "version": "0.1",
    "x-build-id": "4efQvO7RhVBXFWhKT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adamplaenitz~safety-gate-recall-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adamplaenitz-safety-gate-recall-checker",
        "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/adamplaenitz~safety-gate-recall-checker/runs": {
      "post": {
        "operationId": "runs-sync-adamplaenitz-safety-gate-recall-checker",
        "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/adamplaenitz~safety-gate-recall-checker/run-sync": {
      "post": {
        "operationId": "run-sync-adamplaenitz-safety-gate-recall-checker",
        "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": [
              "feed",
              "catalogCheck"
            ],
            "type": "string",
            "description": "Feed: alerts of the latest weekly reports. Catalogue check: match your products (GTIN, brand + model) against all alerts since 2005.",
            "default": "feed"
          },
          "lastWeeks": {
            "title": "Feed: number of weekly reports",
            "minimum": 1,
            "maximum": 260,
            "type": "integer",
            "description": "1 = latest report (published every Friday). Up to 260 weeks.",
            "default": 1
          },
          "newSinceLastRun": {
            "title": "Feed: only alerts not delivered before",
            "type": "boolean",
            "description": "Remembers delivered alerts per filter set – ideal for a weekly schedule (e.g. Friday afternoon).",
            "default": false
          },
          "categories": {
            "title": "Feed: product categories",
            "type": "array",
            "description": "Part of the category name, e.g. Toys, Cosmetics, Electrical appliances, Childcare.",
            "items": {
              "type": "string"
            }
          },
          "notifyingCountries": {
            "title": "Feed: notifying countries",
            "type": "array",
            "description": "English country names, e.g. Germany, France, Austria.",
            "items": {
              "type": "string"
            }
          },
          "riskTypes": {
            "title": "Feed: risk types",
            "type": "array",
            "description": "e.g. Chemical, Injuries, Electric shock, Fire, Choking, Strangulation.",
            "items": {
              "type": "string"
            }
          },
          "riskLevels": {
            "title": "Feed: risk levels",
            "type": "array",
            "description": "Leave empty for all levels.",
            "items": {
              "type": "string",
              "enum": [
                "Serious risk",
                "High risk",
                "Medium risk",
                "Low risk",
                "Other risk levels"
              ]
            }
          },
          "keywords": {
            "title": "Feed: keywords",
            "type": "array",
            "description": "Alert must contain at least one keyword (product, brand, name, model, description, danger).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Feed: exclude keywords",
            "type": "array",
            "description": "Alerts containing any of these words are skipped.",
            "items": {
              "type": "string"
            }
          },
          "onlyWithBarcode": {
            "title": "Feed: only alerts with barcode (GTIN/EAN)",
            "type": "boolean",
            "description": "Skip alerts without a barcode.",
            "default": false
          },
          "maxItems": {
            "title": "Feed: maximum alerts",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit of alerts per run.",
            "default": 10000
          },
          "products": {
            "title": "Catalogue: your products",
            "type": "array",
            "description": "One product per line: GTIN | Brand | Model | Your SKU (parts optional, e.g. \"4006381333931\" or \"| Acme | X100\" or \"4006381333931 | Acme | X100 | A-1001\").",
            "items": {
              "type": "string"
            }
          },
          "onlyMatches": {
            "title": "Catalogue: store only products with matches",
            "type": "boolean",
            "description": "Every checked product is still counted; only the result rows are reduced.",
            "default": false
          },
          "matchBrandOnly": {
            "title": "Catalogue: also report brand-only matches (low confidence)",
            "type": "boolean",
            "description": "For products without model: report all alerts of the same brand.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}