Search DDG

Posted by @nahumck, Last update over 1 year ago

Search on DuckDuckGo with an optional !bang parameter.

!bangs can be found at:


  • script

    //DDG Search (w/ !bangs)
    var content = draft.processTemplate("[[selection]]")
    var p = Prompt.create();
    p.title = "Enter search and optional !bang";
    p.addTextField("search", "Search", content);
    p.addTextField("bang", "!bang", "", {placeholder:"eg. !g, !images, etc."});
    var con =;
    if (con) {
      var input = p.fieldValues["search"];
      var output = encodeURIComponent(input);
      var bang = p.fieldValues["bang"];
      if (bang == "") {	
        var searchBang = "!ddg";}
      else {
        var searchBang = bang;
      var url = ""+searchBang+"%20"+output;
      var result = app.openURL(url, true);
    else {


  • After Success Default
    Notification Info
    Log Level Info
Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.