# Dark Web Scraper (`epctex/darkweb-scraper`) Actor

Extract publicly exposed data, including crypto wallets, API keys, emails, phone numbers, and more from publicly accessible Tor (.onion) sites.

- **URL**: https://apify.com/epctex/darkweb-scraper.md
- **Developed by:** [epctex](https://apify.com/epctex) (community)
- **Categories:** Automation, News, Agents
- **Features:** Limited permissions
- **Stats:** 1,940 total users, 25 monthly users, 99.1% runs succeeded, 64 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.80 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Actor - Dark Web Scraper

### Shine a Light on the Dark Web — Responsibly

The **Dark Web Scraper** is a powerful OSINT tool built for cybersecurity professionals, threat intelligence analysts, academic researchers, and security teams who need structured, automated access to publicly accessible Tor (.onion) sites — without the complexity of managing a TOR stack themselves.

> **Intended use:** This actor is strictly designed for lawful **Open Source Intelligence (OSINT)** activities, including cybersecurity research, threat intelligence gathering, digital forensics support, and academic investigation of publicly accessible Tor-based websites. Use of this actor must comply with all applicable laws and Apify's [Terms of Service](https://apify.com/terms-of-use).

***

### Why Use Dark Web Scraper?

The dark web is a significant source of threat intelligence — leaked credentials, exposed API keys, active phishing infrastructure, and emerging threat actor activity all surface there first. Dark Web Scraper lets you monitor and investigate these sources systematically and at scale, without manual browsing.

**Who is this for?**

- **Security Operations (SOC) teams** monitoring for leaked credentials or corporate data exposure
- **Threat intelligence analysts** tracking threat actor infrastructure and indicators of compromise (IOCs)
- **Penetration testers & red teams** identifying exposed assets during engagements
- **Researchers & academics** studying the structure and content of the Tor network
- **Journalists & investigators** conducting lawful open-source investigations

***

### Key Features

- **Keyword Search** — Search publicly accessible Dark Web pages for specific keywords and retrieve structured results. Ideal for monitoring mentions of your brand, domain, or known threat actor handles.

- **IOC Extraction** — Automatically extract publicly exposed indicators such as email addresses, phone numbers, API keys, and cryptocurrency wallet addresses to feed directly into your threat intelligence pipeline.

- **Full TOR Network Support** — Built-in TOR proxy integration lets you reach .onion sites reliably, without any local TOR setup. Designed for legitimate OSINT and cybersecurity research only.

- **Depth & Volume Control** — Fine-tune crawl depth and page limits to run targeted, efficient investigations — from a quick surface scan to a deep-dive across an entire .onion domain.

- **Fully Extensible** — Drop in your own extraction function to capture custom data patterns specific to your research workflow.

- **Blazing Fast** — Scrapes ~100 pages in 5 seconds with just ~0.1–0.2 compute units when pages are responsive.

***

### Input Parameters

The input is a JSON object with the following fields:

| Parameter | Type | Required | Description |
|---|---|---|---|
| `startUrls` | Array | Optional | List of `.onion` URLs to begin crawling from |
| `search` | String | Optional | Keyword to search across Dark Web pages |
| `maxDepth` | Number | Optional | Maximum link depth to crawl. Lower values = faster, shallower scans |
| `maxPages` | Number | Optional | Cap on total pages crawled per run |
| `maxItems` | Number | Optional | Cap on total items extracted per run |
| `extendOutputFunction` | String | Optional | Custom JS function `($) => ({})` for extracting additional fields |

#### Tips

- To target a specific `.onion` page, paste the URL directly into `startUrls`.
- Set `maxDepth: 1` for a fast surface-level scan of a single site.
- Use `search` combined with `startUrls` to find keyword occurrences within a known site.

#### Example Input

```json
{
  "startUrls": [
    "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/"
  ],
  "search": "Dark Web",
  "maxDepth": 5,
  "maxPages": 10
}
```

***

### During the Run

The actor logs real-time progress for every page it visits, including the current URL, item counts, and any errors. If invalid input is detected, the run halts immediately with a clear explanation — no silent failures.

***

### Output & Export

Results are stored in Apify's structured dataset and can be consumed via the [Apify API](https://www.apify.com/docs/api) in any language — Python, Node.js, PHP, and more.

#### Output Schema

Each scraped page produces a record like this:

```json
{
  "url": "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/cellar-door/",
  "links": [
    "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/",
    "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/faq/",
    "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/support/"
  ],
  "emails": [],
  "phones": [],
  "cryptoAddresses": {},
  "misc": {
    "Twitter username": ["@S_Config"],
    "Instagram username": ["@S_Config"]
  },
  "searchKeywordFound": false
}
```

| Field | Description |
|---|---|
| `url` | The page URL that was scraped |
| `links` | All hyperlinks found on the page |
| `emails` | Email addresses extracted from the page |
| `phones` | Phone numbers extracted from the page |
| `cryptoAddresses` | Cryptocurrency wallet addresses by coin type |
| `misc` | Other extracted identifiers (social handles, usernames, etc.) |
| `searchKeywordFound` | Whether your search keyword appeared on this page |

***

### Bugs, Feature Requests & Changelog

This scraper is actively maintained. Have a feature request or found a bug? [Open an issue on GitHub](https://github.com/epctex-support/darkweb-scraper/issues).

***

### Contact

Visit [epctex.com](https://epctex.com) to explore our full catalog of data extraction tools. Need a custom integration or have a specific use case? Reach out via the chat on [epctex.com](https://epctex.com) or email us at <business@epctex.com>.

# Actor input Schema

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

URLs to start with. It should be list or detail URL

## `search` (type: `string`):

The keyword that you can search on Dark Web site

## `maxDepth` (type: `integer`):

Maximum number of depth the crawler will dive into.

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

Maximum number of pages that you want as output. Default is all.

## `extendOutputFunction` (type: `string`):

Function that takes a JQuery handle ($) as argument and returns data that will be merged with the default output

## Actor input object example

```json
{
  "startUrls": [
    "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/"
  ],
  "maxDepth": 5,
  "maxPages": 20,
  "extendOutputFunction": "($) => { return {} }"
}
```

# 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 = {
    "startUrls": [
        "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/"
    ],
    "maxDepth": 5,
    "maxPages": 20,
    "extendOutputFunction": ($) => { return {} }
};

// Run the Actor and wait for it to finish
const run = await client.actor("epctex/darkweb-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 = {
    "startUrls": ["http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/"],
    "maxDepth": 5,
    "maxPages": 20,
    "extendOutputFunction": "($) => { return {} }",
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/darkweb-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 '{
  "startUrls": [
    "http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/"
  ],
  "maxDepth": 5,
  "maxPages": 20,
  "extendOutputFunction": "($) => { return {} }"
}' |
apify call epctex/darkweb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,epctex/darkweb-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/Tb6PhwkU2VPsWCSua/builds/Gf2THlaEm0DFRXVEt/openapi.json
