{
  "openapi": "3.0.1",
  "info": {
    "title": "EMA Medicines Database Scraper",
    "description": "Scrape the EMA's public data: 2700+ human/veterinary medicines, orphan designations, herbal monographs, referrals, shortages, PIPs, veterinary MRLs, DHPCs, opinions outside EU, PSUSA reviews, post-authorisation procedures.",
    "version": "1.0",
    "x-build-id": "DAONrBtkcPJai0aRo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~ema-medicines-database-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-ema-medicines-database-scraper",
        "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/crawlerbros~ema-medicines-database-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-ema-medicines-database-scraper",
        "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/crawlerbros~ema-medicines-database-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-ema-medicines-database-scraper",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Dataset",
            "enum": [
              "medicines",
              "orphanDesignations",
              "herbalMedicines",
              "referrals",
              "shortages",
              "paediatricInvestigationPlans",
              "maximumResidueLimits",
              "dhpc",
              "opinionsOutsideEu",
              "periodicSafetyUpdateReports",
              "postAuthorisationProcedures"
            ],
            "type": "string",
            "description": "Which EMA public dataset to search.",
            "default": "medicines"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text, case-insensitive substring search. Matched against the name / active substance / INN fields relevant to the selected dataset. Leave empty to fetch all records (subject to Max items).",
            "default": "insulin"
          },
          "category": {
            "title": "Category (human / veterinary)",
            "enum": [
              "all",
              "Human",
              "Veterinary"
            ],
            "type": "string",
            "description": "Filter to human-use or veterinary-use records. Applies to Medicines Database, Referral Procedures, Medicine Shortages, DHPCs and Post-Authorisation Procedures only; ignored for other datasets.",
            "default": "all"
          },
          "therapeuticArea": {
            "title": "Therapeutic area contains",
            "type": "string",
            "description": "Case-insensitive substring match against the therapeutic-area tags (MeSH terms). Applies to Medicines Database, Herbal Medicines, Medicine Shortages and Paediatric Investigation Plans."
          },
          "medicineStatus": {
            "title": "Medicine status (mode=medicines)",
            "enum": [
              "all",
              "Authorised",
              "Refused",
              "Withdrawn",
              "Suspended",
              "Expired",
              "Lapsed",
              "Revoked",
              "Application withdrawn",
              "Opinion",
              "Opinion under re-examination",
              "Withdrawn from rolling review"
            ],
            "type": "string",
            "description": "Filter Medicines Database records by regulatory status.",
            "default": "all"
          },
          "orphanMedicineOnly": {
            "title": "Orphan medicines only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit medicines designated as orphan medicinal products.",
            "default": false
          },
          "biosimilarOnly": {
            "title": "Biosimilars only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit biosimilar medicines.",
            "default": false
          },
          "genericOnly": {
            "title": "Generics only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit generic medicines.",
            "default": false
          },
          "conditionalApprovalOnly": {
            "title": "Conditional approval only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit medicines authorised under a conditional marketing authorisation.",
            "default": false
          },
          "acceleratedAssessmentOnly": {
            "title": "Accelerated assessment only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit medicines that received accelerated assessment.",
            "default": false
          },
          "additionalMonitoringOnly": {
            "title": "Additional monitoring only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit medicines subject to additional monitoring (black triangle).",
            "default": false
          },
          "advancedTherapyOnly": {
            "title": "Advanced therapy medicinal products only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit ATMPs (gene therapy, cell therapy, tissue-engineered products).",
            "default": false
          },
          "exceptionalCircumstancesOnly": {
            "title": "Exceptional circumstances only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit medicines authorised under exceptional circumstances.",
            "default": false
          },
          "primePriorityMedicineOnly": {
            "title": "PRIME priority medicines only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit medicines in the PRIME (PRIority MEdicines) scheme.",
            "default": false
          },
          "patientSafetyOnly": {
            "title": "Patient safety flagged only (mode=medicines)",
            "type": "boolean",
            "description": "Only emit medicines flagged for patient-safety communication.",
            "default": false
          },
          "orphanDesignationStatus": {
            "title": "Designation status (mode=orphanDesignations)",
            "enum": [
              "all",
              "Positive",
              "Negative",
              "Withdrawn",
              "Expired"
            ],
            "type": "string",
            "description": "Filter orphan designations by outcome status.",
            "default": "all"
          },
          "herbalAssessmentStatus": {
            "title": "Assessment status (mode=herbalMedicines)",
            "enum": [
              "all",
              "F: Assessment finalised",
              "C: ongoing call for scientific data",
              "D: Draft under discussion",
              "P: Draft published",
              "R: Rapporteur assigned"
            ],
            "type": "string",
            "description": "Filter herbal medicines by the EU monograph assessment stage.",
            "default": "all"
          },
          "referralStatus": {
            "title": "Current status (mode=referrals)",
            "enum": [
              "all",
              "Under evaluation",
              "Procedure started",
              "CHMP opinion",
              "CVMP opinion",
              "CMDh final position",
              "European Commission final decision"
            ],
            "type": "string",
            "description": "Filter referral procedures by current status.",
            "default": "all"
          },
          "safetyReferralOnly": {
            "title": "Safety referrals only (mode=referrals)",
            "type": "boolean",
            "description": "Only emit referrals triggered by a safety concern.",
            "default": false
          },
          "shortageStatus": {
            "title": "Shortage status (mode=shortages)",
            "enum": [
              "all",
              "Shortage ongoing",
              "Shortage resolved",
              "Medicine discontinued"
            ],
            "type": "string",
            "description": "Filter medicine shortages by current status.",
            "default": "all"
          },
          "availabilityOfAlternatives": {
            "title": "Availability of alternatives (mode=shortages)",
            "enum": [
              "all",
              "Yes",
              "No",
              "Yes, in some Member States",
              "Unknown",
              "Depending on indication",
              "Not stated"
            ],
            "type": "string",
            "description": "Filter medicine shortages by whether alternative medicines are available.",
            "default": "all"
          },
          "decisionType": {
            "title": "Decision type (mode=paediatricInvestigationPlans)",
            "enum": [
              "all",
              "P: decision agreeing on a investigation plan, with or without partial waiver(s) and or deferral(s)",
              "PM: decision on the application for modification of an agreed PIP",
              "W: decision granting a waiver in all age groups for all conditions or indications",
              "RP: decision refers to a refusal on a proposed Paediatric Investigation Plan",
              "RPM: decision refers to a refusal on the application for modification of an agreed PIP",
              "RW: decision refers to a refusal on a request for waiver in all age groups for the listed condition(s)"
            ],
            "type": "string",
            "description": "Filter PIPs by the type of PDCO decision.",
            "default": "all"
          },
          "mrlClassification": {
            "title": "MRL therapeutic classification contains (mode=maximumResidueLimits)",
            "type": "string",
            "description": "Case-insensitive substring match against the MRL therapeutic classification (e.g. `antibiotic`, `antiparasitic`)."
          },
          "dhpcType": {
            "title": "DHPC type contains (mode=dhpc)",
            "type": "string",
            "description": "Case-insensitive substring match against the DHPC type tag(s) (e.g. `Quality defect`, `Referral`, `Medication error`)."
          },
          "regulatoryOutcome": {
            "title": "Regulatory outcome (mode=dhpc or periodicSafetyUpdateReports)",
            "enum": [
              "all",
              "Maintenance",
              "Variation",
              "Suspension",
              "Revocation",
              "Withdrawal"
            ],
            "type": "string",
            "description": "Filter DHPCs / Periodic Safety Update Report single assessments (PSUSA) by the regulatory outcome of the procedure.",
            "default": "all"
          },
          "opinionStatus": {
            "title": "Opinion status (mode=opinionsOutsideEu)",
            "enum": [
              "all",
              "Positive opinion",
              "Withdrawn opinion",
              "Withdrawn application"
            ],
            "type": "string",
            "description": "Filter EMA scientific opinions for medicines used outside the EU by their outcome status.",
            "default": "all"
          },
          "postAuthorisationProcedureStatus": {
            "title": "Procedure status (mode=postAuthorisationProcedures)",
            "enum": [
              "all",
              "Opinion",
              "Application withdrawn"
            ],
            "type": "string",
            "description": "Filter post-authorisation procedures by their current procedure status.",
            "default": "all"
          },
          "postAuthorisationOpinionStatus": {
            "title": "Opinion status (mode=postAuthorisationProcedures)",
            "enum": [
              "all",
              "Positive",
              "Negative"
            ],
            "type": "string",
            "description": "Filter post-authorisation procedures by the CHMP/CVMP opinion outcome.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on the number of records emitted.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}