# DuckDuckGo SERP (`s-r/duckduckgo-serp`) Actor

- **URL**: https://apify.com/s-r/duckduckgo-serp.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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

## DuckDuckGo SERP Scraper — Hosted Apify Actor

Hosted duckduckgo serp scraper that returns structured JSON without the captcha-solving, proxy-rotation, and site-update maintenance you'd otherwise own. Run it from the Apify Store with one click, or call it from your own service via the Apify API. Pay only for what you scrape — no monthly subscription.

### What you get

- **Structured JSON output** — every duckduckgo serp scraper run returns clean, parseable records ready for analytics or downstream pipelines.
- **Hosted on Apify** — no servers, no proxies, no anti-bot maintenance. Click Run.
- **Pay only for what you scrape** — pricing scales with usage; no monthly subscription minimum.
- **Configurable result limits** — cap the run at the exact number of results you need.
- **Region/language targeting** — query DuckDuckGo from any of its 50+ supported regions (us-en, nl-nl, de-de, fr-fr, jp-ja, etc.).

### Why use this duckduckgo serp scraper

DuckDuckGo is the search engine that powers ChatGPT browsing, Perplexity grounding, and most major AI assistants when they need a non-Google source. That makes the DDG SERP increasingly valuable for AEO/GEO monitoring — you can't optimize for what AI tools recommend without seeing what they see.

Most off-the-shelf duckduckgo serp scraper alternatives are either fragile open-source scripts that break every few months when DDG ships a markup change, or expensive SaaS subscriptions starting at $99-$399/month for a dashboard you may not need. DDG also runs an aggressive anti-bot system (the `anomaly.js` modal) that blocks naive scrapers within minutes from datacenter and most residential IPs.

This Apify Actor sits in the middle: same structured organic-results data, but priced per result instead of per month, with hosted infrastructure that handles the anti-bot challenge transparently so you don't have to.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `q` | string | **required** | Search query. |
| `kl` | string | `us-en` | DDG region-language code (e.g. 'us-en', 'nl-nl', 'de-de'). |
| `limit` | integer | `10` | Number of organic results (1–30). |

### Output

Every run pushes results to the Apify dataset as JSON records. Each record contains the structured fields surfaced by the duckduckgo serp scraper — rank, title, destination URL (with DDG's redirect wrapper decoded back to the real link), the displayed URL, and the snippet text. You can:

- **Download** the dataset as JSON, JSONL, CSV, or Excel from the Apify console
- **Stream** results via the Apify API for use in your own application
- **Pipe** results to webhooks, S3, BigQuery, or any of Apify's 30+ integrations
- **Diff** today's run against yesterday's to detect ranking changes (new entries, dropped entries, position shifts)

Sample record:

```json
{
  "rank": 1,
  "title": "Apify: Full-stack web scraping and data extraction platform",
  "url": "https://apify.com/",
  "displayed_url": "apify.com",
  "snippet": "Cloud platform for web scraping, browser automation, AI agents, and data for AI...",
  "q": "apify",
  "kl": "us-en",
  "fetched_in_seconds": 0.7
}
````

### Use cases for the duckduckgo serp scraper

#### AI search visibility tracking

Run the duckduckgo serp scraper daily for your brand and product keywords. ChatGPT browsing and Perplexity both use DDG as a primary grounding source — your DDG ranking is a leading indicator of whether AI assistants will recommend you when users ask about your category.

#### Competitive monitoring

Pull duckduckgo serp scraper results weekly for your top 10 competitors. Spot when they launch new pages, shift their messaging, or capture rankings on terms you used to own.

#### Privacy-segment SEO research

DDG's audience skews technical, privacy-conscious, and high-income. If your buyer profile matches, ranking signals from DDG matter more than from Google for your specific funnel — even though DDG has lower overall share.

#### Operational reporting

Schedule the duckduckgo serp scraper as a recurring Apify task. Pipe results to your warehouse and surface in your existing dashboards alongside Google SERP data for a complete picture of organic visibility.

### FAQ

#### Is this duckduckgo serp scraper free?

The Actor itself is hosted on Apify with pay-per-event pricing — you only pay for the organic results you actually receive. There's no monthly subscription and no minimum spend. The first few runs typically cost less than a coffee. For long-running daily jobs, your monthly bill scales with the volume of data you pull.

#### How does this duckduckgo serp scraper compare to existing tools?

Most off-the-shelf alternatives are either fragile open-source scripts that break every few months when DDG updates the anti-bot system, or expensive SaaS subscriptions starting at $99-$399/month. This Actor sits in between: hosted infrastructure that handles the DDG anti-bot challenge and renders the page through a markdown proxy, but priced per organic result.

#### What input does the duckduckgo serp scraper accept?

The full input schema is rendered as a form on the Apify Store page — you can run a job by filling out a query, region, and result limit with no code. The schema also accepts raw JSON if you're calling the Actor via the Apify API from your own service. See the **Input** section above for the field list.

#### How accurate is the duckduckgo serp scraper data?

The Actor returns the live DDG organic results — same data a human user would see on the page. There's no third-party cache or middleware. The destination URLs are decoded from DDG's redirect wrapper back to the real target so you don't have to do that yourself downstream.

#### Can I run this duckduckgo serp scraper on a schedule?

Yes — Apify has built-in scheduling. You can set the Actor to run hourly, daily, or weekly, and pipe results to webhooks, S3, or your data warehouse via the Apify integrations. Most teams schedule the duckduckgo serp scraper as a daily task per tracked keyword and incrementally diff against the previous run to surface ranking changes.

### Pricing

This duckduckgo serp scraper uses Apify's pay-per-event pricing — every successful organic result costs a small fixed amount, so your bill scales linearly with usage. There's no monthly subscription and no minimum spend. See the Apify Store page for the current per-result price; expect typical workloads (10 results per query, dozens of queries per day) to cost a few cents per run.

# Actor input Schema

## `q` (type: `string`):

Search query.

## `kl` (type: `string`):

DDG region-language code (e.g. 'us-en', 'nl-nl', 'de-de').

## `limit` (type: `integer`):

Number of organic results (1–30).

## Actor input object example

```json
{
  "q": "apify",
  "kl": "us-en",
  "limit": 10
}
```

# 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 = {
    "q": "apify",
    "kl": "us-en",
    "limit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/duckduckgo-serp").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 = {
    "q": "apify",
    "kl": "us-en",
    "limit": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("s-r/duckduckgo-serp").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 '{
  "q": "apify",
  "kl": "us-en",
  "limit": 10
}' |
apify call s-r/duckduckgo-serp --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "DuckDuckGo SERP",
        "description": "",
        "version": "0.1",
        "x-build-id": "c1sPP3jw4YtJm4hXF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/s-r~duckduckgo-serp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-s-r-duckduckgo-serp",
                "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/s-r~duckduckgo-serp/runs": {
            "post": {
                "operationId": "runs-sync-s-r-duckduckgo-serp",
                "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/s-r~duckduckgo-serp/run-sync": {
            "post": {
                "operationId": "run-sync-s-r-duckduckgo-serp",
                "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": [
                    "q"
                ],
                "properties": {
                    "q": {
                        "title": "Query",
                        "type": "string",
                        "description": "Search query."
                    },
                    "kl": {
                        "title": "Region/language",
                        "type": "string",
                        "description": "DDG region-language code (e.g. 'us-en', 'nl-nl', 'de-de').",
                        "default": "us-en"
                    },
                    "limit": {
                        "title": "Limit",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "Number of organic results (1–30).",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
