{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Text Extractor - Webpage Content to Ordered Text Blocks",
    "description": "Extract the visible text of any web page as numbered blocks in DOM order, each carrying its HTML tag. One JSON item per URL: page title, every text block, per-page counts. Batch several URLs in one run, optionally drop headers, footers and cookie banners. For translation, migration and copy audits.",
    "version": "0.0",
    "x-build-id": "t2ht4LM6gxTiUGQOt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smart-digital~website-content-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smart-digital-website-content-text-extractor",
        "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/smart-digital~website-content-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-smart-digital-website-content-text-extractor",
        "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/smart-digital~website-content-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-smart-digital-website-content-text-extractor",
        "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": {
          "startUrl": {
            "title": "Start URL",
            "type": "string",
            "description": "One page to extract. Leave https://example.com in place if you only use the URL list: as soon as you give your own URLs, example.com is left out and not charged.",
            "default": "https://example.com"
          },
          "startUrls": {
            "title": "URL List (Multiple URLs)",
            "type": "array",
            "description": "More pages to extract in the same run, one URL per line. Duplicates, empty lines and variants of one address (a trailing slash, a #fragment) are opened and charged once.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "viewportType": {
            "title": "Viewport Type",
            "enum": [
              "desktop",
              "mobile",
              "tablet",
              "custom"
            ],
            "type": "string",
            "description": "Choose a predefined viewport size or use custom dimensions",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport Width (Custom)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Custom viewport width in pixels (only used when Viewport Type is 'custom')",
            "default": 1920
          },
          "viewportHeight": {
            "title": "Viewport Height (Custom)",
            "minimum": 568,
            "maximum": 2160,
            "type": "integer",
            "description": "Custom viewport height in pixels (only used when Viewport Type is 'custom')",
            "default": 1080
          },
          "excludeHeader": {
            "title": "Exclude Header",
            "type": "boolean",
            "description": "Hide headers and navigation: header and nav elements, navigation landmarks, the header regions of WordPress, Elementor, Shopify, Drupal and Joomla, and any element whose class or id contains 'header'. Navigation placed inside the content (a related-links box, a table of contents) goes too: use Exclude Selectors instead when it matters.",
            "default": false
          },
          "excludeFooter": {
            "title": "Exclude Footer",
            "type": "boolean",
            "description": "Hide footers: footer elements, the footer regions of WordPress, Elementor, Shopify and Drupal, and any element whose class or id contains 'footer'. If it hides too much or too little, use Exclude Selectors.",
            "default": false
          },
          "excludeCookies": {
            "title": "Exclude Cookie Banners",
            "type": "boolean",
            "description": "Hide cookie consent banners: Cookiebot, OneTrust, Iubenda, Didomi, Quantcast, TrustArc, Cookie Notice, cookieconsent, and elements named as cookie or GDPR banners.",
            "default": false
          },
          "extractForms": {
            "title": "Extract Forms",
            "type": "boolean",
            "description": "Read form fields. Off: fields, dropdowns and their labels are skipped, and the rest of a form is read like any other text (a heading, a price, a button, or a whole page that DNN, SharePoint or ASP.NET Web Forms wraps in one form). On: labels are read too, each field gives its aria-label, placeholder and current value, and each dropdown option is a block of its own. To leave a form out entirely, add form to Exclude Selectors.",
            "default": false
          },
          "excludeSelectors": {
            "title": "Exclude Selectors",
            "type": "array",
            "description": "Additional CSS selectors for custom elements to exclude. Use this if Exclude Header/Footer options don't work for your site structure.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeSelectors": {
            "title": "Include Selectors",
            "type": "array",
            "description": "Read only inside these CSS selectors, for example article or main. With several selectors, blocks come selector by selector. If empty, the whole page is read.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minTextLength": {
            "title": "Minimum Text Length",
            "minimum": 0,
            "type": "integer",
            "description": "Shortest block kept, in characters (default: 3). Set it to 1 to keep every block that holds a character.",
            "default": 3
          },
          "deduplicate": {
            "title": "Deduplicate Text",
            "type": "boolean",
            "description": "Drop a block whose text, ignoring case, already appeared on the same page (default: true). Turn it off to keep every occurrence.",
            "default": true
          },
          "waitForSelector": {
            "title": "Wait For Selector",
            "type": "string",
            "description": "Optional CSS selector to wait for before reading the page (e.g., '.main-content'). If it never appears, the page is read anyway.",
            "default": ""
          },
          "waitTimeout": {
            "title": "Wait Timeout",
            "minimum": 1000,
            "type": "integer",
            "description": "Timeout in milliseconds for waiting for selector (default: 30000)",
            "default": 30000
          },
          "removeEmptyBlocks": {
            "title": "Remove Empty Blocks",
            "type": "boolean",
            "description": "Remove empty or whitespace-only text blocks (default: true)",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}