{
  "openapi": "3.0.1",
  "info": {
    "title": "DuckDuckGo Scraper: Web, News, Images & Videos",
    "description": "Search DuckDuckGo across web, news, images and videos in one run, with a single flat record shape for all four: title, URL, domain, snippet and rank, plus dimensions, durations and publish dates where they exist. Sponsored rows are labelled, never sold as organic.",
    "version": "0.0",
    "x-build-id": "gdIKscPzHOxaAFiyX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arman-bd~duckduckgo-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arman-bd-duckduckgo-search-scraper",
        "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/arman-bd~duckduckgo-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-arman-bd-duckduckgo-search-scraper",
        "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/arman-bd~duckduckgo-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-arman-bd-duckduckgo-search-scraper",
        "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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "What you would type into the search box, one per line. Operators work: \"quoted phrase\", site:reuters.com, intitle:changelog, -excluded, a OR b. Each query is searched independently on every vertical you select.",
            "items": {
              "type": "string"
            }
          },
          "verticals": {
            "title": "Verticals to search",
            "type": "array",
            "description": "Which surfaces to search. Every selected vertical runs for every query and returns the same flat record shape, so four verticals for one query is one table you can filter rather than four exports to join. Images return roughly 95 rows per request and videos roughly 58, so adding them multiplies the row count.",
            "items": {
              "type": "string",
              "enum": [
                "web",
                "news",
                "images",
                "videos"
              ],
              "enumTitles": [
                "Web results",
                "News articles",
                "Images",
                "Videos"
              ]
            },
            "default": [
              "web"
            ]
          },
          "maxResultsPerVertical": {
            "title": "Max results per query, per vertical",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on results for each query on each vertical. Four verticals at 50 is up to 200 rows for a single query. This is the main cost control, since charging is per result.",
            "default": 50
          },
          "region": {
            "title": "Region and language",
            "enum": [
              "us-en",
              "ar-es",
              "au-en",
              "at-de",
              "be-fr",
              "be-nl",
              "br-pt",
              "ca-en",
              "ca-fr",
              "cl-es",
              "cn-zh",
              "dk-da",
              "fi-fi",
              "fr-fr",
              "de-de",
              "hk-tzh",
              "in-en",
              "id-en",
              "ie-en",
              "it-it",
              "jp-jp",
              "kr-kr",
              "my-en",
              "mx-es",
              "nl-nl",
              "nz-en",
              "ph-en",
              "pl-pl",
              "pt-pt",
              "ru-ru",
              "xa-ar",
              "sg-en",
              "za-en",
              "es-es",
              "se-sv",
              "ch-de",
              "ch-fr",
              "tw-tzh",
              "tr-tr",
              "uk-en",
              "us-es"
            ],
            "type": "string",
            "description": "Locale for the news, images and videos verticals. On news it decides which country's outlets answer. On images and videos it reorders the results rather than translating them, so expect a different set in the same language. The web vertical is not region-targetable and ignores this entirely: web rows carry region: null so a row never claims a targeting it did not get. Only locales that were verified to return their own country's news are listed.",
            "default": "us-en"
          },
          "timeRange": {
            "title": "Recency (web only)",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Restrict the web vertical to recently published pages. It measurably changes which results come back, but the web surface publishes no per-row date, so no row can show you which window it came from — publishedAt stays null on web either way. It does not apply to news, images or videos.",
            "default": "any"
          },
          "includeSponsored": {
            "title": "Keep advertising rows",
            "type": "boolean",
            "description": "Advertising rows sit in the same list as ranked results upstream. Off by default they are excluded and never charged for; on, they are kept and flagged isSponsored: true with position: null. They are never numbered alongside organic results either way — the organic rows are ranked 1, 2, 3... whichever way you set this — because an ad counted as rank 3 corrupts every ranking built on the output.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default, and a short web run does not need it. Turn it on for the web vertical whenever a run wants more than about six web pages in total: without rotation a run gets roughly six before the source stops answering, that does not clear inside the run, and the allowance belongs to the run rather than to each query, so a long query list spends it on the first few and the rest come back with no web rows. News, images and videos are unaffected either way, so an images-only or videos-only run never needs this at any depth or query count.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}