# DuckDuckGo Search Results Scraper (`fetch_cat/duckduckgo-search-results-scraper`) Actor

Export ranked DuckDuckGo organic search results for keywords, including title, URL, snippet, rank, region, page, and timestamp.

- **URL**: https://apify.com/fetch\_cat/duckduckgo-search-results-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** SEO tools, Marketing, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.06 / 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 Results Scraper

Scrape DuckDuckGo organic search results for SEO, market research, competitive intelligence, and rank tracking workflows. The Actor accepts one query or a list of queries and exports ranked DuckDuckGo results with title, URL, domain, snippet, region, page, and scrape timestamp.

### What you can do

- Track organic result positions for keywords.
- Export SERP result URLs for outreach or research.
- Compare results across DuckDuckGo region settings.
- Collect snippets and displayed domains for SEO analysis.

### Input

Provide either `query` for one search or `queries` for a batch. Use `maxResults` to cap saved results per query. `region` accepts DuckDuckGo region codes such as `us-en`, `uk-en`, `de-de`, or `wt-wt`. `safeSearch` supports `strict`, `moderate`, and `off`.

### Input recipes

#### Single keyword

```json
{
  "query": "apify web scraping",
  "maxResults": 10,
  "region": "us-en",
  "safeSearch": "moderate",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

#### Multiple keywords

```json
{
  "queries": ["best web scraping tools", "duckduckgo seo rank tracker"],
  "maxResults": 25,
  "region": "us-en",
  "safeSearch": "moderate",
  "proxyConfiguration": { "useApifyProxy": true }
}
```

### Examples

Example: use the single-keyword recipe for a quick SERP export. Use the multiple-keyword recipe when you need comparable rank data for a keyword set. Keep `maxResults` low for monitoring tasks and increase it only when you need deeper SERP coverage.

### Output

Each dataset item represents one organic DuckDuckGo result:

- `query`, `rank`, `resultTitle`, `title`
- `url`, `domain`, `displayUrl`, `redirectUrl`
- `snippet`, `region`, `page`, `scrapedAt`

### API usage

Run the Actor with the Apify API or client libraries by passing the same JSON input shown above. After the run succeeds, download results from the default dataset returned by the run metadata.

```bash
apify call <username>/duckduckgo-search-results-scraper --input-file input.json
```

### Pricing and cost expectations

The Actor uses pay-per-event charging: a small run-start charge plus a per-result event. Set `maxResults` to the number of search results you actually need to control cost. See the live [Apify Pricing tab](https://apify.com/fetch_cat/duckduckgo-search-results-scraper/pricing) for the current rates.

### Limits

Each input query can request up to 300 organic results. DuckDuckGo may return fewer results for narrow keywords, strict safe-search settings, or regions with limited coverage.

### Reliability tips

DuckDuckGo may occasionally return fewer results than requested or show anti-automation pages. The Actor preserves partial output already extracted. Enable Apify Proxy for larger batches or repeated searches.

### FAQ

#### Why did my run return fewer results than requested?

DuckDuckGo can return fewer organic results than requested or stop pagination. The Actor saves partial output already extracted.

#### What should I do if DuckDuckGo blocks the request?

Enable Apify Proxy and retry with lower volume.

### Related actors

For broader search workflows, combine DuckDuckGo exports with other SERP or SEO data Actors in your Apify account.

### Support

Open an Actor issue with the run ID, input, and expected result count if you need help.

### Who is it for

This Actor is useful for SEO teams, growth marketers, researchers, and developers who need structured DuckDuckGo SERP data without manually copying search result pages.

### MCP usage

You can connect the Actor to Apify MCP-compatible workflows and trigger it with the same JSON input used in the Apify Console. Use compact inputs for agent workflows, then let the agent read the default dataset after the run finishes.

#### Add MCP server

```bash
claude mcp add apify -- npx -y @apify/actors-mcp-server
```

#### MCP JSON config

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server"],
      "env": { "APIFY_TOKEN": "MY-APIFY-TOKEN" }
    }
  }
}
```

#### Example prompts for MCP usage

Example prompt: "Run DuckDuckGo Search Results Scraper for `apify web scraping` and return the top 10 URLs."

Example prompt: "Compare DuckDuckGo results for these three keywords and summarize repeated domains."

### Legality and responsible use

Only scrape public search result pages and use the data for lawful purposes. Respect DuckDuckGo, target websites, and applicable privacy, intellectual property, and database rights rules in your jurisdiction.

### API usage examples

#### Node.js

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/duckduckgo-search-results-scraper').call({ query: 'apify web scraping', maxResults: 10 });
console.log(run.defaultDatasetId);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('MY-APIFY-TOKEN')
run = client.actor('fetch_cat/duckduckgo-search-results-scraper').call(run_input={'query': 'apify web scraping', 'maxResults': 10})
print(run['defaultDatasetId'])
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~duckduckgo-search-results-scraper/runs?token=MY-APIFY-TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"query":"apify web scraping","maxResults":10}'
```

### Field notes

- `rank` is the saved organic result position for the query.
- `url` is the destination URL.
- `redirectUrl` is present only when DuckDuckGo provides a redirect link.
- `displayUrl` is the visible URL text when available.
- `snippet` may be null if DuckDuckGo omits a description.

### Pagination behavior

The Actor follows available next-page payloads until it reaches `maxResults` or DuckDuckGo stops returning additional result pages.

### Partial results

If a later request is blocked or empty, already saved results remain in the dataset.

### Region tips

Use `wt-wt` for broad worldwide results, or choose a country-language pair when you need a localized SERP snapshot.

### Safe-search tips

Use `moderate` for most business research. Use `strict` for more filtered output, or `off` when your use case requires unfiltered SERP visibility.

### Cost control tips

Start with 10 results per query, inspect quality, then increase `maxResults` only for keywords where deeper pages are useful.

# Actor input Schema

## `query` (type: `string`):

Single DuckDuckGo search query.

## `queries` (type: `array`):

Additional DuckDuckGo search queries.

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

Maximum organic search results to save for each query.

## `region` (type: `string`):

DuckDuckGo region code such as us-en, uk-en, de-de, or wt-wt.

## `safeSearch` (type: `string`):

DuckDuckGo safe-search level.

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

Optional Apify Proxy settings.

## Actor input object example

```json
{
  "query": "apify web scraping",
  "maxResults": 10,
  "region": "us-en",
  "safeSearch": "moderate",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `datasetId` (type: `string`):

No description

## `datasetUrl` (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 = {
    "query": "apify web scraping",
    "maxResults": 10,
    "region": "us-en",
    "safeSearch": "moderate",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/duckduckgo-search-results-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 = {
    "query": "apify web scraping",
    "maxResults": 10,
    "region": "us-en",
    "safeSearch": "moderate",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/duckduckgo-search-results-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 '{
  "query": "apify web scraping",
  "maxResults": 10,
  "region": "us-en",
  "safeSearch": "moderate",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call fetch_cat/duckduckgo-search-results-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/jdp2upeEgwfsZ3gBl/builds/gqH3WKS4NTC3k8Mwh/openapi.json
