# Disaster Relief Aggregator (`gabrielaxy/disaster-relief-aggregator`) Actor

Aggregates real-time disaster relief resources from FEMA, Red Cross, and state emergency agencies into a unified feed. Returns shelters, food banks, and medical facilities with coordinates, capacity, and status. Outputs JSON, GeoJSON, RSS, and interactive HTML maps.

- **URL**: https://apify.com/gabrielaxy/disaster-relief-aggregator.md
- **Developed by:** [Gabriel Antony Xaviour](https://apify.com/gabrielaxy) (community)
- **Categories:** AI, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Disaster Relief Resource Aggregator

Aggregates disaster relief resources (shelters, food distribution, medical services) from multiple official sources into a unified real-time feed. During emergencies, helps affected communities find help fast.

### Why This Matters

- During disasters, information is scattered across dozens of sites
- People in crisis don't have time to check 20 different websites
- First responders need unified situational awareness
- **This can literally save lives by connecting people to resources faster**

### Features

- **Multi-Source Aggregation**: FEMA, Red Cross, Feeding America, state emergency agencies
- **Data Normalization**: Standardizes addresses, services, hours across sources
- **Fuzzy Deduplication**: Merges duplicate listings from different sources
- **Geocoding**: Converts addresses to coordinates for mapping
- **Multiple Output Formats**: JSON, GeoJSON, RSS, Interactive HTML Map
- **Webhook Notifications**: Get notified when new resources are found

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `location` | string | Area to search (city, county, state) | (required) |
| `radiusMiles` | integer | Search radius in miles (5-100) | 25 |
| `disasterType` | string | Type of emergency | "general" |
| `resourceTypes` | array | Types to include: shelter, food, medical, supplies | \["shelter", "food", "medical"] |
| `outputFormats` | array | Output formats: json, geojson, rss, html | \["json"] |
| `webhookUrl` | string | URL to notify when complete | null |
| `proxyConfig` | object | Proxy configuration | {} |
| `maxConcurrency` | integer | Max parallel requests | 5 |
| `enabledSources` | array | Filter which sources to crawl | all |

#### Disaster Types

- `hurricane` - Hurricanes, tropical storms
- `earthquake` - Earthquakes
- `wildfire` - Wildfires
- `flood` - Floods, flash floods
- `tornado` - Tornadoes
- `winter-storm` - Winter storms, blizzards
- `general` - All disaster types

### Output

#### JSON Output (OUTPUT key)

```json
{
    "metadata": {
        "disasterType": "hurricane",
        "area": "Miami-Dade County, FL",
        "lastUpdated": "2024-12-18T14:30:00Z",
        "sourcesChecked": 5,
        "totalResources": 45
    },
    "resources": [
        {
            "id": "shelter-001",
            "type": "shelter",
            "name": "Miami Senior High School",
            "address": "2450 SW 1st St, Miami, FL 33135",
            "coordinates": { "lat": 25.7617, "lng": -80.2231 },
            "status": "open",
            "capacity": { "total": 500, "available": 234 },
            "services": ["shelter", "meals", "pet-friendly", "medical"],
            "hours": "24/7",
            "contact": { "phone": "(305) 555-1234" },
            "sources": ["red-cross", "miami-dade-emergency"]
        }
    ],
    "summary": {
        "byType": { "shelter": 12, "food": 18, "medical": 8 },
        "byStatus": { "open": 38, "closed": 5, "unknown": 2 },
        "openNow": 38
    }
}
```

#### GeoJSON Output (resources.geojson)

Standard GeoJSON FeatureCollection for use with mapping applications like Leaflet, Mapbox, or Google Maps.

#### RSS Feed (feed.rss)

Subscribe to updates. Each resource appears as an item with geo coordinates.

#### HTML Map (map.html)

Interactive map with filtering. Self-contained - just open in a browser.

### Data Sources

| Source | Coverage | Resource Types |
|--------|----------|----------------|
| FEMA | National | Shelters |
| American Red Cross | National | Shelters |
| Feeding America | National | Food Banks |
| State Emergency Agencies | State-specific | Shelters, Supplies |

### Example Usage

#### Basic Search

```json
{
    "location": "Miami-Dade County, FL",
    "disasterType": "hurricane",
    "outputFormats": ["json", "html"]
}
```

#### Multi-State Search

```json
{
    "location": "Gulf Coast",
    "radiusMiles": 100,
    "disasterType": "hurricane",
    "resourceTypes": ["shelter", "food", "medical", "supplies"],
    "outputFormats": ["json", "geojson", "html"]
}
```

#### With Webhook

```json
{
    "location": "Los Angeles, CA",
    "disasterType": "wildfire",
    "webhookUrl": "https://your-app.com/webhook/disaster-updates",
    "outputFormats": ["json"]
}
```

### Use Cases

1. **Emergency Response Apps**: Feed real-time resource data into mobile apps
2. **Situation Rooms**: Display on dashboards for emergency coordinators
3. **Community Websites**: Embed the HTML map on local news sites
4. **Alert Systems**: Use webhooks to trigger notifications
5. **Research**: Analyze disaster response patterns over time

### Scheduling

For real-time updates during active disasters, schedule the actor to run frequently:

- **Active disaster**: Every 15-30 minutes
- **Monitoring**: Every 2-4 hours
- **Post-disaster**: Daily

### Limitations

- Source websites may change structure, breaking extractors
- Some dynamic sites require Playwright (not yet implemented)
- Geocoding has rate limits (~1 request/second for free tier)
- Some sources may have delayed updates

### Support

If you encounter issues or want to add new data sources, please open an issue on the project repository.

# Actor input Schema

## `location` (type: `string`):

Area to search for disaster relief resources (city, county, or state)

## `radiusMiles` (type: `integer`):

Search radius in miles from the specified location

## `disasterType` (type: `string`):

Type of disaster to filter resources for

## `resourceTypes` (type: `array`):

Types of resources to search for

## `includeCapacity` (type: `boolean`):

Include capacity and availability information when available

## `outputFormats` (type: `array`):

Formats to output the aggregated data

## `webhookUrl` (type: `string`):

Optional webhook URL to send results to

## `proxyConfig` (type: `object`):

Proxy configuration for web requests

## `maxConcurrency` (type: `integer`):

Maximum number of concurrent requests

## `enabledSources` (type: `array`):

Optional list of specific source IDs to crawl. Leave empty to crawl all sources.

## `demoMode` (type: `boolean`):

Use realistic sample data instead of live sources (for demos/testing)

## Actor input object example

```json
{
  "location": "Houston, TX",
  "radiusMiles": 25,
  "disasterType": "general",
  "resourceTypes": [
    "shelter",
    "food",
    "medical"
  ],
  "includeCapacity": true,
  "outputFormats": [
    "json"
  ],
  "maxConcurrency": 5,
  "demoMode": false
}
```

# Actor output Schema

## `jsonOutput` (type: `string`):

Full aggregation results with metadata, resources, and summary in JSON format

## `geoJsonOutput` (type: `string`):

Resources as GeoJSON FeatureCollection for mapping applications

## `rssOutput` (type: `string`):

Resources as RSS 2.0 feed for news aggregators

## `htmlOutput` (type: `string`):

Visual HTML page with interactive Leaflet map showing all resources

## `dataset` (type: `string`):

Individual resources pushed to the default dataset for easy export

# 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 = {
    "location": "Houston, TX"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gabrielaxy/disaster-relief-aggregator").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 = { "location": "Houston, TX" }

# Run the Actor and wait for it to finish
run = client.actor("gabrielaxy/disaster-relief-aggregator").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 '{
  "location": "Houston, TX"
}' |
apify call gabrielaxy/disaster-relief-aggregator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gabrielaxy/disaster-relief-aggregator"
        }
    }
}
```

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/gHf12sQhVBLjZAoyx/builds/AxfquKgtg4VV7klWw/openapi.json
