{
  "openapi": "3.0.1",
  "info": {
    "title": "EU GMP Non-Compliance & Certificate Monitor (EudraGMDP)",
    "description": "Monitor the public EudraGMDP database for GMP non-compliance statements and GMP certificates, with filters, delta mode (only new records) and optional webhook alerts. Built for pharma QA teams and consultants.",
    "version": "0.0",
    "x-build-id": "lDOTv1co0yxavdyWT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goobertje~eu-gmp-compliance-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goobertje-eu-gmp-compliance-monitor",
        "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/goobertje~eu-gmp-compliance-monitor/runs": {
      "post": {
        "operationId": "runs-sync-goobertje-eu-gmp-compliance-monitor",
        "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/goobertje~eu-gmp-compliance-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-goobertje-eu-gmp-compliance-monitor",
        "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": [
              "gmpNonCompliance",
              "gmpCertificates"
            ],
            "type": "string",
            "description": "gmpNonCompliance: statements of GMP non-compliance (an early-warning signal for supply problems). gmpCertificates: GMP certificates, searched per country (default: all EEA countries). Example: \"gmpNonCompliance\".",
            "default": "gmpNonCompliance"
          },
          "since": {
            "title": "Since (date)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only records from this date on, as YYYY-MM-DD. For gmpNonCompliance this is the issue date of the statement; for gmpCertificates it is the inspection end date (EudraGMDP cannot filter certificates by issue date). Leave empty for the last 90 days. Example: \"2026-01-01\"."
          },
          "until": {
            "title": "Until (date)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only records up to and including this date, as YYYY-MM-DD (same date meaning as Since). Leave empty for no upper bound. Example: \"2026-06-30\"."
          },
          "companyName": {
            "title": "Company / site name contains",
            "type": "string",
            "description": "Case-insensitive text that must appear in the site name or its alternative name (the manufacturer, importer or site, not the marketing authorisation holder). Example: \"Teva\"."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Country of the site, as ISO-2 codes or English names. For gmpNonCompliance this filters the results (empty = all countries). For gmpCertificates every country is one search (empty = all EEA countries); the special values eea, third (all third countries) and all are accepted there, but third and all make EudraGMDP think for 1 to 3 minutes. Example: [\"IN\", \"China\", \"DE\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "activeSubstance": {
            "title": "Active substance / product keyword",
            "type": "string",
            "description": "Case-insensitive keyword that must appear in the site name or in the statement text (scope, listed operations, nature of non-compliance, action taken, comments). EudraGMDP has no structured active-substance field, so only records whose text names the substance match. Needs one detail-page request per candidate record (see Max detail requests). Example: \"paracetamol\"."
          },
          "includeDetails": {
            "title": "Include details",
            "type": "boolean",
            "description": "Open the detail page of each record to add issuing authority, legal basis, scope, listed operations, DUNS number and, for non-compliance statements, the nature of non-compliance, action taken and comments. Costs one extra request (about 1 second) per record. Example: true.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new records (delta mode)",
            "type": "boolean",
            "description": "Skip records already reported by a previous run that used the same State store name. Use it for scheduled alerting. Records are remembered only after they were pushed with the details you asked for. Example: true.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
            "minLength": 3,
            "maxLength": 63,
            "type": "string",
            "description": "Name of the persistent key-value store holding the records already reported (used by Only new records). Use different names for different watchlists. Only lowercase letters, digits and hyphens (not at the start or end). Example: \"eu-gmp-monitor-state\".",
            "default": "eu-gmp-monitor-state"
          },
          "webhookUrl": {
            "title": "Summary webhook URL",
            "type": "string",
            "description": "Optional https URL that receives a short summary of the records pushed in this run. Works with Discord, Slack or any generic JSON webhook. Treated as a secret because it contains a token. Example: \"https://hooks.slack.com/services/T000/B000/XXXX\"."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of records (dataset items, each one billed) a run outputs; the run stops once reached. Default 50 (the Start-button prefill is 5). With Only new records, the first run is limited by this cap too, so catching up on a large backlog takes several runs. Example: 50.",
            "default": 50
          },
          "maxDetailRequests": {
            "title": "Max detail requests",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound on detail-page requests per run (it also bounds the work of the active substance filter). Records beyond the bound are still output without details, unless an active substance filter needs them, in which case the run ends. Example: 300.",
            "default": 300
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "number",
            "description": "Pause between requests to EudraGMDP to stay polite. Minimum 1, maximum 30. Example: 1.0.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}