SE::DuckDuckGo - DuckDuckGo Search Engine Scraper

Scraper overview
A scraper for DuckDuckGo search results. Thanks to the DuckDuckGo scraper, you can obtain large databases of links ready for further use. You can use queries in the same format as you enter them in the DuckDuckGo search bar, including search operators (intitle, inurl, site, etc.). More details on the official DuckDuckGo Search Syntax page.
A-Parser functionality allows you to save DuckDuckGo scraper settings for future use (presets), set scraping schedules, and much more. You can use automatic query multiplication, substitution of subqueries from files, brute-forcing of alphanumeric combinations and lists to obtain the maximum possible number of results.
Saving results is possible in the form and structure you need, thanks to the built-in powerful Template Toolkit template engine, which allows applying additional logic to results and outputting data in various formats, including JSON, SQL, and CSV.
Collected data
- Links, anchors, and snippets from search results (
$serp.$i.link,$serp.$i.anchor,$serp.$i.snippet) - Links, visible links, anchors, snippets, domain, and ad position from advertising results (
$ads.$i.domain,$ads.$i.link,$ads.$i.visiblelink,$ads.$i.anchor,$ads.$i.snippet,$ads.$i.position,$ads.$i.page) - List of related keywords (
$related.$i.key)

Capabilities
- Support for all DuckDuckGo search operators (intitle:, inurl:, site:, etc.). More details about search operators on the official DuckDuckGo Search Syntax page
- Specification of the number of pages (from 1 to 10)
- In addition to organic results, ad blocks and related keywords are collected
- Ability to scrape by a selected region (Region option) and specify the results language (Language option)
- Ability to enable safe search (Safe search option) and limit results by time (Serp time option)
- Automatic switch to the built-in browser if DuckDuckGo does not return results data via HTTP
Use Cases
- Collecting link databases - for A-Poster, XRumer, AllSubmitter, etc.
- Checking website indexing
- Searching for backlinks (mentions) of websites
- Any other options involving DuckDuckGo scraping in one form or another
Queries
You should specify search phrases as queries, for example:
Football
test
site:a-parser.com
scraper site:a-parser.com
test -site:tests.com
IoT filetype:pdf
Query substitutions
You can use built-in macros for query multiplication; for example, if we want to get a very large database of forums, we specify several main queries in different languages:
forum
forum
foro
论坛
In the query format, we specify a character brute-force from a to zzzz; this method allows for maximum rotation of search results and obtaining many new unique results:
$query {az:a:zzzz}
This macro will create 475254 additional queries for each original search query, which in total will give 4 x 475254 = 1901016 search queries—an impressive figure, but no problem at all for A-Parser. At a speed of 2000 queries per minute, such a task will be processed in just 16 hours.
Using operators
You can use search operators in the query format, so they will be automatically added to each query from your list:
site:$query
Output results examples
A-Parser supports flexible result formatting thanks to the built-in Template Toolkit template engine, which allows it to output results in any form, as well as in structured formats like CSV or JSON.
Link list export
Links + anchors + snippets with position output
Outputting links, anchors, and snippets to a CSV table
Saving related keywords
Outputting ad blocks
Saving in SQL format
Result dump to JSON
Results processing
A-Parser allows processing results directly during scraping; in this section, we have listed the most popular cases for the DuckDuckGo scraper.
Link deduplication
Link deduplication by domain
Extracting domains
Removing tags from anchors and snippets
Filtering links by inclusion
Possible settings
| Parameter name | Default value | Description |
|---|---|---|
| Pages count | 5 | Maximum SERP pages (1–10). Scraping may finish earlier if the results end |
| Region | US (English) | Selection of the search region |
| Language | English (United States) | Selection of the search language |
| Safe search | Moderate | Safe search |
| Serp time | Any time | Search period |
| Max parallel browsers | 10 | How many tasks can simultaneously use the built-in browser. A waiting message appears in the log when waiting for a free slot |