{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Crawler",
    "description": "Website content crawler for RAG and LLMs: each page as clean Markdown, menus and footers removed, optional chunks. $3 per 1,000 saved pages ($2.10 on Business); refused and failed pages are free. HTML only: no JavaScript rendering, proxy or PDF. Max 5,000 pages per website.",
    "version": "0.1",
    "x-build-id": "F3zsPuoVyi1hw7bjh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pumpkinapi~website-content-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pumpkinapi-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/pumpkinapi~website-content-crawler/runs": {
      "post": {
        "operationId": "runs-sync-pumpkinapi-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/pumpkinapi~website-content-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-pumpkinapi-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": "Websites to crawl",
            "type": "array",
            "description": "One address per line: a whole website (example.com), a section (https://example.com/docs/) or single pages. Addresses of the same website are crawled together. Crawl scope below says how far the crawl goes from them.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages per website",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The crawl of one website stops after reading this many pages. You pay only for the pages it saves, so this also caps the cost of each website: copies of another page and pages without text of their own are read but not saved. Up to 5,000.",
            "default": 1000
          },
          "crawlScope": {
            "title": "Crawl scope",
            "enum": [
              "path",
              "site",
              "pages"
            ],
            "type": "string",
            "description": "Which pages the crawl takes. Pages under the start address: https://example.com/docs/ reads only pages whose path starts with /docs/. Whole website: every page of the same website, www or not. Only the start addresses: reads the given pages and follows no links.",
            "default": "path"
          },
          "splitIntoChunks": {
            "title": "Split text into chunks",
            "type": "boolean",
            "description": "Save each page as several rows of up to Chunk size characters, ready for embeddings and a vector database. Each chunk keeps the headings above it, tables are cut between rows with the header row repeated. You still pay per page, not per chunk.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 400,
            "maximum": 20000,
            "type": "integer",
            "description": "The longest a chunk may be, in characters. About 4 characters make one token in English text.",
            "default": 1500
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Each chunk after the first starts with up to this many characters from the end of the chunk before it, cut at a word, a table row or a line of code. At most a quarter of the chunk size. 0 means no overlap.",
            "default": 0
          },
          "removeRepeatedText": {
            "title": "Remove menus, footers and banners",
            "type": "boolean",
            "description": "Text blocks found on at least half of the pages of a website (and on at least 3) are taken out of every page and saved once, in a row of type shared. A website in several languages is counted language by language, and each language gets its own shared row. A website of up to 3 pages keeps every page whole. Turn off to keep every page as it is.",
            "default": true
          },
          "removeElementsCssSelector": {
            "title": "Remove HTML elements (CSS selector)",
            "type": "string",
            "description": "Elements matching this CSS selector are left out of the text, besides scripts, styles, forms and buttons, which are always left out (a FAQ question on a button stays). The default leaves out navigation menus. Clear it to keep them.",
            "default": "nav, [role=\"navigation\"]"
          },
          "keepElementsCssSelector": {
            "title": "Keep only HTML elements (CSS selector)",
            "type": "string",
            "description": "Optional. Only the elements matching this CSS selector are read, for example main or article, and the rest of the page is left out. A page where nothing matches has no text and is not saved or charged. Empty reads the whole page.",
            "default": ""
          },
          "includeUrls": {
            "title": "Only pages whose address contains",
            "type": "array",
            "description": "Optional. A found page is read only when its address contains one of these, in any case. * stands for anything, for example /blog/ or /docs/*/guide. Start addresses are always read.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrls": {
            "title": "Skip pages whose address contains",
            "type": "array",
            "description": "Optional. A found page is skipped when its address contains one of these, in any case. * stands for anything, for example /tag/ or ?page=. Skipped pages are not downloaded.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "useSitemaps": {
            "title": "Use sitemaps",
            "type": "boolean",
            "description": "After the links run out, also read the pages listed in the website's sitemaps (from robots.txt, or /sitemap.xml and the usual places) that no link led to. They follow the same scope and filters.",
            "default": true
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip the pages the website's robots.txt does not allow, and wait as long as its Crawl-delay asks, up to 10 seconds. Turn off only for a website you own or may crawl anyway.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}