{
  "openapi": "3.0.1",
  "info": {
    "title": "URL to Markdown Scraper: HTML to Markdown for LLMs",
    "description": "Scrape any URL to clean Markdown: HTML to Markdown for LLMs and RAG. Convert one page, a whole docs site or public Notion pages, with optional chunks for embeddings. Keeps the article, drops menus and banners. Title, author, date. Failed pages are free.",
    "version": "0.1",
    "x-build-id": "gdCPNP0gRmqHFULul"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~url-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-url-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/scrapewise~url-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-url-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/scrapewise~url-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-url-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": "Pages to convert, one per line: any article, documentation page, blog post or news page (for example https://en.wikipedia.org/wiki/Markdown). Addresses without https:// are accepted. Each page becomes one row with clean Markdown (menus, ads and footers removed), title, description, author, date, language, word count and links. Pages that cannot be fetched return a free error row. Leave empty to convert an example page. Also accepts 'startUrls', 'pageUrls' or 'url'.",
            "items": {
              "type": "string"
            }
          },
          "crawlLinks": {
            "title": "Follow links on the same site (crawl)",
            "type": "boolean",
            "description": "Off (default): only the URLs you list are converted. On: each URL is a starting point and the Actor follows the links it finds to other pages of the same website (same host), breadth first, up to 'Max pages per site' and 'Max depth'. Turns a documentation site, a help center or a blog into one Markdown dataset. Also accepts 'crawl'.",
            "default": false
          },
          "maxPages": {
            "title": "Max pages per site",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Crawl only: how many pages to convert per starting URL, the start page included (1 to 5,000, default 20). Every page converted is charged, failed pages are free, so this caps the cost of each site.",
            "default": 20
          },
          "maxDepth": {
            "title": "Max depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Crawl only: how many clicks away from the starting URL to go (0 to 10, default 2). 0 converts only the start page, 1 the start page and the pages it links to, 2 also the pages those link to.",
            "default": 2
          },
          "urlMustContain": {
            "title": "Only URLs containing (optional)",
            "type": "string",
            "description": "Crawl only: follow a link only if its URL contains this text, for example /docs/ or /blog/, to stay inside one section of a site. Leave empty to follow every page of the site."
          },
          "chunkSizeWords": {
            "title": "RAG chunks: words per chunk",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "0 (default) means off. Above 0, every page also gets a 'chunks' array: pieces of about this many words (up to 5,000), cut only between paragraphs, each with its index, word count and the section heading it belongs to. Ready to embed in a vector database. 300 is a good start. Same price per page.",
            "default": 0
          },
          "chunkOverlapWords": {
            "title": "RAG chunks: overlap words",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Words repeated from the end of one chunk at the start of the next (default 0), so a sentence cut in two keeps its context. Capped at half the chunk size. Used only when 'RAG chunks: words per chunk' is above 0.",
            "default": 0
          },
          "minWords": {
            "title": "Minimum words to count as a page",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Pages with fewer words of main text than this (for example 100) come back as a free error row instead of being charged. Useful when feeding a pipeline that cannot use stubs, login walls or cookie pages. 0 (default) accepts everything.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default: pages are fetched straight from the server. Turn on Apify Proxy when rows come back with a fetch error.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}