{
  "openapi": "3.0.1",
  "info": {
    "title": "US Health Data: CDC & HealthData.gov API, No login",
    "description": "Search CDC (data.cdc.gov) and HealthData.gov open datasets and export their rows as clean JSON, CSV or Excel. SoQL where/select filters, typed numbers, dataset name and last update on every row. No login or API key.",
    "version": "0.1",
    "x-build-id": "KXcrIEoFK4Ewfz9Bc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~us-health-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-us-health-data-api",
        "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/cliqtomedia~us-health-data-api/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-us-health-data-api",
        "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/cliqtomedia~us-health-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-us-health-data-api",
        "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": {
          "searchQuery": {
            "title": "Search query",
            "maxLength": 300,
            "type": "string",
            "description": "Keywords to find datasets on data.cdc.gov and HealthData.gov, e.g. covid vaccinations, measles or hospital capacity. In Data rows mode, without dataset IDs, the rows of the best match(es) are exported; check datasetName on the rows. Ignored when dataset IDs are given. Up to 300 characters."
          },
          "datasetIds": {
            "title": "Dataset IDs or URLs",
            "maxItems": 20,
            "type": "array",
            "description": "Up to 20 dataset IDs (the 4x4 code, e.g. 3rge-nu2a) or dataset URLs from data.cdc.gov or healthdata.gov. A bare ID is looked up on data.cdc.gov first, then on healthdata.gov. Unknown IDs get a free not_found row. Leave empty to use the search query.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "datasets"
            ],
            "type": "string",
            "description": "Data rows (default): export the rows of the datasets. Dataset search: list matching datasets with name, last update, category, columns and API endpoint, without rows.",
            "default": "rows"
          },
          "maxRows": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum paid results in the run, 1–50,000: data rows in Data rows mode (shared across datasets), dataset records in Dataset search mode (the catalog serves at most 10,000 matches). Default 100.",
            "default": 100
          },
          "where": {
            "title": "Filter rows (SoQL where)",
            "type": "string",
            "description": "Optional SoQL filter on the source columns, e.g. year = '2023' or state = 'CA' AND deaths > 10. Column names are the API field names (see the dataset's columns in Dataset search mode). A rejected filter returns INVALID_INPUT with the source's message."
          },
          "select": {
            "title": "Columns (SoQL select)",
            "type": "string",
            "description": "Optional comma-separated list of columns or SoQL expressions to return, e.g. state, year, deaths. Default: all columns. Whole-result aggregates such as count(*), sum(deaths) work too (no GROUP BY, so do not mix them with plain columns); then the source's row order is not applied."
          },
          "order": {
            "title": "Sort rows (SoQL order)",
            "type": "string",
            "description": "Optional SoQL order, e.g. week_end_date DESC. Default: the source's stable row order, so paging never skips or repeats rows."
          },
          "maxDatasets": {
            "title": "Datasets to export from a search",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Data rows mode with a search query only: how many of the best-matching datasets to export rows from, 1–20. Max results is split between them. Default 1.",
            "default": 1
          },
          "domains": {
            "title": "Portals",
            "type": "array",
            "description": "Portals to search: data.cdc.gov, healthdata.gov or both (default).",
            "items": {
              "type": "string",
              "enum": [
                "data.cdc.gov",
                "healthdata.gov"
              ],
              "enumTitles": [
                "CDC (data.cdc.gov)",
                "HealthData.gov (HHS)"
              ]
            },
            "default": [
              "data.cdc.gov",
              "healthdata.gov"
            ]
          },
          "sortDatasetsBy": {
            "title": "Rank datasets by",
            "enum": [
              "relevance",
              "updated"
            ],
            "type": "string",
            "description": "Order of search matches: relevance (default) or most recently updated.",
            "default": "relevance"
          },
          "typedValues": {
            "title": "Typed numbers and booleans",
            "type": "boolean",
            "description": "Convert number columns to JSON numbers and checkbox columns to true/false, when lossless. Off: keep every value as the source's text. Missing values are always null, never 0.",
            "default": true
          },
          "appToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional free Socrata app token for higher rate limits on very large exports. Not needed for normal use. Stored encrypted; never written to the output or logs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}