{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Crawler - Markdown for LLM, RAG & AI Agents",
    "description": "Crawl any website over fast plain HTTP and get one row per page with clean Markdown (navigation, footers and cookie banners removed) for RAG, vector databases and LLM context. Flat $0.50 per 1,000 pages. Monitor mode re-emits only new and changed pages.",
    "version": "0.1",
    "x-build-id": "r1eVhO4H31TyGAfXk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rjmacarthy~website-content-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rjmacarthy-website-content-crawler",
        "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/rjmacarthy~website-content-crawler/runs": {
      "post": {
        "operationId": "runs-sync-rjmacarthy-website-content-crawler",
        "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/rjmacarthy~website-content-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-rjmacarthy-website-content-crawler",
        "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": "Where to start. In Site mode the crawler stays on the same host and under the path of each start URL: https://example.com/docs crawls /docs and everything below it. In Sitemap mode give the site (or a sitemap.xml URL). In URLs mode list every page you want.",
            "default": [
              {
                "url": "https://docs.apify.com/academy"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "crawlMode": {
            "title": "Crawl mode",
            "enum": [
              "site",
              "sitemap",
              "urls"
            ],
            "type": "string",
            "description": "site = follow same-host links under the start URL's path (and seed from the sitemap). sitemap = read robots.txt sitemaps or /sitemap.xml and crawl only those pages. urls = fetch exactly the URLs you give.",
            "default": "site"
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum pages to crawl in the whole run, across all start URLs. Each page saved is one charged event ($0.0005), so this caps the cost: 1,000 pages = $0.50. 0 = no limit, which means the hard cap of 20,000 pages per run.",
            "default": 50
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "type": "integer",
            "description": "Site mode: how many clicks from the start URL to follow. 0 = the start URL only.",
            "default": 10
          },
          "useSitemap": {
            "title": "Also use the sitemap",
            "type": "boolean",
            "description": "Site mode: besides following links, add the pages listed in the site's sitemaps (robots.txt or /sitemap.xml) that are under the start URL. Finds pages that no menu links to.",
            "default": true
          },
          "includeGlobs": {
            "title": "Include URLs (globs)",
            "type": "array",
            "description": "Site and Sitemap mode: only crawl URLs matching one of these patterns. In Site mode they replace the \"under the start URL's path\" rule (the host must still match). * matches within one path segment, ** matches anything. A pattern starting with / is matched against the path, e.g. /blog/** ; otherwise against the whole URL, e.g. https://example.com/**/api/**.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeGlobs": {
            "title": "Exclude URLs (globs)",
            "type": "array",
            "description": "Never crawl URLs matching one of these patterns, e.g. /docs/v1/** or **/tag/**. Same syntax as Include URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which versions of the content to save on each row. Markdown is the default; text and html fill the text and html fields (otherwise null). The price per page is the same.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html"
              ],
              "enumTitles": [
                "Markdown",
                "Plain text",
                "Cleaned HTML"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "includeLinks": {
            "title": "Keep links in the Markdown",
            "type": "boolean",
            "description": "On: links stay as [text](https://absolute.url). Off: only the link text, which saves tokens.",
            "default": true
          },
          "includeImages": {
            "title": "Keep images in the Markdown",
            "type": "boolean",
            "description": "On: images become ![alt](https://absolute.url). Off (default): images are dropped.",
            "default": false
          },
          "removeSelectors": {
            "title": "Remove selectors",
            "type": "array",
            "description": "Extra CSS selectors to delete before conversion, e.g. .promo-box or #comments. Navigation, header, footer, sidebars, cookie banners, forms and scripts are already removed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keepSelectors": {
            "title": "Keep only selectors",
            "type": "array",
            "description": "Restrict the content to these CSS selectors, e.g. article.post or #content. Leave empty to detect the main content automatically (<main>, <article>, then a text-density heuristic).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "monitorMode": {
            "title": "Monitor mode",
            "enum": [
              "all",
              "changed"
            ],
            "type": "string",
            "description": "For scheduled runs. \"changed\" remembers a content hash of every page between runs and saves (and charges) only pages that are new or whose text changed, with changeType new or changed. The first run saves everything as the baseline. Unchanged pages are free.",
            "default": "all"
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate memory for each monitor. Use a different name per site or schedule (e.g. \"acme-docs\").",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests per host. Lower it for small or fragile sites.",
            "default": 5
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip URLs that the site's robots.txt disallows for this crawler (user agent WebsiteContentCrawler). Turn off only for sites you own or have permission to crawl.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed. If the site blocks the run (HTTP 403/429), enable Apify Proxy with automatic (datacenter) proxies. Residential proxies are not supported: if you select the RESIDENTIAL group, the Actor uses Apify datacenter proxy instead.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}