# Dark Web Search - Onion Index Results API (`khadinakbar/dark-web-search`) Actor

Search a public Tor hidden-service index by keyword and return bounded .onion result metadata. Does not fetch result pages, log in, or bypass controls.

- **URL**: https://apify.com/khadinakbar/dark-web-search.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Developer tools, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 search 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Search - Onion Index Results API

Search a public Tor hidden-service index with 1–10 keywords and receive one structured record for each returned `.onion` result. Records contain the query, rank, title, onion URL, domain, source snippet, reported match count, and collection time. It is for lawful threat-intelligence, brand-protection, academic, and OSINT triage when the first need is a bounded list of index results—not page content.

### Best fit for this Actor

- Start with a short search query such as an authorized research topic or brand.
- Set `maxResultsPerQuery` before starting to bound both result volume and cost.
- Use [Dark Web Scraper - Tor .onion Page Extractor](https://apify.com/khadinakbar/dark-web-scraper) only after you have a lawful, specific URL you are permitted to inspect. This actor does **not** fetch search-result pages.

This focused workflow covers public-index result metadata. The supplied-URL extractor is the constructive next step for a separately authorized page review.

### Research workflow

An analyst runs one bounded query for an authorized topic, keeps `sourceUrl`, `query`, and `fetchedAt` alongside their notes, and manually decides whether any result is in scope for a later authorized review. The actor never opens returned `.onion` links, keeping search and page collection separate and auditable.

### Quick start

```json
{
    "searchQueries": ["Tor privacy research"],
    "maxResultsPerQuery": 10,
    "responseFormat": "concise"
}
```

| Field                | Type     | What it controls                                                                                              |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| `searchQueries`      | string\[] | One to ten unique keywords, each 2–100 characters. URLs are not accepted.                                     |
| `maxResultsPerQuery` | integer  | Saved-result cap per query, from 1 to 50; defaults to 10.                                                     |
| `responseFormat`     | enum     | `concise` returns core fields; `detailed` adds a provenance statement but still does not fetch a result page. |

### What data you receive

One dataset item is one valid `.onion` result returned by the public source for one query. The URL and snippet are source-index metadata; availability, safety, and page content are not verified.

```json
{
    "query": "Tor privacy research",
    "rank": 1,
    "title": "Illustrative result title",
    "url": "http://exampleexample.onion/research/",
    "onionDomain": "exampleexample.onion",
    "snippet": "Snippet returned by the source index.",
    "source": "ahmia",
    "totalResultsReported": 42,
    "fetchedAt": "2026-08-30T14:26:00.000Z"
}
```

The run saves `OUTPUT` (compact outcome) and `RUN_SUMMARY` (counts, warnings, safe errors, and actual charges). `COMPLETE`, `PARTIAL`, `VALID_EMPTY`, and `INVALID_INPUT` are successful terminal outcomes. A source outage with no useful output becomes `UPSTREAM_FAILED`, not a misleading empty success.

### Pricing

This actor uses Pay per event plus Apify platform usage.

| Event         |    Price | When charged                                               |
| ------------- | -------: | ---------------------------------------------------------- |
| Actor start   | $0.00005 | Once after valid input is accepted.                        |
| Search result |   $0.025 | Once for each validated onion result saved to the dataset. |

A run capped at 10 results costs at most about $0.25005 in actor events, plus Apify platform usage. Open the live Pricing tab for the current event details; result events apply only to validated records that reach the dataset.

### API and MCP

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('khadinakbar/dark-web-search').call({
    searchQueries: ['Tor privacy research'],
    maxResultsPerQuery: 10,
    responseFormat: 'concise',
});
console.log((await client.dataset(run.defaultDatasetId).listItems()).items);
```

> Search the public hidden-service index for my authorized research topic. Return at most 10 result metadata records, preserve `query`, `sourceUrl`, and `fetchedAt`, and keep the workflow at result-metadata scope.

For AI agents, use the current client-specific setup at [Apify MCP](https://mcp.apify.com). Inspect `OUTPUT` before treating an empty dataset as no matches: `VALID_EMPTY` means the source responded with no valid results; `UPSTREAM_FAILED` means it could not be reached.

### Best results

- Use precise, non-sensitive research queries and keep the result cap low while validating relevance.
- Preserve source fields in an evidence log; index results can change and may include stale URLs.
- Treat each returned URL as a lead for human authorization and relevance review before the next workflow step.

### Builder's note

I built the source flow after testing the live index: it rotates both the hidden form-field name and value before returning results. The actor retrieves that server-issued pair on every run, which keeps the integration aligned with the source's current form contract.

### Responsible use

Use only for legitimate, authorized research and comply with applicable laws, regulations, source terms, and Apify policies. Search indexes can expose harmful or illegal material. This actor intentionally returns limited metadata only and does not access, download, authenticate to, or bypass controls on returned services.

# Actor input Schema

## `searchQueries` (type: `array`):

Enter 1 to 10 keyword searches for the public hidden-service index, for example 'Tor privacy research'. Each query must contain 2 to 100 characters. Duplicate queries are removed without additional result-event charges. This does not accept URLs and does not fetch result pages.

## `maxResultsPerQuery` (type: `integer`):

Set the maximum saved index results for each query. Choose a number from 1 to 50; the default is 10. This caps result-event charges at $0.025 per saved result plus platform usage. This is not a page-crawl limit because result pages are never fetched.

## `responseFormat` (type: `string`):

Choose concise for the smallest AI-agent-friendly search result records. Choose detailed to add a short provenance statement to each record. The default is concise. This setting does not retrieve page body text, HTML, contacts, or screenshots.

## Actor input object example

```json
{
  "searchQueries": [
    "Tor privacy research"
  ],
  "maxResultsPerQuery": 10,
  "responseFormat": "concise"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `output` (type: `string`):

No description

## `runSummary` (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 = {
    "searchQueries": [
        "Tor privacy research"
    ],
    "maxResultsPerQuery": 10,
    "responseFormat": "concise"
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/dark-web-search").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 = {
    "searchQueries": ["Tor privacy research"],
    "maxResultsPerQuery": 10,
    "responseFormat": "concise",
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/dark-web-search").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 '{
  "searchQueries": [
    "Tor privacy research"
  ],
  "maxResultsPerQuery": 10,
  "responseFormat": "concise"
}' |
apify call khadinakbar/dark-web-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/dark-web-search"
        }
    }
}

```

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/xDbzxPaiOt2gOeN5Z/builds/iPtHzSosiU4tH9JNa/openapi.json
