{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada Medical Device & Drug Decisions (Health Canada)",
    "description": "Health Canada Regulatory Decision Summaries: new and amended medical device licence decisions (updated weekly) plus the drug decision, Summary Basis of Decision and Summary Safety Review archive, as clean text. Filter by keyword, company, decision and date.",
    "version": "0.1",
    "x-build-id": "irU1BiK8AzdnY0nta"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/loonieledger~canada-health-product-decisions/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-loonieledger-canada-health-product-decisions",
        "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/loonieledger~canada-health-product-decisions/runs": {
      "post": {
        "operationId": "runs-sync-loonieledger-canada-health-product-decisions",
        "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/loonieledger~canada-health-product-decisions/run-sync": {
      "post": {
        "operationId": "run-sync-loonieledger-canada-health-product-decisions",
        "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": {
          "reportTypes": {
            "title": "Report types",
            "type": "array",
            "description": "RDS = Regulatory Decision Summaries (current, updated regularly). SBD and SSR = Summary Basis of Decision and Summary Safety Reviews (the API archive currently ends in 2023).",
            "items": {
              "type": "string",
              "enum": [
                "RDS",
                "SBD",
                "SSR"
              ],
              "enumTitles": [
                "Regulatory Decision Summaries (drugs & medical devices)",
                "Summary Basis of Decision",
                "Summary Safety Reviews"
              ]
            },
            "default": [
              "RDS",
              "SBD",
              "SSR"
            ]
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language of the report text.",
            "default": "en"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep reports whose title, product, ingredient, manufacturer, therapeutic area, safety issue, purpose or summary contains ANY of these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "manufacturers": {
            "title": "Manufacturers",
            "type": "array",
            "description": "Manufacturer name contains any of these (e.g. Medtronic, Pfizer).",
            "items": {
              "type": "string"
            }
          },
          "decisions": {
            "title": "Decisions",
            "type": "array",
            "description": "Decision contains any of these, e.g. Approved, Authorized, Rejected, Cancelled, Withdrawn. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "productKind": {
            "title": "Drugs or medical devices",
            "enum": [
              "all",
              "drugs",
              "devices"
            ],
            "type": "string",
            "description": "About 85% of Regulatory Decision Summaries are for medical devices.",
            "default": "all"
          },
          "decidedWithinDays": {
            "title": "Decided within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only reports whose decision / authorization / review date is within this many days. 0 = no limit. Ignored if 'Decided on or after' is set.",
            "default": 0
          },
          "decidedSince": {
            "title": "Decided on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only reports dated on or after this date."
          },
          "includeFullText": {
            "title": "Include full text sections (SBD and SSR)",
            "type": "boolean",
            "description": "Adds a 'fullText' object with the long scientific sections (quality, non-clinical, clinical, benefit/risk …) as plain text.",
            "default": false
          },
          "maxTextChars": {
            "title": "Max characters per text field",
            "minimum": 200,
            "type": "integer",
            "description": "Long text fields are cut at this length (on a word boundary, ending with …).",
            "default": 4000
          },
          "onlyNew": {
            "title": "Only new or updated reports (monitoring mode)",
            "type": "boolean",
            "description": "Remembers returned reports in the named key-value store 'canada-hp-decisions-state'; next runs return only new reports or reports whose modified date changed.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many reports (newest first). Controls cost.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}