{
  "openapi": "3.0.1",
  "info": {
    "title": "web-content-extractor",
    "description": "HTTP-first web scraper without proxy by default. Returns clean article text, SEO metadata, and headings. Apify Proxy and Playwright used only as fallback. No-code friendly JSON output for Make, n8n, and Zapier",
    "version": "0.0",
    "x-build-id": "JSnvbGNUmT4cQSOwm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/morph_coder~web-content-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-morph_coder-web-content-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/morph_coder~web-content-extractor/runs": {
      "post": {
        "operationId": "runs-sync-morph_coder-web-content-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/morph_coder~web-content-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-morph_coder-web-content-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs to scrape",
            "type": "array",
            "description": "List of direct page URLs. Social network URLs are returned as blocked_social without scraping.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "json",
              "text",
              "markdown"
            ],
            "type": "string",
            "description": "json: plain text content + SEO fields (best for Make/n8n). text: minimal fields. markdown: markdown content + SEO fields.",
            "default": "json"
          },
          "useProxyFallback": {
            "title": "Use proxy fallback",
            "type": "boolean",
            "description": "When the direct HTTP request fails (403, block page, timeout), retry with Apify Proxy before Playwright.",
            "default": true
          },
          "country": {
            "title": "Proxy country (ISO code)",
            "type": "string",
            "description": "Two-letter country code for Apify proxy geolocation — used only on proxy fallback steps (e.g. US, DE, UA).",
            "default": "US"
          },
          "proxyType": {
            "title": "Proxy type",
            "enum": [
              "RESIDENTIAL",
              "DATACENTER"
            ],
            "type": "string",
            "description": "Apify proxy group — used only on proxy fallback steps.",
            "default": "RESIDENTIAL"
          },
          "usePlaywrightFallback": {
            "title": "Use Playwright fallback",
            "type": "boolean",
            "description": "Retry thin or JS-rendered pages with headless Chrome.",
            "default": true
          },
          "minContentLength": {
            "title": "Minimum content length",
            "minimum": 50,
            "type": "integer",
            "description": "Extracted text shorter than this triggers Playwright fallback (if enabled).",
            "default": 200
          },
          "batchSize": {
            "title": "Internal batch size",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Number of URLs processed per wave (memory control).",
            "default": 50
          },
          "maxUrls": {
            "title": "Maximum URLs",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on URLs accepted per run.",
            "default": 1000
          },
          "extractExternalLinks": {
            "title": "Extract external links",
            "type": "boolean",
            "description": "One sample URL per external domain, filtered for brand/leak checks. Off by default.",
            "default": false
          },
          "maxExternalLinks": {
            "title": "Max external domains per page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on unique outbound domains when extractExternalLinks is true.",
            "default": 100
          },
          "blockHeavyResources": {
            "title": "Block heavy Playwright resources",
            "type": "boolean",
            "description": "When Playwright fallback runs, block images and web fonts via Firefox prefs to cut proxy bandwidth. Scripts, XHR, CSS, and documents still load (needed for antibot). Does not use page.route (which can trip WAFs on Camoufox). Turn off if a site fails only with this enabled.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}