{
  "openapi": "3.0.1",
  "info": {
    "title": "Crawl4AI LLM Scraper — Markdown for AI",
    "description": "Render any page in a real browser and get LLM-ready Markdown (or HTML/text) with link graph, depth crawling, and Apify Proxy rotation. Pay per usage — no per-page fees.",
    "version": "0.3",
    "x-build-id": "TWfeX7fqMSZgYkIb2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/subimpact~crawl4ai-llm-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-subimpact-crawl4ai-llm-scraper",
        "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/subimpact~crawl4ai-llm-scraper/runs": {
      "post": {
        "operationId": "runs-sync-subimpact-crawl4ai-llm-scraper",
        "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/subimpact~crawl4ai-llm-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-subimpact-crawl4ai-llm-scraper",
        "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"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "List of pages to scrape or watch. Each entry: {\"url\": \"https://...\"}",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "crawl",
              "watch"
            ],
            "type": "string",
            "description": "Crawl = scrape every page. Watch = check each page for changes and only render the ones that moved.",
            "default": "crawl"
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many levels of internal links to follow (0 = only the start URLs)",
            "default": 1
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on the number of pages processed per run",
            "default": 10
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "html",
              "text"
            ],
            "type": "string",
            "description": "Format of the page content stored in the dataset",
            "default": "markdown"
          },
          "includeRawHtml": {
            "title": "Include raw HTML",
            "type": "boolean",
            "description": "Also store the raw (unrendered) HTML for each page",
            "default": false
          },
          "pageLoadTimeoutMs": {
            "title": "Page load timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Max time to wait for a page to render",
            "default": 30000
          },
          "renderConcurrency": {
            "title": "Render concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many pages to render in parallel. Automatically reduced to fit the run's memory limit.",
            "default": 5
          },
          "extract": {
            "title": "Structured data extraction",
            "enum": [
              "none",
              "auto",
              "jsonld",
              "og"
            ],
            "type": "string",
            "description": "Pull structured data out of every page. JSON-LD reads <script type=\"application/ld+json\"> blocks; OpenGraph reads og:/twitter: meta tags plus the canonical URL. Auto does both. Billed at $0.010 per page where a type is actually found — pages with no structured data cost nothing.",
            "default": "none"
          },
          "aiPackage": {
            "title": "Build AI-ready package",
            "type": "boolean",
            "description": "Write ai-package.jsonl (one JSON record per page), llms.txt (the link index) and manifest.json to this run's key-value store, ready for a RAG pipeline. $0.100 once per run. Not available on free runs.",
            "default": false
          },
          "siteIntel": {
            "title": "Site intelligence summary",
            "type": "boolean",
            "description": "Add an audit block to the run summary: broken links, orphan pages, duplicate content, token estimate and the largest pages. Computed from what the run already fetched — no extra crawling, no extra charge.",
            "default": false
          },
          "watchId": {
            "title": "Watch ID",
            "type": "string",
            "description": "Name of the state store that remembers previous page fingerprints. Runs sharing a watch ID compare against each other. Defaults to a hash of the start URLs."
          },
          "changeDetection": {
            "title": "Change detection method",
            "enum": [
              "fast",
              "rendered"
            ],
            "type": "string",
            "description": "Fast = plain HTTP fetch first, render only on a mismatch (much cheaper). Rendered = always render before comparing (needed for JS-built pages).",
            "default": "fast"
          },
          "changeThreshold": {
            "title": "Change threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How different a page must be to count as changed, 0-1. 0.02 = 2% of lines differ.",
            "default": 0.02
          },
          "skipUnchanged": {
            "title": "Skip unchanged pages (incremental crawl)",
            "type": "boolean",
            "description": "In crawl mode, skip rendering pages whose content has not changed since the last run with the same watch ID.",
            "default": false
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "HTTPS URL to POST to when a change is detected. Slack incoming webhooks are auto-formatted as Slack messages."
          },
          "maxChargeUsd": {
            "title": "Max charge (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Hard ceiling on what this run may charge. Once reached, no further events are billed.",
            "default": 5
          },
          "estimateOnly": {
            "title": "Estimate only (dry run)",
            "type": "boolean",
            "description": "Run the full crawl and report what it would cost, without charging anything.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy for IP rotation. Leave default for automatic proxy."
          },
          "verifyProxyRotation": {
            "title": "Verify proxy rotation (debug)",
            "type": "boolean",
            "description": "Fetch an IP echo endpoint twice on two different proxy sessions and report both exit IPs to the dataset. Use this to confirm rotation is actually happening.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}