{
  "openapi": "3.0.1",
  "info": {
    "title": "Web Search Results API — Bing & DuckDuckGo SERP, No Key",
    "description": "Run a list of queries against DuckDuckGo and Bing and get organic search results in one schema: title, real destination URL, display URL, snippet, position and page. A relevance guard suppresses pages of unrelated results and never bills for them. No API key, no headless browser, no Google.",
    "version": "0.1",
    "x-build-id": "esPdVU3RZahalnCyu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insight.solutions~web-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insight.solutions-web-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/insight.solutions~web-search-api/runs": {
      "post": {
        "operationId": "runs-sync-insight.solutions-web-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/insight.solutions~web-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-insight.solutions-web-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "The search strings to run, one per line, up to 200 per run. Trimmed, emptied entries dropped, duplicates removed case-insensitively. A URL typed in here is still just a search string — this Actor searches, it does not fetch pages.",
            "default": [
              "web scraping tools"
            ],
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "Engines",
            "type": "array",
            "description": "Which search engines to read, in the order they should be tried. DuckDuckGo is first by default: in our measurements it answered every query with results that matched it, while Bing answered proxied requests with a full page of unrelated links most of the time. When both are selected the same URL found by both is returned once, with the second engine named in `alsoOn`. Google is not available and is not scraped by this Actor.",
            "items": {
              "type": "string",
              "enum": [
                "duckduckgo",
                "bing"
              ],
              "enumTitles": [
                "DuckDuckGo",
                "Bing"
              ]
            },
            "default": [
              "duckduckgo",
              "bing"
            ]
          },
          "maxResultsPerQuery": {
            "title": "Results per query, per engine",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many organic results to return for each query from each engine, 1 to 50. Bing serves 10 per page and is paged by following the search page's own Next link; DuckDuckGo returns 8 to 10 and this version reads one page per query. Ask for 50 with both engines on and you get up to 50 from Bing plus up to 10 from DuckDuckGo, minus any duplicate. The free summary row tells you exactly what you got and why it stopped.",
            "default": 10
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code for Bing's market (`cc`), for example `US`, `GB`, `DE`. Verified to set the market and the interface language; whether it changes the result set is not something our captures could prove. An unknown code is reported as a free diagnostic row and the run continues with US.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Bing's interface language (`setlang`), for example `en`, `de`, `fr`. Verified: it changes the page language, the result-count wording and the title suffix.",
            "default": "en"
          },
          "region": {
            "title": "DuckDuckGo region",
            "type": "string",
            "description": "DuckDuckGo's region (`kl`), written country-first: `us-en`, `de-de`, `uk-en`, `wt-wt` for worldwide. Leave it empty and the country and language above are combined into one — `US` + `en` becomes `us-en`. Clear the country as well and DuckDuckGo decides by the exit IP, which is how a German exit answers an English query with German pages.",
            "default": ""
          },
          "safeSearch": {
            "title": "Safe search",
            "enum": [
              "off",
              "moderate",
              "strict"
            ],
            "type": "string",
            "description": "Best-effort, and not verified against a capture: `moderate` sends nothing (both engines' own default), `off` and `strict` add Bing's `adlt` and DuckDuckGo's `kp` parameter. The value you asked for is recorded on every summary row so you can check what a run was told to do.",
            "default": "moderate"
          },
          "deduplicate": {
            "title": "Drop duplicate URLs",
            "type": "boolean",
            "description": "When both engines return the same page for one query, return it once — from the engine you listed first — and name the other in `alsoOn`. The dropped copy is never charged. URLs are compared with the host lower-cased, `www.` and a trailing slash removed and click ids such as `msockid` and `utm_*` stripped.",
            "default": true
          },
          "relevanceGuard": {
            "title": "Relevance guard",
            "enum": [
              "on",
              "flag-only",
              "off"
            ],
            "type": "string",
            "description": "Bing sometimes answers a proxied request with a full page of well-formed results that have nothing to do with your query. `on` detects that, retries the page once from a residential exit, and if it still does not match returns a free diagnostic row and charges you nothing for it. `flag-only` returns and charges those rows with `relevanceVerdict: \"decoy\"` on them, for semantic queries that legitimately share no word with their answers. `off` does no scoring at all.",
            "default": "on"
          },
          "ddgDeepPaging": {
            "title": "DuckDuckGo deep paging (unverified)",
            "type": "boolean",
            "description": "Advanced, and unverified. DuckDuckGo's second page is requested with the values read from the search page's own Next form and nothing else. In our captures every attempt at a second page came back empty, renumbered or behind a CAPTCHA, so this is off by default; when it is on, repeated results are dropped and never charged, and paging stops at the first page that adds nothing.",
            "default": false
          },
          "residentialFallback": {
            "title": "Residential retry",
            "type": "boolean",
            "description": "Allow one retry through a residential exit when Bing answers with a page of unrelated results. One page, one request, at most once per query — residential transfer costs forty times datacenter transfer, so it is used deliberately and never for a whole run.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Queries in flight",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many queries to search at once, 1 to 10. Each query gets its own proxy session, so four in flight means four exit IPs each making at most one DuckDuckGo request every two seconds.",
            "default": 4
          },
          "maxRunSecs": {
            "title": "Time budget (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Stop the run after this many seconds, 30 to 3600. Results already returned are kept, and the queries that were not reached get a free `timeout` diagnostic row.",
            "default": 240
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy settings. The datacenter default is right for DuckDuckGo, which answered every datacenter request in our measurements with results that matched the query. Bing was materially more reliable from residential exits: if you need Bing specifically, set `{\"useApifyProxy\": true, \"apifyProxyGroups\": [\"RESIDENTIAL\"], \"apifyProxyCountry\": \"US\"}`.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}