{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Text Extractor",
    "description": "Extract visible text content from websites as structured JSON blocks. Supports multi-URL batch processing, header/footer/cookie exclusion, and optional form extraction. Perfect for content analysis and translation workflows.",
    "version": "0.0",
    "x-build-id": "vYoeWug3oc8rSVJSG"
  },
  "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": "Single URL to extract text from (useful for quick tests). You can also use startUrls for multi-page runs. Leave empty if you only use startUrls.",
            "default": ""
          },
          "startUrls": {
            "title": "URL List (Multiple URLs)",
            "type": "array",
            "description": "Liste d'URLs supplémentaires à traiter en masse dans un seul run (une URL par ligne). Les doublons et lignes vides sont ignorés. Utilisez ce champ pour traiter plusieurs pages en une seule exécution.",
            "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": "Exclude header and navigation elements. Compatible with WordPress, Shopify, Webflow, Drupal, Joomla and most CMS platforms. If this doesn't work for your site, use Exclude Selectors manually.",
            "default": false
          },
          "excludeFooter": {
            "title": "Exclude Footer",
            "type": "boolean",
            "description": "Exclude footer elements. Compatible with WordPress, Shopify, Webflow, Drupal, Joomla and most CMS platforms. If this doesn't work for your site, use Exclude Selectors manually.",
            "default": false
          },
          "excludeCookies": {
            "title": "Exclude Cookie Banners",
            "type": "boolean",
            "description": "Exclude cookie consent banners and GDPR notices. Compatible with Cookiebot, OneTrust, Iubenda and most cookie consent platforms.",
            "default": false
          },
          "extractForms": {
            "title": "Extract Forms",
            "type": "boolean",
            "description": "Extract form content (labels, placeholders, values). When disabled, form elements are excluded from extraction. When enabled, form content is extracted including labels, placeholders, and input values.",
            "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": "CSS selectors to specifically include. If empty, all visible text is extracted.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minTextLength": {
            "title": "Minimum Text Length",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum character length for text blocks to be included (default: 3)",
            "default": 3
          },
          "deduplicate": {
            "title": "Deduplicate Text",
            "type": "boolean",
            "description": "Remove duplicate text blocks (default: true)",
            "default": true
          },
          "waitForSelector": {
            "title": "Wait For Selector",
            "type": "string",
            "description": "Optional CSS selector to wait for before extraction (e.g., '.main-content')",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}