{
  "openapi": "3.0.1",
  "info": {
    "title": "Web Page Reader - Clean Text, Markdown and Links",
    "description": "Read public web pages into clean text and Markdown with links, metadata and JSON-LD. HTTP first, headless browser only when the page needs JavaScript. One result per URL, failures included.",
    "version": "0.0",
    "x-build-id": "YaLeJKAF9jUaeQsjd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leadproof~web-page-reader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leadproof-web-page-reader",
        "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/leadproof~web-page-reader/runs": {
      "post": {
        "operationId": "runs-sync-leadproof-web-page-reader",
        "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/leadproof~web-page-reader/run-sync": {
      "post": {
        "operationId": "run-sync-leadproof-web-page-reader",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "maxItems": 5000,
            "type": "array",
            "description": "Pages to read: strings or objects {\"url\": \"...\", \"id\": \"your-row-id\"}. Up to 5,000 per run. Repeated URLs are read once and returned once per row, each with its own inputId, and charged once. The example reads one static page and one JavaScript-rendered page."
          },
          "renderMode": {
            "title": "Render mode",
            "enum": [
              "auto",
              "http",
              "browser"
            ],
            "type": "string",
            "description": "auto: plain HTTP first, headless browser only when the page is a JavaScript shell, has almost no text, or answers with a bot challenge. http: never start a browser (cheapest). browser: always render in Chromium.",
            "default": "auto"
          },
          "contentScope": {
            "title": "Content scope",
            "enum": [
              "auto",
              "main",
              "page"
            ],
            "type": "string",
            "description": "auto: main content, widened to header/footer when the main region is nearly empty (short contact pages). main: main content only. page: whole page minus navigation and cookie banners (keeps footer contact details).",
            "default": "auto"
          },
          "includeHtml": {
            "title": "Include HTML",
            "type": "boolean",
            "description": "Add the fetched or rendered HTML to each result, cut at the HTML size limit. Off by default: it makes results much larger.",
            "default": false
          },
          "maxHtmlKb": {
            "title": "HTML size limit (KB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum size of the html field when Include HTML is on.",
            "default": 1000
          },
          "maxLinks": {
            "title": "Maximum links per page",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Unique links kept per page (navigation included). 0 returns an empty list.",
            "default": 1000
          },
          "maxContentChars": {
            "title": "Text limit per page (characters)",
            "minimum": 1000,
            "maximum": 5000000,
            "type": "integer",
            "description": "text and markdown are each cut at this length (status partial, warning text_truncated). Records are also kept under the 9 MB dataset item limit.",
            "default": 1000000
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages read at the same time across all hosts.",
            "default": 5
          },
          "maxBrowserConcurrency": {
            "title": "Browser pages in parallel",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Browser tabs open at the same time. Each needs roughly 150-300 MB of memory.",
            "default": 2
          },
          "maxConcurrencyPerHost": {
            "title": "Parallel requests per host",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Politeness limit for pages on the same host name.",
            "default": 2
          },
          "hostDelayMs": {
            "title": "Delay between requests to one host (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum time between request starts on the same host name.",
            "default": 250
          },
          "pageTimeoutSecs": {
            "title": "Page time limit (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Wall-clock limit per page, HTTP and browser attempts included.",
            "default": 45
          },
          "maxPageSizeKb": {
            "title": "Page size limit (KB)",
            "minimum": 10,
            "maximum": 20000,
            "type": "integer",
            "description": "Larger documents are truncated and returned with status partial.",
            "default": 5000
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Redirect hops per page (meta refresh included).",
            "default": 5
          },
          "minTextLength": {
            "title": "Browser fallback text threshold",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Auto mode: an HTTP result with less extracted text than this (in characters) is retried in the browser.",
            "default": 100
          },
          "browserFallbackOnChallenge": {
            "title": "Try the browser on bot challenges",
            "type": "boolean",
            "description": "Auto mode: when the HTTP response is a bot challenge page, try once in the browser. It does not solve CAPTCHAs.",
            "default": true
          },
          "removeSelectors": {
            "title": "Extra CSS selectors to remove",
            "maxItems": 50,
            "type": "array",
            "description": "Elements removed before extraction, in addition to scripts, navigation and cookie banners.",
            "items": {
              "type": "string"
            }
          },
          "acceptLanguage": {
            "title": "Accept-Language",
            "type": "string",
            "description": "Language preference sent to sites.",
            "default": "en-US,en;q=0.9"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}