# County Power Outage Risk Report (`outage_almanac/county-outage-risk-report`) Actor

Turn a list of US counties into scored outage risk reports built from federal outage records: long outages, worst events, seasonality, and how each county compares with its state.

- **URL**: https://apify.com/outage_almanac/county-outage-risk-report.md
- **Developed by:** [Outage Almanac](https://apify.com/outage_almanac) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $500.00 / 1,000 county reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## County Power Outage Risk Report

Give this Actor a list of US counties. It returns one scored report per county, so you can compare outage risk across sites without building your own pipeline. Built by Outage Almanac.

Use it for site planning, business continuity reviews, and resilience research.

### What you get

- How the county compares with its state and the US, including ranks and a risk tier
- A data confidence rating, so you know how far to trust the comparison
- Major outages per year and the longest major outage
- The largest number of customers out in a sustained outage
- The worst months of the year
- The five largest outages on record, with dates
- Year-by-year history through 2023

A major outage lasted at least 8 hours and reached customers equal to at least 1% of county residents.

### Input

```json
{
  "locations": ["Sandusky County, Ohio", "39055"],
  "includeWorstOutages": true
}
```

Leave `locations` empty and set `state` to report on every covered county in that state.

### Pricing

You pay once per county report. Lines that do not match a county are free. If a run reaches your spending limit, it stops and keeps the reports already finished.

### Limits

- Coverage is 2,966 counties and county equivalents in 49 states and Washington, DC. Connecticut is not included yet.
- History starts between 2015 and 2023, depending on when local utilities began reporting, and ends in 2023. It is not live.
- Places rated Low confidence are not ranked. They have short history, very small populations, or customer counts that look too high for the population.
- Records cover outages affecting at least 200 customers in a county. They do not show what happened at a specific address.
- Durations cover the time at least 200 customers were out, not how long one customer was out.
- Utilities that do not report, including some municipal systems and co-ops, can make a county look better than it is.

### Data source

Derived from She, B., Adetola, V., & Yun, J. (2024), [Event-correlated Outage Dataset in America](https://data.openei.org/submissions/6458), Open Energy Data Initiative, Pacific Northwest National Laboratory, licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Records were filtered and summarized. Funding for the source dataset came from the Laboratory Directed Research and Development program at PNNL, as part of the Resilience Through Data-Driven, Intelligently Designed Control Initiative. Population comes from U.S. Census Bureau Vintage 2024 county estimates. This Actor is not endorsed by the data's authors or the U.S. Government.

# Actor input Schema

## `locations` (type: `array`):

County names or 5-digit FIPS codes, such as "Sandusky County, Ohio" or "39143". Leave empty to report on every county in the chosen state.

## `state` (type: `string`):

Full state name. Used for bare county names and for whole-state runs.

## `includeWorstOutages` (type: `boolean`):

Add the five largest outages on record for each county.

## Actor input object example

```json
{
  "locations": [
    "Sandusky County, Ohio",
    "Orleans Parish, LA"
  ],
  "state": "Ohio",
  "includeWorstOutages": true
}
```

# Actor output Schema

## `results` (type: `string`):

All county reports from this run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locations": [
        "Sandusky County, Ohio",
        "Orleans Parish, LA"
    ],
    "state": "Ohio"
};

// Run the Actor and wait for it to finish
const run = await client.actor("outage_almanac/county-outage-risk-report").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "locations": [
        "Sandusky County, Ohio",
        "Orleans Parish, LA",
    ],
    "state": "Ohio",
}

# Run the Actor and wait for it to finish
run = client.actor("outage_almanac/county-outage-risk-report").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locations": [
    "Sandusky County, Ohio",
    "Orleans Parish, LA"
  ],
  "state": "Ohio"
}' |
apify call outage_almanac/county-outage-risk-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,outage_almanac/county-outage-risk-report"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/WIgBhslbzYtmHXHO6/builds/0tQoDQDTrL7eo3Ye8/openapi.json
