{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown & Text Crawler with Spend Cap",
    "description": "Crawl any website and turn its pages into clean Markdown and plain text for AI, RAG and LLMs. Hard limits on spend, pages and pages per domain. You are never charged for failed, empty or duplicate pages. Fast plain-HTTP mode, optional browser for JavaScript sites.",
    "version": "1.1",
    "x-build-id": "aG3kQ1ExM3e7oSrax"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hydrocore~website-to-markdown-text/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hydrocore-website-to-markdown-text",
        "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/hydrocore~website-to-markdown-text/runs": {
      "post": {
        "operationId": "runs-sync-hydrocore-website-to-markdown-text",
        "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/hydrocore~website-to-markdown-text/run-sync": {
      "post": {
        "operationId": "run-sync-hydrocore-website-to-markdown-text",
        "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": "Pages where the crawl starts, for example https://docs.example.com/. Links on these pages are followed according to \"Crawl scope\". To fetch only these exact pages, set \"Crawl scope\" to \"Only the start URLs\".",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "crawlScope": {
            "title": "Crawl scope",
            "enum": [
              "start-url-path",
              "same-hostname",
              "same-domain",
              "start-urls-only"
            ],
            "type": "string",
            "description": "Which links to follow. \"Under the start URL path\": starting at https://example.com/docs/ only crawls https://example.com/docs/... pages. \"Whole website\": every page on the same host (www. is ignored). \"Whole domain\": also subdomains such as blog.example.com. \"Only the start URLs\": just the pages you listed.",
            "default": "start-url-path"
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The crawl stops after this many pages have been saved (and charged). Skipped pages (failed, empty, duplicate) don't count. On Apify's free plan a run is limited to 100 pages.",
            "default": 50
          },
          "maxSpendUsd": {
            "title": "Max spend (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Optional. The crawl stops before it would charge more than this amount in total for this run. Leave empty for no extra limit. The \"Maximum cost per run\" you set in Run options is always respected too."
          },
          "maxPagesPerDomain": {
            "title": "Max pages per domain",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. At most this many pages are saved from any one domain (www. is ignored). Useful when you crawl many sites at once. 0 means no per-domain limit.",
            "default": 0
          },
          "maxDepth": {
            "title": "Max link depth",
            "minimum": 0,
            "type": "integer",
            "description": "How many clicks away from a start URL the crawler may go. 0 means only the start URLs, 1 means start URLs plus the pages they link to, and so on.",
            "default": 20
          },
          "maxRunMinutes": {
            "title": "Max run time",
            "minimum": 0,
            "type": "integer",
            "description": "The crawl stops and saves its results after this many minutes. 0 means no limit (the run timeout in Run options still applies; the crawler finishes cleanly just before it).",
            "default": 30
          },
          "stallTimeoutSecs": {
            "title": "Stop if stuck for",
            "minimum": 30,
            "type": "integer",
            "description": "If no new page could be saved for this long (for example every page fails or is a duplicate), the crawl stops on its own instead of running forever.",
            "default": 120
          },
          "includeUrlGlobs": {
            "title": "Only crawl URLs matching",
            "type": "array",
            "description": "Optional. If set, only links matching at least one pattern are crawled (start URLs are always crawled). Examples: \"https://example.com/blog/**\" (whole blog section), \"/docs/**\" (any URL whose path starts with /docs/), \"/2025/\" (no * = URL must contain this text). \"**\" matches anything, \"*\" matches anything except \"/\".",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlGlobs": {
            "title": "Never crawl URLs matching",
            "type": "array",
            "description": "Optional. Links matching any pattern are never fetched, and pages that redirect to such a URL are skipped too. Same pattern rules as above. Examples: \"/tag/**\", \"**/login*\", \"?page=\" (contains text).",
            "items": {
              "type": "string"
            }
          },
          "crawlerType": {
            "title": "Crawler type",
            "enum": [
              "http",
              "auto",
              "browser"
            ],
            "type": "string",
            "description": "\"Plain HTTP\" downloads the HTML directly and is charged as \"Page\". \"Browser\" opens every page in a headless Chrome so JavaScript content appears; charged as \"Browser page\" and needs at least 1 GB memory. \"Auto\" tries plain HTTP first and uses the browser only for pages that come back empty or need JavaScript; you pay the browser price only for those.",
            "default": "http"
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Follow each site's robots.txt rules and Crawl-delay. Pages that robots.txt disallows are skipped and not charged. Turn off only for sites you own or have permission to crawl.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages are fetched at the same time across all sites. Requests to one site are always spaced out (at least 0.25 s apart, or the site's Crawl-delay) to stay polite.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Page timeout",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "A page that doesn't load within this time is retried once, then skipped and not charged. Network errors are retried up to 2 times.",
            "default": 30
          },
          "outputFormat": {
            "title": "Text format",
            "enum": [
              "both",
              "markdown",
              "text"
            ],
            "type": "string",
            "description": "Which text fields each result has. Markdown keeps headings, lists, links and tables; plain text is just the words.",
            "default": "both"
          },
          "combinedOutput": {
            "title": "Also save one combined file",
            "enum": [
              "none",
              "markdown",
              "text"
            ],
            "type": "string",
            "description": "Also save all pages in a single file in the key-value store, ready to upload to a RAG tool or an LLM. Very large crawls are split into parts of about 8 MB.",
            "default": "none"
          },
          "minWordCount": {
            "title": "Skip pages with fewer words than",
            "minimum": 0,
            "type": "integer",
            "description": "Pages whose main text has fewer words are treated as empty: not saved and not charged.",
            "default": 10
          },
          "contentSelector": {
            "title": "Content area (CSS selector)",
            "type": "string",
            "description": "Optional. Keep only this part of each page, for example \"article\" or \"#content\". By default the main content is found automatically (main, article or body)."
          },
          "removeSelectors": {
            "title": "Remove elements (CSS selector)",
            "type": "string",
            "description": "Optional. Extra elements to drop before conversion, for example \".newsletter, .related-posts\". Menus, headers, footers, cookie banners, scripts and forms are removed already."
          },
          "keepNavigation": {
            "title": "Keep menus, header and footer",
            "type": "boolean",
            "description": "Keep navigation menus, sidebars, page header and footer in the text. Off by default so you get only the main content.",
            "default": false
          },
          "keepImages": {
            "title": "Keep image links in Markdown",
            "type": "boolean",
            "description": "Keep images as Markdown image links (![alt](url)). Off by default to keep the text short for AI use.",
            "default": false
          },
          "includeSkippedPages": {
            "title": "List skipped pages in the dataset",
            "type": "boolean",
            "description": "Also add a row for every skipped page (failed, empty, duplicate, blocked) with the reason. These rows are free. Either way, the full list is saved in the SKIPPED_PAGES record.",
            "default": false
          },
          "maxPageSizeMb": {
            "title": "Max page size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pages larger than this are skipped and not charged.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}