{
  "openapi": "3.0.1",
  "info": {
    "title": "Markdown Converter: Web Page, HTML & Website to LLM Markdown",
    "description": "HTML, web page and website to Markdown for RAG and LLMs: convert URLs, a sitemap, raw HTML, or crawl a docs site from its start page. Re-crawl only changed pages, llms.txt, RAG chunks with heading paths, metadata, token counts. JavaScript sites supported. $1 per 1,000 pages, failed pages free.",
    "version": "1.0",
    "x-build-id": "cA0GwasSmstNNPAyk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blueberry_rainstorm~web-page-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blueberry_rainstorm-web-page-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/blueberry_rainstorm~web-page-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-blueberry_rainstorm-web-page-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/blueberry_rainstorm~web-page-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-blueberry_rainstorm-web-page-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": "URLs",
            "type": "array",
            "description": "Web pages to convert to Markdown (articles, docs pages, blog posts, any public URL). One output row per URL. Turn on Crawl to also follow their links.",
            "default": [
              {
                "url": "https://en.wikipedia.org/wiki/Web_scraping"
              },
              {
                "url": "https://react.dev"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sitemapUrls": {
            "title": "Sitemaps (optional)",
            "type": "array",
            "description": "Convert a whole website or docs site: every page listed in these sitemaps (e.g. https://example.com/sitemap.xml; sitemap indexes are followed). Use Max pages to cap the run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "htmlDocuments": {
            "title": "HTML to convert (no URL needed)",
            "type": "array",
            "description": "Raw HTML to turn into Markdown, without fetching anything: a list of HTML strings, or objects like {\"html\": \"<h1>Hi</h1>...\", \"url\": \"https://example.com/page\", \"name\": \"my page\"}. The optional url makes relative links absolute. One output row per document, same price as a page."
          },
          "crawl": {
            "title": "Crawl links from the URLs",
            "type": "boolean",
            "description": "Also follow the links on each page and convert the pages they lead to, staying on the same site. Use it for a docs site or blog without a sitemap: give its start page (e.g. https://docs.example.com/guide/) and set Max pages. Links disallowed by the site's robots.txt are skipped.",
            "default": false
          },
          "crawlScope": {
            "title": "Crawl scope",
            "enum": [
              "path",
              "site"
            ],
            "type": "string",
            "description": "Same folder: from https://docs.example.com/guide/intro only pages under /guide/ are followed. Whole site: every page on docs.example.com.",
            "default": "path"
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many clicks away from the start URLs to go. 1 = only pages linked from the start page.",
            "default": 3
          },
          "excludeUrls": {
            "title": "Skip URLs containing",
            "type": "array",
            "description": "Crawled or sitemap pages whose URL contains any of these are skipped, e.g. /blog/, /changelog, ?lang=. Use * as a wildcard: /v1/*/old.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit of pages per run.",
            "default": 1000
          },
          "contentMode": {
            "title": "Content",
            "enum": [
              "main",
              "full"
            ],
            "type": "string",
            "description": "What part of the page to convert.",
            "default": "main"
          },
          "renderMode": {
            "title": "Rendering",
            "enum": [
              "auto",
              "http",
              "browser"
            ],
            "type": "string",
            "description": "Auto detects JavaScript-only pages and blocked requests and re-renders them in Chrome.",
            "default": "auto"
          },
          "includeLinks": {
            "title": "Keep links",
            "type": "boolean",
            "description": "Keep hyperlinks as Markdown links. Turn off for plain text with formatting.",
            "default": true
          },
          "includeImages": {
            "title": "Keep images",
            "type": "boolean",
            "description": "Keep images as Markdown image tags.",
            "default": false
          },
          "chunkSize": {
            "title": "RAG chunk size (tokens, 0 = off)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "Also split each page into chunks of about this many tokens, split on headings. Each chunk has its heading path and a url that links to the nearest #anchor on the page (the section or API parameter it came from). Ready for vector databases.",
            "default": 0
          },
          "tabs": {
            "title": "Tabbed content (curl / Python / JS...)",
            "enum": [
              "selected",
              "all"
            ],
            "type": "string",
            "description": "Docs sites (Docusaurus, MkDocs Material, Sphinx, Mintlify, Bootstrap...) ship every tab of a code example in the page and hide all but one. Selected keeps one variant so chunks stay focused; All keeps every variant, each under a bold label such as **Python**.",
            "default": "selected"
          },
          "chunkOverlap": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Overlap between consecutive chunks of a long section.",
            "default": 100
          },
          "llmsTxt": {
            "title": "Also build llms.txt",
            "type": "boolean",
            "description": "Save llms.txt (site name, summary, one link per page with its description, grouped by section) and llms-full.txt (all pages' Markdown) in the run's key-value store. Made from the converted pages, no extra cost.",
            "default": false
          },
          "onlyChanged": {
            "title": "Only new and changed pages (monitoring)",
            "type": "boolean",
            "description": "For scheduled re-crawls and RAG syncs: the run remembers each page's content, and later runs output (and charge) only pages that are new or changed since the last run. Unchanged pages are free. Pages gone since the last run get a free row with status \"removed\" (only when the run was not cut short by Max pages or your cost limit).",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name for the remembered state, e.g. docs-rag-sync. Use a different name for each schedule. Empty = made from the start URLs."
          },
          "removeSelectors": {
            "title": "Remove elements (CSS, optional)",
            "type": "string",
            "description": "Extra elements to strip before converting, e.g. .related-posts, #comments"
          },
          "waitSecs": {
            "title": "Browser wait (seconds)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Extra wait after a browser-rendered page loads.",
            "default": 1
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on a page after this long. Failed pages are free.",
            "default": 40
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many pages to fetch at once.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}