{
  "openapi": "3.0.1",
  "info": {
    "title": "Webpage Content Scraper to Markdown",
    "description": "Focus on cost, Scrape any webpage content into LLM-ready Markdown for RAG. Uses a smart hybrid 6 tier engine: Apify for crawling + Cloudflare Browser API Rendering for perfect extraction. Automatically saves costs by detecting native markdown support.",
    "version": "0.1",
    "x-build-id": "s45njdOPyPucG1vLS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/riisager~tulabot-cloudflare-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-riisager-tulabot-cloudflare-markdown",
        "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/riisager~tulabot-cloudflare-markdown/runs": {
      "post": {
        "operationId": "runs-sync-riisager-tulabot-cloudflare-markdown",
        "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/riisager~tulabot-cloudflare-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-riisager-tulabot-cloudflare-markdown",
        "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": [
          "startUrls",
          "cfAccountId",
          "cfApiToken"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs (Batch or Single)",
            "type": "array",
            "description": "Enter the URLs you want to scrape or crawl. You can also upload a text file with a list of URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "cfAccountId": {
            "title": "Cloudflare Account ID",
            "type": "string",
            "description": "Your Cloudflare Account ID found in the dashboard."
          },
          "customUserAgent": {
            "title": "Custom User-Agent",
            "type": "string",
            "description": "Optional: Supply a custom User-Agent string to bypass specific blocks. If left empty, the Actor will use the default browser User-Agent."
          },
          "cfApiToken": {
            "title": "Cloudflare API Token",
            "type": "string",
            "description": "Your Cloudflare API Token with Browser Rendering permissions."
          },
          "crawlingEnabled": {
            "title": "Enable Website Crawling",
            "type": "boolean",
            "description": "If enabled, the actor will follow links on the same domain.",
            "default": false
          },
          "maxDepth": {
            "title": "Max Crawl Depth",
            "type": "integer",
            "description": "Depth of links to follow from the start URLs.",
            "default": 1
          },
          "excludeCss": {
            "title": "Block CSS/Images (Faster)",
            "type": "boolean",
            "description": "If true, blocks CSS, images, and fonts to speed up crawling.",
            "default": true
          },
          "enableTier0FileRouting": {
            "title": "Enable Tier 0 (File Routing)",
            "type": "boolean",
            "description": "Automatically detect and extract content from PDFs, Word, Excel, PPTX, CSV, JSON, and XML files.",
            "default": true
          },
          "enableSafeGuard": {
            "title": "Enable Safe-Guard (Skip Binaries)",
            "type": "boolean",
            "description": "Recommended: Instantly skip heavy/binary files (images, video, archives) to save compute and avoid crashes.",
            "default": true
          },
          "enableTier1Native": {
            "title": "Enable Tier 1 (Native Markdown)",
            "type": "boolean",
            "description": "Attempt to fetch native markdown from the server first (Fastest & Free).",
            "default": true
          },
          "enableTier2Local": {
            "title": "Enable Tier 2 (Local Readability)",
            "type": "boolean",
            "description": "Attempt to extract markdown locally using Mozilla Readability (Free & Fast).",
            "default": true
          },
          "enableTier3Cloudflare": {
            "title": "Enable Tier 3 (Cloudflare Browser)",
            "type": "boolean",
            "description": "Use Cloudflare Browser Rendering if local extraction fails (Premium & High Quality).",
            "default": true
          },
          "enableTier4Apify": {
            "title": "Enable Tier 4 (Apify Browser)",
            "type": "boolean",
            "description": "Use Apify Headless Browser + Proxy as ultimate fallback if Cloudflare fails (Robust but uses more RAM).",
            "default": true
          },
          "enableTier5Stealth": {
            "title": "Enable Tier 5 (Stealth Browser + Residential Proxy)",
            "type": "boolean",
            "description": "Premium Anti-Bot Bypass: Uses Puppeteer Stealth. WARNING: You MUST configure Residential Proxies in the Proxy Configuration below for this to work on Enterprise sites. Significantly slower and more expensive.",
            "default": true
          },
          "enableDebugScreenshots": {
            "title": "Enable Error Screenshots (Slower/Costs Storage)",
            "type": "boolean",
            "description": "If enabled, the Actor will capture and save a full screenshot to the Key-Value Store whenever Tier 4 or Tier 5 completely fails. Excellent for debugging blocked pages, but consumes Apify Storage and slows down error recovery.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration (Tier 1, 2 & 4)",
            "type": "object",
            "description": "Select proxies. Tier 1 & 2 use this for initial requests. Tier 4 uses this for the fallback browser. Default is set to Datacenter proxies for lowest cost.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          },
          "minContentLength": {
            "title": "Min Content Length (Chars) for Tier 2",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum characters required from local extraction to be considered successful. If less, falls back to higher tiers.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "type": "integer",
            "description": "Maximum number of pages processed in parallel. Be careful with Cloudflare rate limits.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}