{
  "openapi": "3.0.1",
  "info": {
    "title": "Stealth Web Scraper - HTML, Text & Contact Data",
    "description": "Extract text, HTML, CSS-selected fields and public contact details from supplied web pages across countries. Pay per successful page row plus a small start fee.",
    "version": "0.3",
    "x-build-id": "uqo5gFvvSiflqfI9x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~stealth-web-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-stealth-web-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/lentic_clockss~stealth-web-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-stealth-web-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/lentic_clockss~stealth-web-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-stealth-web-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",
        "properties": {
          "urls": {
            "title": "Input URLs (one row per URL)",
            "minItems": 1,
            "maxItems": 40,
            "type": "array",
            "description": "Enter 1 to 40 full public HTTP or HTTPS URLs. Each unique URL produces at most one successful row; duplicates are removed. Empty input uses three example pages at normal prices. Private-network and localhost URLs are rejected.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per URL",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum rows per input URL, default 70. Each URL produces at most one page row, so any value of 1 or more gives the same limit; reduce the number of URLs to make the whole run smaller.",
            "default": 70
          },
          "extractSelectors": {
            "title": "CSS selectors to extract",
            "type": "object",
            "description": "Map your field names to CSS selectors, for example {\"heading\":\"h1\",\"price\":\".price\"}. Values appear in extracted; matching several elements returns a list. Leave empty for page content and available contact attributes.",
            "default": {}
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "html",
              "text",
              "both"
            ],
            "type": "string",
            "description": "Choose whether to return rendered HTML, plain text, or both.",
            "default": "text"
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Optional CSS selector that must appear before extraction. If it is not found, the page goes to the failures dataset without a successful-row charge."
          },
          "maxConcurrency": {
            "title": "Pages processed together",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Requested number of pages to process at the same time, from 1 to 4. The Actor may reduce this number when capacity is limited.",
            "default": 3
          },
          "pageTimeout": {
            "title": "Page timeout (seconds)",
            "minimum": 30,
            "maximum": 120,
            "type": "integer",
            "description": "Page-loading allowance in seconds, from 30 to 120. This is separate from the overall run timeout, which defaults to 900 seconds.",
            "default": 45
          },
          "proxyGroup": {
            "title": "Connection preference",
            "enum": [
              "auto",
              "RESIDENTIAL",
              "BUYPROXIES94952"
            ],
            "type": "string",
            "description": "Optional connection preference. Leave the default unchanged for normal use; a preference does not guarantee availability.",
            "default": "RESIDENTIAL"
          },
          "proxyCountry": {
            "title": "Country hint",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Optional two-letter country hint, such as us, gb or de. Leave empty to use the default location; availability varies by page."
          },
          "provider": {
            "title": "Developer testing option",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Optional cookie objects with name and value, plus applicable URL or domain and path fields. Use only cookies you are authorized to supply; leave empty for normal public-page runs.",
            "items": {
              "type": "object"
            }
          },
          "headers": {
            "title": "Extra HTTP headers",
            "type": "object",
            "description": "Optional object mapping request header names to string values. Leave empty unless a public page needs a specific header."
          },
          "gotoWaitUntil": {
            "title": "Page loading milestone",
            "enum": [
              "commit",
              "domcontentloaded",
              "load",
              "networkidle"
            ],
            "type": "string",
            "description": "Choose when navigation is considered ready: commit, domcontentloaded, load or networkidle. The default is domcontentloaded; waitForSelector can require a specific element.",
            "default": "domcontentloaded"
          },
          "blockResources": {
            "title": "Block heavy resources",
            "type": "boolean",
            "description": "Skip images, fonts and media where supported. This can reduce page loading, but may affect completeness on pages that depend on those resources.",
            "default": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}