{
  "openapi": "3.0.1",
  "info": {
    "title": "DuckDuckGo Scraper By Keyword List & Rank Position",
    "description": "DuckDuckGo Scraper By Keyword List & Rank Position extracts DuckDuckGo search results for keyword lists, including titles, URLs, snippets, domains, rank positions, and search metadata. Ideal for SEO tracking, keyword research, competitor analysis, and SERP monitoring.",
    "version": "0.1",
    "x-build-id": "z5Vwuh2efK7eMxTb2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~duckduckgo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-duckduckgo-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/scrapio~duckduckgo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-duckduckgo-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/scrapio~duckduckgo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-duckduckgo-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": [
          "searchMode",
          "region",
          "safeSearch"
        ],
        "properties": {
          "searchKeyword": {
            "title": "🥇 First keyword",
            "type": "string",
            "description": "The first search term to rank-check. Search operators work too — site:example.com, filetype:pdf, inurl:, intitle: and \"exact phrase\" are all verified working. Leave it empty if you would rather put everything in the keyword list below."
          },
          "keywordList": {
            "title": "📝 More keywords (one per line)",
            "type": "array",
            "description": "Extra search terms run in the same job, one per line. Each keyword is searched with the same mode, region and safe-search settings, and every row records which keyword produced it in the `keyword` column. A full DuckDuckGo search URL (https://duckduckgo.com/?q=...&kl=de-de) is also accepted — the query is lifted out of it and the URL's own `kl` locale overrides the region for that keyword only. Duplicates are removed. Note: each keyword needs its own DuckDuckGo session, so a long list costs proportionally more and residential proxies are strongly recommended past a handful of terms.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchMode": {
            "title": "🎯 Result type",
            "enum": [
              "default",
              "news",
              "videos"
            ],
            "type": "string",
            "description": "Classic web links, news headlines, or videos. Positions are numbered the same way in all three.",
            "default": "default"
          },
          "region": {
            "title": "🌍 Search from",
            "enum": [
              "wt-wt",
              "ar-es",
              "au-en",
              "at-de",
              "be-fr",
              "be-nl",
              "br-pt",
              "bg-bg",
              "ca-en",
              "ca-fr",
              "ct-ca",
              "cl-es",
              "cn-zh",
              "co-es",
              "hr-hr",
              "cz-cs",
              "dk-da",
              "ee-et",
              "fi-fi",
              "fr-fr",
              "de-de",
              "gr-el",
              "hk-tzh",
              "hu-hu",
              "in-en",
              "id-en",
              "ie-en",
              "il-en",
              "it-it",
              "jp-jp",
              "kr-kr",
              "lv-lv",
              "lt-lt",
              "my-en",
              "mx-es",
              "nl-nl",
              "nz-en",
              "no-no",
              "pk-en",
              "pe-es",
              "ph-en",
              "pl-pl",
              "pt-pt",
              "ro-ro",
              "ru-ru",
              "xa-ar",
              "sg-en",
              "sk-sk",
              "sl-sl",
              "za-en",
              "es-ca",
              "es-es",
              "se-sv",
              "ch-de",
              "ch-fr",
              "tw-tzh",
              "th-en",
              "tr-tr",
              "us-en",
              "us-es",
              "ua-uk",
              "uk-en",
              "vn-en"
            ],
            "type": "string",
            "description": "Rankings genuinely differ per country — this is the locale DuckDuckGo searches from, sent as the `l` parameter. A position measured here is a position for THIS region only.",
            "default": "wt-wt"
          },
          "safeSearch": {
            "title": "🛡️ Safe search",
            "enum": [
              "OFF",
              "MODERATE",
              "STRICT"
            ],
            "type": "string",
            "description": "Sent to DuckDuckGo as the `p` filter parameter. STRICT is measurably enforced — an adult keyword returns 0 rows under STRICT and 10 rows under OFF. MODERATE and OFF returned the same web hosts in testing, so treat MODERATE as best-effort.",
            "default": "OFF"
          },
          "includePosition": {
            "title": "#️⃣ Number the results",
            "type": "boolean",
            "description": "Adds three columns: `position` (1-indexed, continued across pages, counted after duplicate URLs are removed — DuckDuckGo really does repeat a result or two between page 1 and page 2), `pageNumber`, and `positionOnPage`. Turn it off and the three columns are dropped entirely rather than filled with nulls.",
            "default": true
          },
          "watchDomains": {
            "title": "👀 Domains to watch",
            "type": "array",
            "description": "Hostnames you care about. Enter them bare (example.com), with www., or as a full URL — all three are normalised the same way. Every row gets `isWatchedDomain` and `matchedWatchDomain`, so 'did we show up for this keyword' is a column and not a manual read. The per-keyword best position for each domain is also written to the RANK_SUMMARY record in the run's key-value store.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyWatchedDomains": {
            "title": "🎯 Save only watched rows",
            "type": "boolean",
            "description": "Push only the results that landed on a watched domain. Positions still show the real SERP position, so a row can legitimately come back as position 7 with nothing above it in the dataset. With this on, 'Max results' counts results LOOKED AT rather than results saved — otherwise the actor would keep paging forever on a keyword you never rank for. Leave it off to keep the whole list and see who outranked you.",
            "default": false
          },
          "matchSubdomains": {
            "title": "🌿 Count subdomains as a match",
            "type": "boolean",
            "description": "On: blog.example.com and docs.example.com match a watch entry of example.com. Off: only the exact host matches (www. is ignored either way).",
            "default": true
          },
          "maxItems": {
            "title": "📊 Max results per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on results per keyword (1–1000), not per run — a 5-keyword job at 20 can therefore save up to 100 rows. This is authoritative: the actor keeps paginating until it reaches this number, hits the optional page cap below, or DuckDuckGo runs out. Duplicate URLs across pages are skipped and do not count.",
            "default": 20
          },
          "endPage": {
            "title": "📄 Page cap per keyword (optional)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Optional extra ceiling on how many result pages to fetch for each keyword (0 = no page cap, which is the default; Max results alone decides). Page sizes: web 10, news ~30, videos ~60 rows.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. When off, the actor starts direct and automatically escalates to Apify datacenter and then residential proxies if DuckDuckGo blocks an exit IP. Every keyword opens a fresh DuckDuckGo session, so residential is strongly recommended once the keyword list grows past a handful."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}