# Dark Web Scraper – Onion Search & Page Extractor (`lofomachines/tor-scraper`) Actor

Search the dark web by keyword and convert any .onion page into clean Markdown, JSON, HTML or text with rich metadata.

- **URL**: https://apify.com/lofomachines/tor-scraper.md
- **Developed by:** [Lofomachines](https://apify.com/lofomachines) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.50 / 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/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

## 🕵️ Dark Web Scraper – Onion Search Engine & .onion Page Extractor

**Search the dark web by keyword and turn any `.onion` page into clean, structured data — Markdown, JSON, HTML or plain text — in one click. No Tor Browser, no setup, no logins.**

The Dark Web Scraper is the fastest, most reliable way to run **dark web searches** and **onion page extraction** at scale. Type a keyword and get a ranked list of matching onion sites, or drop in a list of `.onion` URLs and receive fully parsed, LLM-ready content with rich metadata. Everything runs safely in the cloud — you never touch the Tor network yourself.

> ⚡ Two modes, one Actor: **Dark Web Search** and **Onion Page Extraction**.

---

### ✅ Why use this Actor?

- **🔎 Keyword search across the dark web** — discover onion sites, marketplaces, forums and leak pages by keyword.
- **📄 Onion page to Markdown / JSON / HTML / Text** — perfect for AI pipelines, archiving and analysis.
- **🧠 LLM-ready output** — clean Markdown and structured JSON built for RAG, ChatGPT, Claude and vector databases.
- **🛡️ Zero setup & zero risk** — no Tor Browser, no VPN, no configuration. It just works.
- **🔐 No login required** — you never authenticate with any external platform.
- **⚙️ Built for scale** — search hundreds of keywords or extract thousands of pages in a single run.
- **💸 Cost-efficient** — optimized to deliver more results for less compute.
- **📊 Rich, consistent dataset** — every result comes with titles, descriptions, onion domains, word counts, links, emails and more.

---

### 👥 Who is it for?

- **Cyber threat intelligence & SOC teams** monitoring the dark web for threats.
- **Brand protection & anti-fraud teams** hunting for leaks, counterfeits and impersonation.
- **OSINT investigators, journalists & researchers** exploring hidden services.
- **Data & AI engineers** feeding dark web content into LLMs, RAG systems and dashboards.
- **Compliance, risk & due-diligence** professionals tracking exposure.

---

### 💡 Popular use cases

| Use case | What you get |
| --- | --- |
| **Dark web monitoring** | Track keywords (brands, domains, emails, product names) across onion sites. |
| **Data breach & leak discovery** | Surface leak pages and paste sites mentioning your assets. |
| **Threat intelligence enrichment** | Pull structured content from onion sources into your TIP or SIEM. |
| **Marketplace & forum research** | Explore listings, vendors and discussions by keyword. |
| **Onion content archiving** | Snapshot `.onion` pages as clean Markdown or HTML for records. |
| **AI / RAG knowledge bases** | Convert onion pages into LLM-ready text for question answering. |
| **Academic & investigative research** | Collect reproducible, structured datasets from hidden services. |

---

### 🚀 How it works (3 steps)

1. **Choose a mode** — *Search the dark web by keywords* or *Extract content from .onion URLs*.
2. **Enter your input** — keywords (with a results limit) or a list of `.onion` URLs, and pick your content format.
3. **Run & download** — get a clean dataset in JSON, CSV, Excel, HTML or via API.

---

### 📥 Input examples

#### Search mode — find onion pages by keyword

```json
{
  "mode": "search",
  "searchTerms": ["data breach", "crypto marketplace"],
  "maxResultsPerTerm": 25,
  "extractResultPages": false
}
````

#### Search + extract — find pages *and* pull their full content

```json
{
  "mode": "search",
  "searchTerms": ["ransomware leak"],
  "maxResultsPerTerm": 15,
  "extractResultPages": true,
  "outputFormat": "markdown"
}
```

#### Extract mode — convert specific onion URLs to structured content

```json
{
  "mode": "extract",
  "startUrls": [
    "http://your-target-address.onion/",
    "http://another-address.onion/page"
  ],
  "outputFormat": "json"
}
```

***

### 📤 Output examples

#### Search result

```json
{
  "resultType": "search_result",
  "searchTerm": "data breach",
  "rank": 1,
  "title": "Example Leak Index",
  "url": "http://your-target-address.onion/",
  "onionDomain": "your-target-address.onion",
  "description": "Short snippet describing the page…",
  "scrapedAt": "2026-07-02T10:00:00.000Z"
}
```

#### Extracted page

```json
{
  "resultType": "page",
  "url": "http://your-target-address.onion/",
  "onionDomain": "your-target-address.onion",
  "title": "Example Hidden Service",
  "description": "A short meta description of the page.",
  "language": "en",
  "format": "markdown",
  "content": "# Example Hidden Service\n\nClean, structured content ready for analysis…",
  "textContent": "Example Hidden Service Clean, structured content…",
  "wordCount": 842,
  "headings": [{ "level": 1, "text": "Example Hidden Service" }],
  "onionLinks": ["http://another-address.onion/"],
  "emails": ["contact@example.onion"],
  "imageCount": 4,
  "httpStatusCode": 200,
  "contentType": "text/html; charset=utf-8",
  "responseTimeMs": 3120,
  "pageSizeBytes": 18540,
  "scrapedAt": "2026-07-02T10:00:05.000Z"
}
```

Export any run as **JSON, CSV, Excel, HTML table or XML**, or pull it live from the **Apify API**.

***

### 🔌 Integrations & automation

Connect the Dark Web Scraper to your stack in minutes — no code required:

- **n8n** – trigger scans on a schedule and route alerts to Slack, email or a database.
- **Make (Integromat)** – build dark web monitoring workflows with hundreds of apps.
- **Zapier** – push new results into Google Sheets, Airtable, Notion or your CRM.
- **Apify API & Webhooks** – integrate results directly into your SIEM, TIP or data warehouse.
- **LLMs & vector DBs** – feed Markdown/JSON straight into ChatGPT, Claude, Pinecone or Weaviate.

Set it on a **schedule** to continuously monitor keywords and get notified the moment something new appears.

***

### ❓ FAQ

**Do I need the Tor Browser or a VPN?**
No. Everything runs in the cloud. You only provide keywords or URLs.

**Do I need to log in to anything?**
No. The Actor requires no external accounts or authentication.

**Which output formats are supported?**
Markdown (LLM-ready), JSON (structured), HTML (cleaned) and plain text.

**Can I monitor keywords continuously?**
Yes — schedule the Actor and connect webhooks to get alerts on new results.

**Is the output structured and consistent?**
Yes. Every record follows a clean, predictable schema ideal for automation and analytics.

***

### 🔗 You may also like

Explore more tools by the same author:

- [Dark Web Search Results Scraper](https://apify.com/lofomachines/dark-web-search-results-scraper) — fast dark web search results by keyword.
- [Ransomware & Dark Web Data Breach Monitor](https://apify.com/lofomachines/ransomware-dark-web-data-breach-monitor) — track ransomware groups and breaches.
- [Email Data Breach Checker](https://apify.com/lofomachines/email-breach-checker) — check if emails were exposed in breaches.
- [Watson – Username Finder](https://apify.com/lofomachines/watson) — discover accounts across the web by username.
- [Website to Markdown Converter](https://apify.com/lofomachines/website-to-markdown-converter) — turn any web page into clean, LLM-ready Markdown.

***

### ⚖️ Responsible use

This Actor is intended for **legitimate security research, threat intelligence, brand protection, OSINT and academic use**. You are responsible for ensuring your usage complies with all applicable laws, regulations and the Apify Terms of Service.

***

#### Keywords

dark web scraper, onion scraper, tor scraper, dark web search, onion search engine, dark web monitoring, dark web api, onion url to markdown, dark web osint, threat intelligence scraper, data breach monitoring, hidden services scraper, dark web data extraction.

# Actor input Schema

## `mode` (type: `string`):

Choose 'Search by keywords' to discover onion sites and pages from the dark web, or 'Extract pages' to turn a list of .onion URLs into clean, structured content.

## `searchTerms` (type: `array`):

One or more keywords or phrases to look up across the dark web. Used only in Search mode. Example: "data breach", "bitcoin marketplace".

## `maxResultsPerTerm` (type: `integer`):

Maximum number of results to return for each keyword. Higher values return more results but take longer.

## `extractResultPages` (type: `boolean`):

When enabled, every page found in Search mode is opened and converted into full, clean content (Markdown / JSON / HTML / Text) with metadata. Leave off for a fast list of links only.

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

A list of .onion page URLs to open and convert into clean, structured content. Used only in Extract mode.

## `outputFormat` (type: `string`):

The format used for the extracted page content. Markdown is ideal for AI/LLM pipelines, JSON for structured data, HTML for archiving, Text for search and analysis.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "data breach",
    "crypto marketplace"
  ],
  "maxResultsPerTerm": 20,
  "extractResultPages": false,
  "startUrls": [
    "http://example000000000000000000000000000000000000000000000000000.onion/"
  ],
  "outputFormat": "markdown"
}
```

# Actor output Schema

## `overview` (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 = {
    "searchTerms": [
        "data breach"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lofomachines/tor-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 = { "searchTerms": ["data breach"] }

# Run the Actor and wait for it to finish
run = client.actor("lofomachines/tor-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 '{
  "searchTerms": [
    "data breach"
  ]
}' |
apify call lofomachines/tor-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Dark Web Scraper – Onion Search & Page Extractor",
        "description": "Search the dark web by keyword and convert any .onion page into clean Markdown, JSON, HTML or text with rich metadata.",
        "version": "1.0",
        "x-build-id": "n8Vcex0zY6wQIhDSe"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lofomachines~tor-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lofomachines-tor-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/lofomachines~tor-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lofomachines-tor-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/lofomachines~tor-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lofomachines-tor-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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "What do you want to do?",
                        "enum": [
                            "search",
                            "extract"
                        ],
                        "type": "string",
                        "description": "Choose 'Search by keywords' to discover onion sites and pages from the dark web, or 'Extract pages' to turn a list of .onion URLs into clean, structured content.",
                        "default": "search"
                    },
                    "searchTerms": {
                        "title": "Keywords to search",
                        "type": "array",
                        "description": "One or more keywords or phrases to look up across the dark web. Used only in Search mode. Example: \"data breach\", \"bitcoin marketplace\".",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerTerm": {
                        "title": "Results per keyword",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of results to return for each keyword. Higher values return more results but take longer.",
                        "default": 20
                    },
                    "extractResultPages": {
                        "title": "Also extract full content of each result",
                        "type": "boolean",
                        "description": "When enabled, every page found in Search mode is opened and converted into full, clean content (Markdown / JSON / HTML / Text) with metadata. Leave off for a fast list of links only.",
                        "default": false
                    },
                    "startUrls": {
                        "title": ".onion URLs to extract",
                        "type": "array",
                        "description": "A list of .onion page URLs to open and convert into clean, structured content. Used only in Extract mode.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "outputFormat": {
                        "title": "Content format",
                        "enum": [
                            "markdown",
                            "json",
                            "html",
                            "text"
                        ],
                        "type": "string",
                        "description": "The format used for the extracted page content. Markdown is ideal for AI/LLM pipelines, JSON for structured data, HTML for archiving, Text for search and analysis.",
                        "default": "markdown"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
