{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown Scraper - Clean Text & Chunks",
    "description": "Turn a list of URLs or a small website into clean Markdown for search and knowledge bases: main text only, tables, code and links kept, optional heading-aware chunks. Plain HTTP, robots.txt respected.",
    "version": "0.1",
    "x-build-id": "4wvglNwTggJn8dzQk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goldstandardweb~website-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goldstandardweb-website-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/goldstandardweb~website-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-goldstandardweb-website-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/goldstandardweb~website-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-goldstandardweb-website-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Web pages or start URLs",
            "type": "array",
            "description": "Pages to convert, one full link per line (https://...). With \"Crawl the whole site\" on, each link is the starting point of a crawl of that site. Duplicates are removed, so each page is read and charged once. Up to 10,000 per run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "crawl": {
            "title": "Crawl the whole site",
            "type": "boolean",
            "description": "Off: read only the pages you listed. On: start at each link and follow the site's own links (same site only) plus its sitemap, within the depth and page limits below.",
            "default": false
          },
          "maxPagesPerSite": {
            "title": "Max pages per start link (crawl)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Crawl only: hard cap on pages read for each start link (two start links on the same site get a cap each). 1 to 10,000.",
            "default": 50
          },
          "maxCrawlDepth": {
            "title": "Max link depth (crawl)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Crawl only: how many clicks away from the start link to go. 0 = the start page only, 1 = plus the pages it links to, and so on. Pages found in the sitemap count as depth 1.",
            "default": 2
          },
          "stayWithinPath": {
            "title": "Stay inside the start folder (crawl)",
            "type": "boolean",
            "description": "Crawl only: with https://example.com/docs/intro as the start link, read only pages under https://example.com/docs/. Turn off to read the whole site.",
            "default": true
          },
          "useSitemap": {
            "title": "Use the site's sitemap (crawl)",
            "type": "boolean",
            "description": "Crawl only: also queue pages listed in the site's XML sitemap (found through robots.txt or /sitemap.xml), so pages without links to them are found too.",
            "default": true
          },
          "excludeUrlPatterns": {
            "title": "Skip links containing (crawl)",
            "type": "array",
            "description": "Crawl only: links containing any of these texts are not followed, for example /tag/ or ?page= or /login. Not case-sensitive. Up to 50.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mainContentOnly": {
            "title": "Main content only",
            "type": "boolean",
            "description": "On: keep the article or documentation text and drop menus, headers, footers, sidebars and cookie banners. Off: convert the whole page body (navigation, header and footer elements are still removed).",
            "default": true
          },
          "chunk": {
            "title": "Split into chunks",
            "type": "boolean",
            "description": "Add a \"chunks\" list to each page: pieces of about \"Chunk size\" tokens that follow the page's headings, ready to load into a search index, knowledge base or vector database.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (tokens)",
            "minimum": 100,
            "maximum": 8000,
            "type": "integer",
            "description": "Target size of each chunk in tokens (1 token is counted as about 4 characters). 100 to 8,000. Common choices are 300 to 1,000.",
            "default": 500
          },
          "chunkOverlap": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "Text repeated from the end of the previous chunk when a long section is split, so no sentence loses its context. 0 for none; at most half the chunk size. A new section never repeats text from the previous one.",
            "default": 50
          },
          "includeLinks": {
            "title": "Include page links",
            "type": "boolean",
            "description": "Add a \"links\" list with every link on the page (absolute addresses, up to 1,000), for example to map a site.",
            "default": false
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Keep images as Markdown image links with their alt text. Off by default because most text pipelines do not use them.",
            "default": false
          },
          "skipUnchanged": {
            "title": "Only new or changed pages",
            "type": "boolean",
            "description": "Remember each page's content between runs and skip pages whose text has not changed since the last run (skipped pages are not charged). Pages that are returned get changeStatus \"new\" or \"changed\". Changing the output settings (chunks, links, images, main content) returns every page once more. Use it with a schedule to keep a knowledge base up to date.",
            "default": false
          },
          "historyName": {
            "title": "History list name",
            "type": "string",
            "description": "Only with \"Only new or changed pages\": the name of the remembered list, so different projects keep separate histories. Letters, digits and dashes.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max charged pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many pages you pay for (pages that were read and have text). Failed, blocked, empty and robots.txt-protected pages are returned free and do not count. Up to 100,000.",
            "default": 1000
          },
          "maxRunMinutes": {
            "title": "Run time limit (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Hard limit for the whole run. When it is reached the run stops starting new pages and finishes cleanly; pages not read are listed in the log and are not charged. 1 to 600.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}