# Bing Search Scraper & DuckDuckGo Scraper (SERP) (`sweet_stickball/bing-ddg-serp`) Actor

Scrape Bing and DuckDuckGo search results: organic titles, URLs, snippets and positions. SERP scraper for keyword research and rank tracking on Bing or DuckDuckGo, flat JSON output, no API key.

- **URL**: https://apify.com/sweet_stickball/bing-ddg-serp.md
- **Developed by:** [CrawlKit](https://apify.com/sweet_stickball) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.90 / 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

## Bing Search Scraper & DuckDuckGo Scraper (SERP)

Extract organic search results from **Bing** or **DuckDuckGo**. Get titles, URLs, snippets, and positions as flat JSON — no API key, no headless browser, no start fee.

### Features

- **Two engines** — DuckDuckGo (default, via its HTML endpoint) or Bing. Switch with one parameter.
- **Automatic pagination** — fetches multiple pages (about 10 results each) until `maxResults` is reached or the engine has no more results
- **Clean output** — DuckDuckGo redirect wrappers resolved to the target URL, HTML entities decoded, empty string when a result has no snippet
- **Retries and proxy** — uses browser-like requests with exponential backoff on rate limits, server errors and timeouts. If a search returns nothing, the actor retries with a new Apify Proxy session (datacenter, then residential).

### Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `query` | string | Yes | — | Search query (same as typing into the search box) |
| `maxResults` | integer | No | 20 | Maximum results to return (1–200) |
| `engine` | string | No | `ddg` | Search engine: `ddg` (DuckDuckGo) or `bing` |

### Output

Each result is a flat JSON object:

```json
{
    "title": "Web Scraping Guide — Rate Limits and robots.txt",
    "url": "https://example.com/web-scraping-guide",
    "snippet": "An overview of web scraping practices including rate limiting, respecting robots.txt, and handling errors.",
    "position": 1,
    "engine": "ddg"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Page title from the search result |
| `url` | string | URL of the result (DuckDuckGo redirect wrappers are resolved; Bing URLs are returned as Bing links them) |
| `snippet` | string | Description snippet shown in search results |
| `position` | integer | Rank position in search results (1-indexed) |
| `engine` | string | Which engine produced this result (`ddg` or `bing`) |

### Use Cases

- **SEO monitoring** — track your ranking for target keywords on Bing/DDG
- **Competitor research** — find who ranks for industry terms
- **Content discovery** — surface relevant pages for a topic
- **Price comparison** — search for products across the web
- **Lead generation** — find businesses in specific niches

### Pricing

Pay-per-event, **no start fee**: **$3.10 per 1,000 search results** on the Apify Free plan, with lower prices on paid plans. Each result pushed to the dataset is one event.

| Event | Free | Starter | Scale | Business | Enterprise |
|-------|------|---------|-------|----------|------------|
| Search result (`RESULT`) | $3.10 | $2.60 | $2.30 | $1.90 | $1.90 |

Prices in USD per 1,000 events.

#### Cost examples (Free plan)

| Scenario | Results | Cost |
|----------|---------|------|
| Quick lookup | 10 | $0.031 |
| Standard search | 20 | $0.062 |
| Deep research | 100 | $0.31 |
| Bulk keywords (1K queries × 20 results) | 20,000 | $62.00 |

### Limitations

- **Organic results only** — only standard web results are extracted (Bing `b_algo` blocks, DuckDuckGo result blocks); ads, rich snippets, news/image/video boxes and related searches are not returned.
- **No JavaScript rendering** — results come from the static HTML page; JS-rendered content is not included
- **Rate limits** — both engines may throttle frequent requests; the actor backs off and retries with a new proxy session, but a run that gets no results ends FAILED
- **Regional results** — results reflect the location of the IP used; there is no country/language option
- **Pagination depth** — both engines limit deep pagination; a large `maxResults` may return fewer items

Python 3.11, async httpx, BeautifulSoup + lxml, Apify SDK.

### Related Actors

- [Google News Scraper - News Articles by Keyword](https://apify.com/sweet_stickball/google-news-scraper) — Scrape Google News articles for any keyword: headlines, sources, publish dates, URLs and snippets.
- [Google Trends Scraper - Interest Over Time & Related Queries](https://apify.com/sweet_stickball/google-trends-scraper) — Scrape Google Trends: interest over time and related queries for up to 5 compared keywords, by country, time range and category.
- [Tech Stack Detector - Website Technology Lookup](https://apify.com/sweet_stickball/tech-stack-scanner) — Detect the tech stack of a website: CMS, frameworks, analytics, CDN, payment and hosting technologies, from HTTP headers, HTML, scripts and cookies.

# Actor input Schema

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

The search query to look up. Works exactly like typing into the Bing or DuckDuckGo search box.

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

Maximum number of search results to return. Each page of results contains ~10 results.

## `engine` (type: `string`):

Which search engine to use: 'ddg' (DuckDuckGo, default) or 'bing'.

## Actor input object example

```json
{
  "query": "web scraping best practices",
  "maxResults": 10,
  "engine": "ddg"
}
```

# Actor output Schema

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

Dataset items shown with the 'results' view.

# 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": "web scraping best practices",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("sweet_stickball/bing-ddg-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 = {
    "query": "web scraping best practices",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("sweet_stickball/bing-ddg-serp").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 '{
  "query": "web scraping best practices",
  "maxResults": 10
}' |
apify call sweet_stickball/bing-ddg-serp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sweet_stickball/bing-ddg-serp"
        }
    }
}
```

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/lAWrO8FmfT964ZbL1/builds/zBvt69zXCMnbGiImO/openapi.json
