{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Crawler: Markdown for AI & RAG",
    "description": "Crawl websites and save each page's main content as clean Markdown and text, with metadata, sitemaps, llms.txt and RAG chunks. For LLMs, AI agents, vector databases and knowledge bases. Fast HTTP crawler, no browser.",
    "version": "0.1",
    "x-build-id": "Co0dsfqjjc8LmOAKG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api_creators~website-content-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api_creators-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/api_creators~website-content-crawler/runs": {
      "post": {
        "operationId": "runs-sync-api_creators-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/api_creators~website-content-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-api_creators-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": "Websites to crawl. The crawler saves each start URL and the pages below it (same address path), so `https://example.com/blog` also covers `https://example.com/blog/my-post`. Use \"Include URL patterns\" to reach pages outside that path. You can also upload a text file or link a URL list.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "useSitemaps": {
            "title": "Load URLs from sitemaps",
            "type": "boolean",
            "description": "Read the site's sitemaps (from robots.txt or /sitemap.xml) to find pages that aren't linked from the start URL. Only pages within the crawl scope are added. Recommended for documentation and blog sites.",
            "default": false
          },
          "useLlmsTxt": {
            "title": "Crawl /llms.txt and Markdown files",
            "type": "boolean",
            "description": "Read the `/llms.txt` file of each site (an index of pages written for AI tools) and the Markdown files it links to.",
            "default": false
          },
          "includeUrlGlobs": {
            "title": "Include URL patterns (globs)",
            "type": "array",
            "description": "Extra URL patterns to crawl beyond the start URLs' paths, e.g. `https://example.com/docs/**`. Applies to links found on pages.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "excludeUrlGlobs": {
            "title": "Exclude URL patterns (globs)",
            "type": "array",
            "description": "URL patterns never to crawl, e.g. `https://example.com/**/*?page=*` or `**/tag/**`. Exclusions win over inclusions.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "maxCrawlDepth": {
            "title": "Max crawling depth",
            "minimum": 0,
            "type": "integer",
            "description": "How many links away from a start URL to go. Start URLs have depth 0, pages they link to depth 1, and so on. 0 crawls only the start URLs (plus sitemap and llms.txt pages, if enabled).",
            "default": 20
          },
          "maxCrawlPages": {
            "title": "Max pages",
            "minimum": 0,
            "type": "integer",
            "description": "The most pages to crawl in this run, including pages skipped as duplicates. With several start URLs, the limit is shared equally between them, so one big site can't use it all up. Use it to cap the cost of a run.",
            "default": 9999999
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "The most pages and files to save. The run stops when it is reached.",
            "default": 9999999
          },
          "onlyCrawlPagesModifiedSince": {
            "title": "Crawl only pages changed since",
            "pattern": "^((\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z)?)?$",
            "type": "string",
            "description": "A date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ). Pages whose sitemap date, Last-Modified header or 304 response says they haven't changed since then are skipped. Start URLs are always crawled. Handy for keeping a knowledge base up to date.",
            "default": ""
          },
          "respectRobotsTxtFile": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages that the site's robots.txt disallows for all crawlers.",
            "default": false
          },
          "keepUrlFragments": {
            "title": "Treat #fragments as separate pages",
            "type": "boolean",
            "description": "Keep the `#…` part of URLs when deciding whether two links are the same page. Turn on only for sites that route pages by fragment.",
            "default": false
          },
          "ignoreCanonicalUrl": {
            "title": "Ignore canonical URLs",
            "type": "boolean",
            "description": "By default, a page whose canonical URL was already saved is skipped as a duplicate. Turn this on if a site reports wrong canonical URLs and pages go missing.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave on \"No proxy\" to use the built-in proxies: fast datacenter IPs first, switching a site to residential IPs only if it blocks datacenter. Choose Apify Proxy or your own proxy URLs to use those instead.",
            "default": {
              "useApifyProxy": false
            }
          },
          "customHttpHeaders": {
            "title": "Custom HTTP headers",
            "type": "object",
            "description": "Extra HTTP headers to send with every request, e.g. `{\"Accept-Language\": \"de-DE\"}`."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many pages to load at once across all sites. At most 6 run at once on any single site.",
            "default": 20
          },
          "requestTimeoutSecs": {
            "title": "Page request timeout",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for one page to download.",
            "default": 60
          },
          "maxRequestRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times to retry a page after a network or server error. Each attempt already tries both proxy types.",
            "default": 3
          },
          "ignoreHttpsErrors": {
            "title": "Ignore HTTPS certificate errors",
            "type": "boolean",
            "description": "Load pages even when their SSL certificate is invalid or expired.",
            "default": false
          },
          "htmlTransformer": {
            "title": "HTML transformer",
            "enum": [
              "readableText",
              "readableTextIfPossible",
              "extractus",
              "defuddle",
              "none"
            ],
            "type": "string",
            "description": "How to find the main content. **Readable text** keeps the article and drops menus, sidebars and footers, which is best for docs, blogs and news. **If possible** falls back to the cleaned page for product pages, listings and home pages. **None** keeps everything that remains after removing the elements below.",
            "default": "readableText"
          },
          "readableTextCharThreshold": {
            "title": "Readable text: minimum characters",
            "minimum": 0,
            "type": "integer",
            "description": "The least text a block must have for Readability to treat it as content.",
            "default": 100
          },
          "removeElementsCssSelector": {
            "title": "Remove HTML elements (CSS selector)",
            "type": "string",
            "description": "Elements removed before the content is extracted. The default drops navigation, footers, scripts, banners and pop-ups. Set it to a selector that matches nothing (e.g. `dummy_keep_everything`) to keep everything.",
            "default": "nav, footer, script, style, noscript, svg, img[src^='data:'],\n[role=\"alert\"],\n[role=\"banner\"],\n[role=\"dialog\"],\n[role=\"alertdialog\"],\n[role=\"region\"][aria-label*=\"skip\" i],\n[aria-modal=\"true\"]"
          },
          "keepElementsCssSelector": {
            "title": "Keep only these HTML elements (CSS selector)",
            "type": "string",
            "description": "If set, only elements matching this selector are kept, e.g. `article, .docs-content`. Applied after the removal above."
          },
          "removeCookieWarnings": {
            "title": "Remove cookie warnings",
            "type": "boolean",
            "description": "Drop common cookie-consent banners (OneTrust, Cookiebot, Didomi, Usercentrics, and others) from the content.",
            "default": true
          },
          "aggressivePrune": {
            "title": "Remove duplicate text lines",
            "type": "boolean",
            "description": "Drop lines that already appeared on earlier pages of the crawl, such as repeated menus, banners and calls to action. May occasionally remove a repeated sentence that matters.",
            "default": false
          },
          "saveMarkdown": {
            "title": "Save Markdown",
            "type": "boolean",
            "description": "Save the content as Markdown in the `markdown` field, with headings, lists, tables, links and code blocks kept.",
            "default": true
          },
          "splitIntoChunks": {
            "title": "Split content into chunks",
            "type": "boolean",
            "description": "Also save the Markdown split into chunks (`chunks` field) on paragraph boundaries, ready for embeddings and vector databases.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Approximate size of each chunk.",
            "default": 1500
          },
          "chunkOverlap": {
            "title": "Chunk overlap",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many characters from the end of one chunk to repeat at the start of the next.",
            "default": 0
          },
          "saveHtml": {
            "title": "Save HTML to dataset",
            "type": "boolean",
            "description": "Also save the cleaned content HTML in the `html` field.",
            "default": false
          },
          "saveHtmlAsFile": {
            "title": "Save HTML to key-value store",
            "type": "boolean",
            "description": "Save each page's cleaned content HTML as a file and put its link in the `htmlUrl` field. Better than the dataset for large pages.",
            "default": false
          },
          "saveFiles": {
            "title": "Save linked files",
            "type": "boolean",
            "description": "Download documents linked from the crawled pages (PDF, Word, Excel, PowerPoint, CSV, and others matching the content types below) to the key-value store, each saved as a result with a `fileUrl`. Files are downloaded even when they sit outside the crawl scope.",
            "default": false
          },
          "saveContentTypes": {
            "title": "File content types to save",
            "type": "string",
            "description": "Comma-separated content types for \"Save linked files\"; wildcards allowed, e.g. `application/pdf, image/*`."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}