# DuckDuckGo Search Scraper for SERP & AI Research (`runtime/duckduckgo-search-scraper`) Actor

Extract DuckDuckGo web, news, image, and video search results with snippets, URLs, ranking positions, and optional email discovery for research and enrichment workflows.

- **URL**: https://apify.com/runtime/duckduckgo-search-scraper.md
- **Developed by:** [scraping automation](https://apify.com/runtime) (community)
- **Categories:** Integrations, Lead generation, News
- **Stats:** 5 total users, 1 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## DuckDuckGo Search Scraper for SERP & AI Research

Extract DuckDuckGo web, news, image, and video search results for SEO, market research, and AI workflows.

### Who this is for

- SEO teams
- Market researchers
- Lead generation teams
- Automation builders

### What it helps you do

- Run one or many search queries
- Collect clean search result records
- Monitor rankings, mentions, competitors, and topic discovery

### Inputs you can use

- Search query or list of queries
- Search mode
- Maximum results and pages
- Optional email extraction

### Data you get

- query
- rank
- title
- URL
- domain
- snippet
- result type
- published date
- image or video metadata

### How to get better results

- Start with a narrow, specific query or a small list of source URLs.
- Use realistic limits for the first run, then increase the volume once the output looks right.
- Keep source URLs, dates, and location context when you need repeatable market monitoring.
- Review a few sample records before connecting the dataset to a larger workflow.

### Notes

- Results depend on what the public source exposes at run time.
- Some pages may hide, delay, rename, or remove fields, so individual records can have partial data.
- Use the built-in output table to inspect results before exporting to spreadsheets, dashboards, or automation tools.

### Support

If a run returns unexpected data, open an issue from the Actor page with the input used, the run ID, and the result you expected.

# Actor input Schema

## `searchQuery` (type: `string`):

Single search query. Used when Search queries is empty. Comma-separated or newline-separated values are split into multiple queries.

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

Batch queries, one per line. When non-empty, this overrides Search query.

## `removeDuplicateQueries` (type: `boolean`):

Remove duplicate queries after trimming and suffix expansion.

## `maxQueries` (type: `integer`):

Maximum number of normalized queries to process. Set to 0 for no query cap.

## `searchMode` (type: `string`):

DuckDuckGo vertical to query.

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

Maximum number of dataset items to push for the whole run.

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

Maximum DuckDuckGo result pages to request per query.

## `autoPagination` (type: `boolean`):

Request subsequent result pages until caps are reached.

## `failOnNoResults` (type: `boolean`):

Fail the run when no dataset items are extracted. Useful for monitoring and paid workflows.

## `extractEmails` (type: `boolean`):

Extract email addresses from result titles and snippets.

## `emailDomainFilter` (type: `string`):

Keep only email addresses containing this domain or substring. Leave empty to keep all discovered emails.

## `emailSearchSuffix` (type: `string`):

Optional suffix appended to each query before searching, for example contact email or "mentions legales".

## `useApifyProxy` (type: `boolean`):

Enable Apify Proxy when no custom proxy URLs are provided.

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

Advanced Apify Proxy or custom proxy settings.

## Actor input object example

```json
{
  "searchQuery": "apify actors",
  "searchQueries": [],
  "removeDuplicateQueries": true,
  "maxQueries": 0,
  "searchMode": "default",
  "maxResults": 100,
  "maxPages": 5,
  "autoPagination": true,
  "failOnNoResults": false,
  "extractEmails": false,
  "emailDomainFilter": "",
  "emailSearchSuffix": "",
  "useApifyProxy": false,
  "proxyConfiguration": {}
}
```

# Actor output Schema

## `results` (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 = {
    "searchQuery": "apify actors"
};

// Run the Actor and wait for it to finish
const run = await client.actor("runtime/duckduckgo-search-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 = { "searchQuery": "apify actors" }

# Run the Actor and wait for it to finish
run = client.actor("runtime/duckduckgo-search-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 '{
  "searchQuery": "apify actors"
}' |
apify call runtime/duckduckgo-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/rQDM4W1lJINyjL3VA/builds/79HagQKgVdn991kIC/openapi.json
