# DuckDuckGo Scraper (`tortuga/duckduckgo-scraper`) Actor

DuckDuckGo web search results by query, region and time filter: position, title, URL, displayed URL, domain and snippet, plus an optional news list with source and publish time. Logged-out results, no API key or account needed. Export to JSON, CSV or Excel for rank tracking and research.

- **URL**: https://apify.com/tortuga/duckduckgo-scraper.md
- **Developed by:** [Trevor Ortega](https://apify.com/tortuga) (community)
- **Categories:** SEO tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## DuckDuckGo Scraper

Scrape DuckDuckGo search results without an API key or an account. Give it search phrases (or DuckDuckGo search URLs), pick a region and a time filter, and get one clean row per result: position, title, URL, displayed URL, domain and snippet. A news mode returns DuckDuckGo's news list with source and publish time.

### What data do you get?

| Field | Description |
| --- | --- |
| `query` | The search phrase |
| `vertical` | `web` or `news` |
| `position` | Rank within the query (1 = first result) |
| `page` | Results page the item came from |
| `title`, `url` | Result title and the real destination URL (not DuckDuckGo's redirect link) |
| `displayedUrl` | The URL as DuckDuckGo shows it under the title (web) |
| `domain` | Host name without `www.` |
| `snippet` | Result description text |
| `source`, `publishedAt`, `imageUrl` | News only: publisher, ISO publish time, thumbnail |
| `region`, `timeFilter` | The filters used (`wt-wt` is worldwide; `timeFilter` is `d`, `w`, `m`, `y` or null) |

### Input

```json
{
  "queries": ["web scraping tools", "site:github.com apify"],
  "region": "us-en",
  "timeFilter": "month",
  "maxItems": 50
}
```

- `queries`: one search phrase per line. Operators such as `site:`, `filetype:` and quotes are passed to DuckDuckGo.
- `startUrls`: optional duckduckgo.com search URLs; the query, `kl` (region) and `df` (time) are read from the URL.
- `vertical`: `web` (default) or `news`.
- `region`: a country name or code (`us`, `uk`, `de`, `jp`, ...) or a DuckDuckGo code such as `de-de`; `wt-wt` is worldwide.
- `timeFilter`: `day`, `week`, `month` or `year`.
- `maxItems` caps the total; `maxResultsPerQuery` caps each query.

### Output example

```json
{
  "query": "web scraping tools",
  "vertical": "web",
  "position": 1,
  "page": 1,
  "title": "17 Best Web Scraping Tools Tested & Ranked For 2026",
  "url": "https://www.scrapingbee.com/blog/web-scraping-tools/",
  "displayedUrl": "www.scrapingbee.com/blog/web-scraping-tools/",
  "domain": "scrapingbee.com",
  "snippet": "The best web scraping tools in 2026 range from lightweight open-source libraries to full-scale scraping platforms...",
  "region": "us-en",
  "timeFilter": null
}
```

### Pricing

| Event | Price |
| --- | --- |
| Search result | $0.0005 per result ($0.50 per 1,000) |
| Actor start | $0.00005 per run |

Platform usage is included in the price (measured at about $0.01 per 1,000 results). Volume tiers (Silver and above) get 10-20% off.

### Proxy note

DuckDuckGo answers datacenter IPs for normal searches, so the default Apify Proxy is enough. DuckDuckGo sometimes shows a human check instead of results; the Actor retries on a new IP and falls back to its Lite page, and a query that stays blocked is reported in the run SUMMARY instead of returning bad data. It never tries to solve a check.

### FAQ

#### How many results can I get per query?

About 10 per page. The Actor follows the next-page links until `maxItems`, `maxResultsPerQuery` or the end of DuckDuckGo's list (usually a few dozen results per query).

#### Can I scrape DuckDuckGo images and videos?

Not at the moment. DuckDuckGo shows a human check for its image list to automated visitors and the video list returned nothing, so only web and news are offered.

#### Do I need an API key or login?

No. The Actor reads the public, logged-out result pages.

#### Is it legal to scrape search results?

It collects publicly visible result pages without logging in. You are responsible for how you use the data and for following the site's terms and your local law.

#### Can I track rankings over time?

Yes. Schedule the Actor with the same queries and region and compare `position` per `url` between runs.

# Actor input Schema

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

Search phrases, one per line. A plain text value with line breaks also works. Operators such as site:, filetype: and quotes are passed through to DuckDuckGo.

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

duckduckgo.com search URLs (for example https://duckduckgo.com/?q=laptops\&kl=us-en\&df=w). The query, region (kl) and time filter (df) are read from the URL.

## `vertical` (type: `string`):

web returns normal results (position, title, URL, displayed URL, snippet). news returns DuckDuckGo's news list (title, URL, snippet, source, publish time, image).

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

DuckDuckGo region: a country name or code (us, uk, de, fr, jp, au, ...) or a full code such as us-en, de-de, wt-wt (worldwide, the default).

## `timeFilter` (type: `string`):

Only results from this period: any, day, week, month or year. Leave empty for any time.

## `maxItems` (type: `integer`):

Stop after this many results in total, across all queries. About 10 results come back per page.

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

Optional cap for each query, so one broad query does not use the whole Max results budget.

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

Apify Proxy. Datacenter IPs work for DuckDuckGo; if you get empty runs, try a residential group.

## Actor input object example

```json
{
  "queries": [
    "web scraping tools"
  ],
  "vertical": "web",
  "region": "us-en",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "queries": [
        "web scraping tools"
    ],
    "vertical": "web",
    "region": "us-en",
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tortuga/duckduckgo-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 = {
    "queries": ["web scraping tools"],
    "vertical": "web",
    "region": "us-en",
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("tortuga/duckduckgo-scraper").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 '{
  "queries": [
    "web scraping tools"
  ],
  "vertical": "web",
  "region": "us-en",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tortuga/duckduckgo-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tortuga/duckduckgo-scraper"
        }
    }
}
```

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/OQuuw7iT52jebafzP/builds/wWTj12MExN2NsQfBV/openapi.json
