{
  "openapi": "3.0.1",
  "info": {
    "title": "WHO Health Intelligence Scraper",
    "description": "Aggregates WHO health data from multiple APIs: Publications (18K+ documents with PDF text extraction), GHO Statistics, and ClinicalTrials.gov. Features NLP location detection and alert keyword matching.",
    "version": "0.0",
    "x-build-id": "s5FShKj0DWYqVGXhE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agrawalheyramb~who-health-intelligence-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agrawalheyramb-who-health-intelligence-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/agrawalheyramb~who-health-intelligence-scraper/runs": {
      "post": {
        "operationId": "runs-sync-agrawalheyramb-who-health-intelligence-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/agrawalheyramb~who-health-intelligence-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-agrawalheyramb-who-health-intelligence-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",
        "properties": {
          "includePublications": {
            "title": "Enable Publications Search?",
            "type": "boolean",
            "description": "Fetch reports, guidelines, and situation updates.",
            "default": true
          },
          "pubKeyword": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Topic to search for (e.g. 'cholera', 'malaria')."
          },
          "pubFromYear": {
            "title": "From Year",
            "type": "integer",
            "description": "Start year for publication date filter (e.g. 2023)."
          },
          "pubToYear": {
            "title": "To Year",
            "type": "integer",
            "description": "End year for publication date filter (e.g. 2025)."
          },
          "pubLimit": {
            "title": "Max Documents to Fetch",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit API results.",
            "default": 50
          },
          "extractPdfText": {
            "title": "Extract PDF Text (Deep Scan)",
            "type": "boolean",
            "description": "Download PDFs, extract text, and use NLP (Slower, but enables Location detection).",
            "default": false
          },
          "maxPdfExtract": {
            "title": "Max PDFs to Process",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety limit for PDF downloads.",
            "default": 10
          },
          "watchKeywords": {
            "title": "Alert Keywords",
            "type": "array",
            "description": "Flag documents containing these words (e.g. 'outbreak', 'emergency').",
            "items": {
              "type": "string"
            }
          },
          "includeGHO": {
            "title": "Enable GHO Data?",
            "type": "boolean",
            "description": "Fetch statistical data from the WHO Global Health Observatory.",
            "default": true
          },
          "indicators": {
            "title": "GHO Indicator Codes",
            "type": "array",
            "description": "API Codes (e.g. WHOSIS_000001).",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries (ISO Codes)",
            "type": "array",
            "description": "E.g. IND, USA. Leave empty for Global.",
            "items": {
              "type": "string"
            }
          },
          "years": {
            "title": "Specific Years",
            "type": "array",
            "description": "Specific years to fetch (e.g. 2022).",
            "items": {
              "type": "string"
            }
          },
          "startYear": {
            "title": "Start Year (Range)",
            "type": "integer",
            "description": "Fetch data from this year onwards (e.g. 2015)."
          },
          "endYear": {
            "title": "End Year (Range)",
            "type": "integer",
            "description": "Fetch data up to this year (e.g. 2024)."
          },
          "includeClinicalTrials": {
            "title": "Enable Trials Search?",
            "type": "boolean",
            "description": "Fetch data from ClinicalTrials.gov.",
            "default": true
          },
          "trialCondition": {
            "title": "Target Disease",
            "type": "string",
            "description": "Disease to search for (e.g. Cancer, Malaria).",
            "default": "Malaria"
          },
          "trialStatuses": {
            "title": "Recruitment Status",
            "type": "array",
            "description": "Filter (e.g. RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING).",
            "items": {
              "type": "string"
            }
          },
          "trialPhases": {
            "title": "Trial Phase",
            "type": "array",
            "description": "Filter (e.g. PHASE1, PHASE2, PHASE3, PHASE4).",
            "items": {
              "type": "string"
            }
          },
          "trialLimit": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of trials to fetch.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Required to avoid being blocked."
          },
          "webhookUrl": {
            "title": "Notification Webhook",
            "type": "string",
            "description": "Slack/Discord URL for alerts."
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "json",
              "csv"
            ],
            "type": "string",
            "description": "Choose output file format.",
            "default": "json"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}