Skip to content
pubscout

ddgs

0.3.3, released 7 days ago by kamranx.dev

Aggregates web search results from multiple search engines including DuckDuckGo, Google, and Bing.

WASM-ready
$ flutter pub add ddgs
Source repository

What it does

A professional metasearch library that queries multiple search engines and provides text, image, video, and news search capabilities. It supports result caching, rate limiting, proxy configuration, and includes a command-line interface.

AI-written summary of version 0.3.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to fetch search results programmatically from engines like DuckDuckGo, Google, or Bing
  • You require features like result caching, rate limiting, and proxy support for search queries

Skip it when

  • You are looking for an official API client for a single search engine's paid web-search developer service
  • You need high-volume automated scraping where search engines might apply strict anti-bot measures

Strengths

  • Supports multiple search engines and specialized search types (text, images, videos, news)
  • Includes built-in result caching, rate limiting, and proxy support
  • Provides both a Dart library API and a command-line interface

Weaknesses

  • Search engines may implement anti-scraping measures causing potential flakiness
  • Relying on web scraping can break if search engine HTML structures change

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
4

not documented

import 'package:ddgs/ddgs.dart';

void main() async {
  final ddgs = DDGS();

  try {
    final results = await ddgs.text(
      'Dart programming',
      maxResults: 5,
      backend: 'duckduckgo',
    );
    
    for (final result in results) {
      print('${result['title']}: ${result['href']}');
    }
  } finally {
    ddgs.close();
  }
}

Alternatives

Packages that do the same job and could replace ddgs.

  • dio

    If you need a robust HTTP client with advanced interceptors and global configuration for handling web requests.

Works with

Packages commonly used together with ddgs: ones it builds on, ones built on it, and its own family.