# Obituary Scraper for Legacy.com — Names, Dates & Funeral Homes (`haketa/legacy-obituary-scraper`) Actor

Search and scrape obituaries from Legacy.com by name: full name, birth & death dates, age, funeral home, location, bio, photo and obituary URL. For genealogy, records research and memorial data. Independent tool, not affiliated with Legacy.com.

- **URL**: https://apify.com/haketa/legacy-obituary-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Obituary Scraper for Legacy.com — Names, Dates & Funeral Homes

> **Search and extract obituaries from Legacy.com at scale: full name, birth & death dates, age, funeral home, location, bio, photo and the source obituary URL.** Search by name or keyword, or paste Legacy.com search URLs, and get clean JSON/CSV/Excel in seconds. Built for genealogy, records research, memorial and journalism use.

[![Obituaries](https://img.shields.io/badge/Legacy.com-Obituaries-5b2d8e)]()
[![Names & Dates](https://img.shields.io/badge/Names%20%2B%20Birth%2FDeath%20Dates-blue)]()
[![Funeral Homes](https://img.shields.io/badge/Funeral%20Home%20%2B%20Location-2da44e)]()
[![Export](https://img.shields.io/badge/Export-JSON%20%2F%20CSV%20%2F%20Excel-fb8500)]()

***

### What This Actor Does

**Legacy.com** is the largest obituary network, aggregating notices from thousands of newspapers and funeral homes. This Actor turns a name search into a structured dataset. For each obituary it returns:

- **Person** — full name, first/last name, age, **birth date** and **death date**
- **Obituary** — bio/summary, portrait photo, date posted, source obituary URL
- **Source** — funeral home / publisher and Legacy affiliate
- **Location** — primary location and all associated places

Search by first/last name or keyword — the Actor paginates (50 per page) and returns one clean row per person.

***

### Why Use This

- **Structured obituary data.** Names, exact birth/death dates, ages, funeral homes and locations as clean fields — ready for genealogy trees, records databases and analysis.
- **Nationwide coverage.** Legacy.com aggregates thousands of newspapers and funeral homes, so a single name search spans the whole country.
- **Funeral home & source links.** Each record links to the original obituary and names the funeral home — useful for verification and outreach.
- **Fast and clean.** Reads Legacy's own structured page data (not brittle HTML), paginating automatically.

***

### Quick Start

#### Run it in the console (no code)

1. Enter a **Last name** (and optionally a **First name** or **Keyword**).
2. Set **Max obituaries**, then click **Start**.
3. Export as **JSON, CSV, Excel or HTML**, or push to Google Sheets, a webhook or a database.

> The proxy is preconfigured (US residential) since Legacy.com requires it — just enter a name and run.

#### Run it via API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "lastName": "Smith",
    "maxItems": 200,
}

run = client.actor("YOUR_USERNAME/legacy-obituary-scraper").call(run_input=run_input)

for o in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(o["fullName"], "·", o["birthDate"], "–", o["deathDate"], "·", o["funeralHome"])
```

#### Build a genealogy dataset (Python)

```python
run = client.actor("YOUR_USERNAME/legacy-obituary-scraper").call(run_input={
    "lastName": "OConnell",
    "maxItems": 500,
})
rows = [o for o in client.dataset(run["defaultDatasetId"]).iterate_items()
        if o.get("birthDate") and o.get("deathDate")]
print(len(rows), "records with full dates")
```

#### Use a Legacy.com search URL (Node.js)

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('YOUR_USERNAME/legacy-obituary-scraper').call({
    startUrls: ['https://www.legacy.com/obituaries/search?lastName=Smith&keyword=Chicago'],
    maxItems: 300,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'obituaries');
```

***

### Input Parameters

| Field | Type | Description |
|---|---|---|
| `firstName` | string | First name to search (optional). |
| `lastName` | string | Last name / surname to search. |
| `keyword` | string | Free-text keyword (city, funeral home, term). |
| `startUrls` | array | Legacy.com search/browse URLs (use instead of name fields for full control). |
| `maxItems` | integer | Max obituaries across all searches. `0` = no limit. |
| `maxPages` | integer | Max result pages per search (50 per page). Default `40`. |
| `proxyConfiguration` | object | Preconfigured to US residential (required by Legacy.com). |

Provide a **name/keyword** or **startUrls** (or both).

***

### Output

Each obituary is one record:

```json
{
  "obituaryId": "61758939",
  "fullName": "Jeffery Smith",
  "firstName": "Jeffery",
  "lastName": "Smith",
  "age": 69,
  "birthDate": "1957-06-12",
  "deathDate": "2026-06-27",
  "bio": "Smith passed away on Saturday, June 27, 2026...",
  "photo": "https://...",
  "funeralHome": "Crossville Memorial Funeral Home & Crematory, Inc.",
  "obituaryUrl": "https://crossvillememorial.com/obituaries/jeffery-smith-2026",
  "publisher": "legacyadn",
  "datePosted": "2026-06-29",
  "primaryLocation": "Crossville, United States",
  "locations": ["Crossville, United States", "St. Louis, United States"],
  "legacyUrl": "https://www.legacy.com/us/obituaries/name/jeffery-smith-obituary?id=61758939"
}
```

***

### Use Cases

#### 1. Genealogy & family history

Collect names, exact birth/death dates, ages and locations to build family trees and fill gaps in genealogical records.

#### 2. Records & vital-data research

Aggregate obituaries by surname or region for demographic, historical or academic research.

#### 3. Journalism & memorials

Find and compile obituaries for reporting, memorial pages, or notable-person tracking.

#### 4. Funeral-industry insight

See which funeral homes publish which notices and where — useful for market and coverage analysis.

#### 5. Data enrichment

Match and enrich existing person records with obituary dates, locations and source links.

***

### Tips

- **Broaden or narrow:** search by `lastName` alone for wide coverage, add `firstName` or `keyword` (e.g. a city) to focus.
- **`startUrls`** lets you paste any Legacy.com search — filters in the URL are respected.
- **`maxItems: 0`** paginates to the end of the result set (50 per page).
- **Schedule it** with Apify Schedules to capture new obituaries over time.

***

### Frequently Asked Questions

**Do I need a Legacy.com account?**
No. The Actor reads publicly visible obituary listings — no login required.

**Why is a proxy required?**
Legacy.com is protected by Cloudflare; a US residential proxy is preconfigured so it works out of the box.

**How current is the data?**
It reflects what Legacy.com shows for your search at run time — recent and historical notices, newest first.

**What export formats are supported?**
JSON, CSV, Excel, HTML, or via API — plus Google Sheets, webhooks, Make and Zapier.

***

### Legal & Responsible Use

This Actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by Legacy.com** or any newspaper or funeral home. All trademarks are the property of their respective owners.

It collects only publicly available obituary information. Obituary data concerns deceased persons and their families — please use it respectfully and lawfully:

- Comply with applicable data-protection laws and Legacy.com's Terms of Service.
- Do not use the data for spam, harassment of grieving families, or any unlawful purpose.
- Use reasonable request volumes and scheduling.

# Actor input Schema

## `firstName` (type: `string`):

First name to search for (optional).

## `lastName` (type: `string`):

Last name / surname to search for (e.g. Smith).

## `keyword` (type: `string`):

Free-text keyword (e.g. a city, funeral home, or term). Combined with name if both are set.

## `startUrls` (type: `array`):

Legacy.com search or local-browse URLs (e.g. https://www.legacy.com/obituaries/search?lastName=Smith). Use instead of the name fields for full control.

## `maxItems` (type: `integer`):

Maximum obituaries to return across all searches. 0 = no limit.

## `maxPages` (type: `integer`):

Maximum result pages to paginate per search (50 obituaries per page).

## `proxyConfiguration` (type: `object`):

Legacy.com requires a US residential proxy (Cloudflare challenges datacenter IPs) — residential is enabled by default.

## Actor input object example

```json
{
  "lastName": "Smith",
  "maxItems": 100,
  "maxPages": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `obituaryId` (type: `string`):

Legacy person/obituary ID

## `fullName` (type: `string`):

Full name

## `firstName` (type: `string`):

First name

## `lastName` (type: `string`):

Last name

## `age` (type: `string`):

Age at death

## `birthDate` (type: `string`):

Date of birth

## `deathDate` (type: `string`):

Date of death

## `bio` (type: `string`):

Obituary summary/bio

## `photo` (type: `string`):

Portrait photo URL

## `funeralHome` (type: `string`):

Funeral home / publisher

## `obituaryUrl` (type: `string`):

Source obituary URL

## `publisher` (type: `string`):

Legacy affiliate/site

## `datePosted` (type: `string`):

Obituary posted date

## `obituaryCount` (type: `string`):

Number of linked obituaries

## `primaryLocation` (type: `string`):

Primary location

## `locations` (type: `string`):

All associated locations

## `notable` (type: `string`):

Notable person flag

## `legacyUrl` (type: `string`):

Legacy.com profile URL

## `source` (type: `string`):

Search that produced this

## `scrapedAt` (type: `string`):

ISO timestamp

# 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 = {
    "lastName": "Smith",
    "maxItems": 100,
    "maxPages": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/legacy-obituary-scraper").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 = {
    "lastName": "Smith",
    "maxItems": 100,
    "maxPages": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/legacy-obituary-scraper").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 '{
  "lastName": "Smith",
  "maxItems": 100,
  "maxPages": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call haketa/legacy-obituary-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/legacy-obituary-scraper"
        }
    }
}
```

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/VAqKRbsyC319upXp8/builds/Ku9mdMDOJgAYQHm9H/openapi.json
