# SAMHSA Treatment Facility Locator Scraper — Rehab Centers (`compute-edge/samhsa-treatment-locator-scraper`) Actor

Extract SAMHSA treatment facilities nationwide — addiction and mental-health centers with phone, address, website, and intake details. Filter by service type, state, and facility name. High-quality B2B leads for healthcare providers, insurance, and recovery services.

- **URL**: https://apify.com/compute-edge/samhsa-treatment-locator-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SAMHSA Treatment Facility Locator Scraper

Extract structured treatment facility data from the **SAMHSA National Treatment Directory** — the official U.S. Substance Abuse and Mental Health Services Administration directory of **addiction treatment centers, rehab facilities, and mental-health service providers**. This Actor scrapes the findtreatment.gov locator and provides clean, filterable data on 12,000+ treatment facilities nationwide with phone numbers, addresses, websites, and intake details.

Treatment facilities are high-value B2B leads for insurance companies, EAP providers, recovery software platforms, pharmaceutical companies, and healthcare marketing firms. A single qualified facility lead can be worth $100-500 to the right buyer.

### Key Features

- **Complete national treatment facility directory** — 12,000+ substance-abuse and mental-health treatment facilities
- **Service type filtering** — Search for substance abuse (SA), mental health (MH), or both (BOTH)
- **Location-based search** — Enter any US ZIP code; results ordered by distance
- **Facility name filtering** — Case-insensitive partial match (e.g., "Horizon", "Recovery Centers")
- **State filtering** — Narrow results to a single state (2-letter code, e.g., "CA", "NY")
- **Rich facility data** — Name, street address, city, state, ZIP, main phone, intake phone, hotline, website, latitude/longitude
- **No authentication required** — Public SAMHSA API, no keys or credentials needed
- **Batch-optimized output** — Clean JSON ready for CRM ingestion, lead generation pipelines, or RAG processing

### Output Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Facility name (combines name1 and name2 if present) |
| `street` | string | Street address (street1 + street2) |
| `city` | string | City |
| `state` | string | State (2-letter code, e.g., "CA") |
| `zip` | string | ZIP code |
| `phone` | string | Main facility phone number |
| `website` | string | Facility website URL |
| `intakePhone` | string | Intake/admission phone number (often different from main) |
| `hotline` | string | Crisis/hotline phone number (if available) |
| `latitude` | string | Latitude coordinate for mapping |
| `longitude` | string | Longitude coordinate for mapping |
| `serviceType` | string | Service type searched (SA, MH, or BOTH) — echoed from input |

### How to Scrape SAMHSA Treatment Facilities

#### Step-by-Step Tutorial

1. **Open the Actor** — Navigate to the SAMHSA Treatment Locator Scraper on Apify Store and click **Start**.

2. **Select Service Type** — Choose what type of facilities to extract:
   - **SA** (Substance Abuse) — Addiction/substance-use treatment centers, detox facilities, opioid treatment programs
   - **MH** (Mental Health) — Mental-health clinics, psychiatric hospitals, counseling services
   - **BOTH** — Include both substance-abuse and mental-health facilities in results

3. **Enter a Search Location** — Provide any valid US ZIP code. Results are ordered by distance from this location.
   - Example: `10001` (Manhattan), `90210` (Los Angeles), `77002` (Houston)
   - Default is `10001` (New York) to return a large national result set

4. **(Optional) Filter by Facility Name** — Enter a partial facility name to narrow results (case-insensitive).
   - Example: "Horizon" will match "Horizon Health Services", "New Horizon Treatment Center", etc.
   - Leave blank to include all facility names

5. **(Optional) Filter by State** — Enter a 2-letter state code to limit results to one state.
   - Example: "CA" returns only California facilities, "TX" returns only Texas, etc.
   - Leave blank to include all states

6. **Set Max Results** — Control the output size:
   - Default is `1000` (enough for most use cases)
   - Set to `0` for unlimited (scrapes all available facilities, typically 12,000+)
   - Larger runs consume more compute and may take longer; Apify charges for actual run time

7. **Click Start** — The Actor begins paginating through the SAMHSA API and collecting facility records.

8. **Download Results** — Once the run completes, navigate to the **Dataset** tab and download as:
   - **JSON** — For programmatic processing (CRM, database import, RAG pipelines)
   - **CSV** — For Excel/spreadsheet analysis
   - **Excel** — Direct Excel export with formatted columns

### Input Example

```json
{
    "serviceType": "SA",
    "zip": "10001",
    "nameFilter": "Horizon",
    "stateFilter": "NY",
    "maxResults": 500
}
````

This configuration fetches up to 500 substance-abuse facilities in New York with "Horizon" in the name, ordered by distance from ZIP 10001.

### Output Example

```json
{
    "name": "MRB Counseling Services Inc",
    "street": "101 Chestnut Street, Suite 110",
    "city": "Gaithersburg",
    "state": "MD",
    "zip": "20877",
    "phone": "301-527-0854",
    "website": "https://www.mrbcounseling.com",
    "intakePhone": "",
    "hotline": "",
    "latitude": "39.1411626",
    "longitude": "-77.2034853",
    "serviceType": "SA"
}
```

### Pricing

This Actor fetches data from the free public SAMHSA API with pagination.

- **Cost per run**: Depends on result count and pagination depth
  - Small run (100 facilities, ~1-2 pages): ~$0.001 compute + Actor fee
  - Medium run (1,000 facilities, ~10 pages): ~$0.005 compute + Actor fee
  - Large run (12,000+ facilities, ~120 pages): ~$0.05 compute + Actor fee
- **Per-result pricing**: $0.003/result
- **Actor start event**: Default platform rate
- **Pagination overhead**: Small (300ms delay between pages to be respectful to SAMHSA servers)

Typical small-to-medium runs complete in 30-60 seconds.

### Use Cases

- **Lead generation for insurance/EAP companies** — Build prospect lists of treatment facilities for partnership outreach
- **Healthcare marketing** — Identify and contact facilities for pharmaceutical distribution or therapy software partnerships
- **Compliance/licensing tracking** — Monitor treatment facility landscape in specific states or regions
- **Geographic analysis** — Map treatment facility density and identify healthcare deserts
- **Integration with CRM systems** — Import facility data into Salesforce, HubSpot, Pipedrive for automated outreach
- **RESTful lead enrichment** — Feed facility names/addresses into enrichment APIs to append revenue, employee count, or additional contact details
- **RAG pipeline ingestion** — Feed facility data into LLM-based systems for automatic lead scoring or personalized outreach generation
- **Research and analytics** — Analyze treatment capacity, distribution of service types, and state-level treatment availability

### FAQ

#### Is it legal to scrape SAMHSA treatment facility data?

Yes. This Actor accesses publicly available data from findtreatment.gov, which is published by the U.S. Substance Abuse and Mental Health Services Administration as open public data. No authentication or terms-of-service bypass is required. The data is freely available for any lawful use.

#### Can I export the data as CSV or Excel?

Yes. After the run completes, the **Dataset** tab on Apify provides export options for JSON, CSV, Excel, XML, and other formats.

#### How fresh is the treatment facility data?

SAMHSA updates the treatment locator regularly, though the update frequency varies. For the most current data, you can schedule this Actor to run weekly or monthly.

#### What if I need facilities in multiple states?

Leave the `stateFilter` blank (default) to retrieve facilities from all states. Then filter client-side or use the CSV export to sort/segment by state in Excel.

#### Can I search by distance from a ZIP code?

Yes. Results are automatically ordered by distance from the ZIP code you provide. SAMHSA returns all nationwide facilities ordered by distance, with distance metadata included in the API response (though this Actor focuses on the facility contact data).

#### What does an empty intakePhone or hotline mean?

Many facilities only list a single main phone number. Empty fields are converted to empty strings (`""`) in the output. When importing into a database or CRM, treat empty strings as "not available" — do not assume the field is invalid.

#### How many facilities will I get for a ZIP code?

The SAMHSA API returns roughly 100 facilities per page, ordered by distance. For a centrally located ZIP (like 10001 in Manhattan), you may get 12,000+ results nationally. The Actor respects the `maxResults` limit to keep compute costs manageable. Set `maxResults: 0` to retrieve all available facilities (may take 1-2 minutes for the full dataset).

### Other Scrapers by SeatSignal

- [Medicare Provider Scraper](https://apify.com/seatsignal/medicare-provider-scraper) — Extract Medicare hospital, nursing home, and clinic provider data
- [HRSA Health Centers Scraper](https://apify.com/seatsignal/hrsa-health-centers-scraper) — Scrape Federally Qualified Health Centers (FQHCs)
- [State Medical Board Scraper](https://apify.com/seatsignal/state-medical-board-scraper) — Extract state medical license and provider credentialing data
- [FDA Facility Locator Scraper](https://apify.com/seatsignal/fda-facility-locator-scraper) — Scrape FDA-registered food and drug facilities
- [OSHA Inspections Scraper](https://apify.com/seatsignal/osha-inspections-scraper) — Extract OSHA workplace safety inspection records

### Legal Disclaimer

This Actor extracts publicly available data from findtreatment.gov, which is published by the U.S. Substance Abuse and Mental Health Services Administration as open government data. No authentication or terms-of-service violation is involved. Users are responsible for ensuring their use of the extracted data complies with applicable laws and regulations, including HIPAA (if processing protected health information) and state healthcare privacy laws. For support, contact the Actor developer through the Apify Store.

# Actor input Schema

## `serviceType` (type: `string`):

Type of treatment service: SA (Substance Abuse), MH (Mental Health), or BOTH.

## `zip` (type: `string`):

US ZIP code to search from. Results are ordered by distance from this location. Example: 10001 (New York).

## `nameFilter` (type: `string`):

Case-insensitive partial match on facility name. Leave blank to include all facilities. Example: 'Horizon' or 'Recovery'.

## `stateFilter` (type: `string`):

Filter by 2-letter state code (e.g. 'CA', 'NY', 'TX'). Leave blank for all states.

## `maxResults` (type: `integer`):

Maximum number of facilities to return. Set to 0 to retrieve all available results (stops at last page).

## Actor input object example

```json
{
  "serviceType": "SA",
  "zip": "10001",
  "nameFilter": "",
  "stateFilter": "",
  "maxResults": 1000
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("compute-edge/samhsa-treatment-locator-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("compute-edge/samhsa-treatment-locator-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call compute-edge/samhsa-treatment-locator-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=compute-edge/samhsa-treatment-locator-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SAMHSA Treatment Facility Locator Scraper — Rehab Centers",
        "description": "Extract SAMHSA treatment facilities nationwide — addiction and mental-health centers with phone, address, website, and intake details. Filter by service type, state, and facility name. High-quality B2B leads for healthcare providers, insurance, and recovery services.",
        "version": "0.1",
        "x-build-id": "g1LRs587dO14MthZl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~samhsa-treatment-locator-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-samhsa-treatment-locator-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/compute-edge~samhsa-treatment-locator-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-samhsa-treatment-locator-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/compute-edge~samhsa-treatment-locator-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-samhsa-treatment-locator-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": {
                    "serviceType": {
                        "title": "Service Type",
                        "enum": [
                            "SA",
                            "MH",
                            "BOTH"
                        ],
                        "type": "string",
                        "description": "Type of treatment service: SA (Substance Abuse), MH (Mental Health), or BOTH.",
                        "default": "SA"
                    },
                    "zip": {
                        "title": "ZIP Code / Search Location",
                        "type": "string",
                        "description": "US ZIP code to search from. Results are ordered by distance from this location. Example: 10001 (New York).",
                        "default": "10001"
                    },
                    "nameFilter": {
                        "title": "Facility Name Filter",
                        "type": "string",
                        "description": "Case-insensitive partial match on facility name. Leave blank to include all facilities. Example: 'Horizon' or 'Recovery'.",
                        "default": ""
                    },
                    "stateFilter": {
                        "title": "State Filter",
                        "type": "string",
                        "description": "Filter by 2-letter state code (e.g. 'CA', 'NY', 'TX'). Leave blank for all states.",
                        "default": ""
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of facilities to return. Set to 0 to retrieve all available results (stops at last page).",
                        "default": 1000
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
