{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Crawler: Markdown & llms.txt for RAG, GPTs",
    "description": "Crawl a website or docs to clean Markdown for AI, LLMs, RAG and vector databases, plus the whole site as one knowledge file for custom GPTs, Claude Projects and NotebookLM, and an llms.txt. Skips tag, archive and link-list pages. Chunks, metadata, only changed pages on reruns. $0.10 per 1,000 pages.",
    "version": "0.1",
    "x-build-id": "H93HCMenKjsp65ZUe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pikoulas~website-content-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pikoulas-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/pikoulas~website-content-crawler/runs": {
      "post": {
        "operationId": "runs-sync-pikoulas-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/pikoulas~website-content-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-pikoulas-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",
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Where the crawl starts. It follows links to the pages under each start URL: same site (with or without www.) and the same folder, so https://docs.python.org/3/tutorial/ crawls the tutorial and nothing else. A URL ending in a file (.../library/asyncio.html) crawls its folder (.../library/).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "urls": {
            "title": "Single pages",
            "type": "array",
            "description": "Pages fetched as they are, without following their links: each gives one result, or one saying why it couldn't be loaded.",
            "items": {
              "type": "string"
            }
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many links away from a start URL the crawl goes. 0 for the start URLs (and sitemap pages) only.",
            "default": 20
          },
          "maxCrawlPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Pages fetched in all, the ones that fail included. The run stops there.",
            "default": 10000
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Pages saved (and charged) in all. Leave empty for no limit other than max pages."
          },
          "includeUrlGlobs": {
            "title": "Include URLs (globs)",
            "type": "array",
            "description": "Follow only links matching one of these, in place of the start URLs' folders: https://example.com/blog/** follows the blog, https://example.com/{docs,api}/** two sections. * is any characters but /, ** any characters. The start URLs are fetched either way.",
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "excludeUrlGlobs": {
            "title": "Exclude URLs (globs)",
            "type": "array",
            "description": "Never follow links matching one of these, e.g. https://example.com/**/tag/** or **/*?page=*.",
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "skipListingPages": {
            "title": "Skip listing pages",
            "type": "boolean",
            "description": "Follow tag, category, author, archive, search, login and numbered pages (/page/2), and pages that are mostly links to others, without saving or charging for them, so you get the content and not the lists leading to it. The URLs you give are saved either way.",
            "default": true
          },
          "useSitemaps": {
            "title": "Use sitemaps",
            "type": "boolean",
            "description": "Also crawl the pages the site's sitemaps list (from robots.txt, or /sitemap.xml), within the start URLs' folders or the include globs. Finds pages no link leads to.",
            "default": false
          },
          "respectRobotsTxtFile": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip the pages the site's robots.txt disallows, and wait between pages as long as its Crawl-delay says (up to 5 seconds). The URLs you give are fetched either way.",
            "default": true
          },
          "keepUrlFragments": {
            "title": "Keep URL fragments",
            "type": "boolean",
            "description": "Treat URLs that differ after # as different pages. Only for sites whose pages are told apart by the fragment.",
            "default": false
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "The page's content as Markdown (headings, lists, tables, code blocks and links kept), plain text, the cleaned HTML of its content, and the page's whole raw HTML.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html",
                "rawHtml"
              ],
              "enumTitles": [
                "Markdown",
                "Text",
                "Cleaned HTML",
                "Raw HTML"
              ]
            },
            "default": [
              "markdown",
              "text"
            ]
          },
          "mainContentOnly": {
            "title": "Main content only",
            "type": "boolean",
            "description": "Keep the page's main content: its article, docs or product text, without the menus, header, footer, sidebars, cookie banners and share buttons. Off keeps the whole page's text, the page's scripts and hidden parts still left out.",
            "default": true
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Keep the content's images in the Markdown, as ![alt](url).",
            "default": true
          },
          "saveLinks": {
            "title": "Save links",
            "type": "boolean",
            "description": "Add every link on the page, with its text.",
            "default": false
          },
          "knowledgeFile": {
            "title": "Knowledge file and llms.txt",
            "type": "boolean",
            "description": "Also put the pages saved into the run's key-value store as one Markdown file, knowledge.md, each page under its title and URL, to upload to ChatGPT (a custom GPT), Claude Projects, NotebookLM or Gemini, and an llms.txt indexing them. A site over 400,000 words is cut into parts (knowledge-2.md, ...), each one NotebookLM source. Free.",
            "default": true
          },
          "chunkSize": {
            "title": "Chunk size (tokens)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Also cut each page's content into chunks of up to this many tokens for embedding: by its headings, long sections between paragraphs, each chunk with the headings it sits under. 0 for none; 500 to 1,000 suits most embedding models.",
            "default": 0
          },
          "removeElementsCssSelector": {
            "title": "Remove elements (CSS selector)",
            "type": "string",
            "description": "Elements to leave out of the content besides the page's chrome, e.g. .newsletter, #comments, figure."
          },
          "keepElementsCssSelector": {
            "title": "Keep only elements (CSS selector)",
            "type": "string",
            "description": "Take the content from these elements only, e.g. article .body or #main-text, in place of finding the main content."
          },
          "trackChanges": {
            "title": "New and changed pages only",
            "type": "boolean",
            "description": "Give, and charge for, only the pages no earlier run with the same memory gave, and those whose content changed since, so a scheduled crawl re-embeds only what moved. Unchanged pages are still fetched, but cost nothing.",
            "default": false
          },
          "memory": {
            "title": "Memory name",
            "type": "string",
            "description": "One per site or schedule, so two crawls don't share a memory. Kept in your account's key-value store website-content-memory; a page not seen for 60 days is forgotten.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency per site",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pages fetched from a site at the same time. Lower it for small or slow sites.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long a page may take to load.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Times a page is asked again after a network error, a server error (5xx) or a 429.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most sites. Sites that refuse the run's IP can be crawled through Apify Proxy: datacenter IPs cost nothing extra, residential ones are charged per 100 KB fetched.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}