{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown Crawler",
    "description": "Crawl any website or search the web and get each page as clean Markdown for AI, RAG and LLM apps: main content without menus or ads, title, description, language and links. From $1 per 1,000 pages.",
    "version": "0.1",
    "x-build-id": "SyjpNwuMaAXs3lVYW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tacps126~website-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tacps126-website-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/tacps126~website-markdown/runs": {
      "post": {
        "operationId": "runs-sync-tacps126-website-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/tacps126~website-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-tacps126-website-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": {
          "startUrls": {
            "title": "Websites to crawl",
            "type": "array",
            "description": "Website or page addresses. Each is read with the pages it links to on the same site, up to the depth and page limits below. Leave empty to only search.",
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Web searches",
            "type": "array",
            "description": "Search phrases or questions. The top results are read as pages, each with its search rank, title and snippet. Leave empty to only crawl.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Results per search",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Search results read as pages for each search.",
            "default": 5
          },
          "maxPagesPerSite": {
            "title": "Max pages per website",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Pages read for each start address, the start page included.",
            "default": 20
          },
          "maxDepth": {
            "title": "Link depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many links away from the start page to go. 0 reads only the start pages.",
            "default": 2
          },
          "stayUnderStartPath": {
            "title": "Stay under the start path",
            "type": "boolean",
            "description": "Only follow links under the start address's path, for example /docs/ pages when you start at /docs.",
            "default": true
          },
          "excludeUrlPatterns": {
            "title": "Skip links containing",
            "type": "array",
            "description": "Links whose address contains any of these texts are not followed (for example /tag/, ?page=, /login).",
            "items": {
              "type": "string"
            }
          },
          "fullPage": {
            "title": "Whole page",
            "type": "boolean",
            "description": "Keep the whole page body. Off: only the main content, without menus, headers, footers and ads.",
            "default": false
          },
          "includeText": {
            "title": "Plain text too",
            "type": "boolean",
            "description": "Add a plain text version next to the Markdown.",
            "default": false
          },
          "includeLinks": {
            "title": "Page links",
            "type": "boolean",
            "description": "Add every link found on the page.",
            "default": false
          },
          "minWords": {
            "title": "Min words",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Skip pages with fewer words than this (empty or near-empty pages are always skipped).",
            "default": 0
          },
          "searchLanguage": {
            "title": "Search language",
            "type": "string",
            "description": "Two-letter language code for web searches.",
            "default": "en"
          },
          "searchCountry": {
            "title": "Search country",
            "type": "string",
            "description": "Two-letter country code for web searches.",
            "default": "us"
          },
          "maxItems": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of pages to return in total.",
            "default": 200
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Keep the default setting for reliable results.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debug": {
            "title": "Debug log",
            "type": "boolean",
            "description": "More detail in the run log.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}