{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown for RAG: Clean Text, Chunks, Sitemaps",
    "description": "Convert static web pages to clean Markdown, text and RAG chunks from URLs, sitemaps or a crawl. HTTP only, no JavaScript. $1.00 per 1,000 pages.",
    "version": "0.1",
    "x-build-id": "ygtpVV2f4tIRyXzYA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ataism~web-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ataism-web-to-markdown",
        "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/ataism~web-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-ataism-web-to-markdown",
        "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/ataism~web-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-ataism-web-to-markdown",
        "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": {
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Page URLs to convert, one per entry, e.g. [\"https://quotes.toscrape.com/page/2/\"]. Each page becomes one row. Costs $0.001 per page converted (status ok); errors, blocked, robots-disallowed and empty (low-content) pages are free. Private, local and internal addresses are blocked; social, video and Google sites are refused. Give at least one of urls, sitemapUrls or startUrls.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "type": "array",
            "description": "Sitemap files to expand into pages, e.g. [\"https://docs.example.org/sitemap.xml\"] (sitemap index files and .gz files work). Every page listed is converted, up to Max pages. Only pages on the sitemap's own site are used. Each converted page costs $0.001. Narrow it with Include/Exclude patterns.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (crawl the same site)",
            "type": "array",
            "description": "Start pages for a same-site crawl, e.g. [\"https://quotes.toscrape.com/\"]. Converts each start page, then follows links to other pages on the same site (the same host, with or without www) up to Crawl depth and Max pages. Each converted page costs $0.001.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on pages fetched in one run, counting all inputs together (start URLs first, then page URLs, then sitemaps, then crawled links), e.g. 50. Default 10, minimum 1, maximum 5,000. This also caps the cost: at most about maxPages x $0.001.",
            "default": 10
          },
          "includeGlobs": {
            "title": "Include patterns",
            "type": "array",
            "description": "Only sitemap and crawled URLs matching one of these are converted, e.g. [\"/docs/**\"]. \"*\" matches within one path segment, \"**\" matches anything. A pattern starting with \"/\" is matched against the path; otherwise against the full URL. Max 20 patterns. Pages you list yourself and start URLs are always converted. Empty = no filter.",
            "items": {
              "type": "string"
            }
          },
          "excludeGlobs": {
            "title": "Exclude patterns",
            "type": "array",
            "description": "Sitemap and crawled URLs matching any of these are skipped, e.g. [\"**/changelog/**\", \"/tag/**\"]. Same pattern rules as Include patterns. Exclude wins over include. Empty = nothing excluded.",
            "items": {
              "type": "string"
            }
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many links away from a start URL the crawl may go, e.g. 2. 0 converts the start pages only. Default 3, maximum 10. Only affects Start URLs; the Max pages cap still applies.",
            "default": 3
          },
          "chunkSizeTokens": {
            "title": "Chunk size (tokens)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "Size of each RAG chunk in approximate tokens (characters divided by 4), e.g. 512. Chunks are split at headings, then paragraphs and sentences, and returned in the \"chunks\" field. 0 turns chunks off; otherwise at least 50, maximum 8,000. Default 512. No extra charge.",
            "default": 512
          },
          "chunkOverlapTokens": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "Tokens repeated at the start of the next chunk when a long section has to be split, e.g. 50. Default 50, maximum 4,000; capped at half the chunk size. Only used when chunk size is above 0.",
            "default": 50
          },
          "includeMarkdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "true (default): add the \"markdown\" field (main content as GFM Markdown). false: omit it to shrink rows. No change to price.",
            "default": true
          },
          "includeText": {
            "title": "Include plain text",
            "type": "boolean",
            "description": "true (default): add the \"text\" field (main content as plain text). false: omit it to shrink rows. No change to price.",
            "default": true
          },
          "includeLinks": {
            "title": "Include links",
            "type": "boolean",
            "description": "true: add a \"links\" list with every http(s) link on the page (objects with url and text, up to 2,000). false (default): no links. No extra charge.",
            "default": false
          },
          "removeContactDetails": {
            "title": "Remove emails and phone numbers",
            "type": "boolean",
            "description": "true (default): replace email addresses and phone numbers in the output with [email removed] and [phone removed]. Best effort: unusual formats can slip through. Set false only if you have the right to collect them.",
            "default": true
          },
          "changeDetectionKey": {
            "title": "Change detection key",
            "type": "string",
            "description": "Optional label for change detection, e.g. \"docs-weekly\" (letters, digits and dashes, up to 40 characters). When set, the Actor remembers a hash of each page's text in a named storage and sets \"changedSinceLastRun\" (true or false) on later runs that use the same key. Leave empty to turn it off."
          },
          "requestsPerSecondPerHost": {
            "title": "Requests per second per host",
            "minimum": 0.75,
            "maximum": 4,
            "type": "number",
            "description": "Politeness limit per website, in requests per second, e.g. 1. Default 1, minimum 0.75, maximum 4 (a slower rate only makes the run longer and costlier). A Crawl-delay in robots.txt is also honoured in full, never shortened; see Allow slow hosts.",
            "default": 1
          },
          "allowSlowHosts": {
            "title": "Allow slow hosts",
            "type": "boolean",
            "description": "Kept for compatibility; it has no effect. The longest Crawl-delay this Actor honours is 1.75 seconds (in full, never shortened), with or without this switch. A site whose robots.txt asks for more is skipped with free \"slow-host\" rows, because waiting between requests makes the run slow and at 1.75 seconds one page costs about 10% of its price in compute at $0.20 per compute unit.",
            "default": false
          },
          "maxPageSizeMb": {
            "title": "Max page size (MB)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Largest page to download, in MB, e.g. 2. Larger pages are skipped with an error row (not charged). Default 2, hard cap 10. The limit also depends on run memory (about 4.5 MB at the default 1,024 MB); the Actor lowers it when the run has less memory.",
            "default": 2
          },
          "pageTimeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Time allowed per page in seconds, including redirects, e.g. 30. Default 30, minimum 5, maximum 120. Pages that time out are free error rows.",
            "default": 30
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Pages fetched at once across different hosts, e.g. 4. Default 4, maximum 8. One host is never hit faster than Requests per second per host.",
            "default": 4
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Internal: \"selfTest\" runs the maintainer health check and saves no items. Leave as \"run\" (the default).",
            "default": "run"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}