{
  "openapi": "3.0.1",
  "info": {
    "title": "URL to Markdown",
    "description": "Turn any web page into clean Markdown for LLMs and RAG. Strips navigation, ads and boilerplate, keeps the article. Plain HTTP first, browser only when a page needs it. Charges per page delivered, never for a page it could not read.",
    "version": "0.1",
    "x-build-id": "uYv9Zszy4DqWFAcMT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/munin~url-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-munin-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/munin~url-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-munin-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/munin~url-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-munin-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "The pages to convert. Paste one URL per line. Each one comes back as a row with the page's main content as Markdown, plus title, author, date and language.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxCrawlDepth": {
            "title": "Follow links, how deep",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "0 (default) converts only the URLs above. 1 also converts the pages they link to, 2 goes one step further, and so on. Use with \"Max pages\" so a crawl cannot run away from you.",
            "default": 0
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 0,
            "type": "integer",
            "description": "Hard stop on how many pages the run visits, successes and failures together. 0 means no limit.",
            "default": 0
          },
          "sameDomainOnly": {
            "title": "Stay on the same domain",
            "type": "boolean",
            "description": "On by default. Links pointing off the start URLs' domains are skipped. www. is ignored when comparing.",
            "default": true
          },
          "includeUrlPatterns": {
            "title": "Only follow URLs matching",
            "type": "array",
            "description": "Glob patterns, for example https://example.com/docs/**. Leave empty to follow everything allowed by the settings above. Applies to followed links only, never to the start URLs.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Never follow URLs matching",
            "type": "array",
            "description": "Glob patterns to skip, for example **/tag/** or **/?*. Checked before the include list.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "text",
              "html",
              "all"
            ],
            "type": "string",
            "description": "Markdown is what language models read best and is the default. Plain text drops all formatting. Cleaned HTML keeps the article markup. \"All three\" puts markdown, text and html on every row.",
            "default": "markdown"
          },
          "includeLinks": {
            "title": "Keep links",
            "type": "boolean",
            "description": "On keeps Markdown links with absolute URLs. Off keeps the anchor text and drops the URL, which makes cleaner input for embeddings.",
            "default": true
          },
          "includeImages": {
            "title": "Keep images",
            "type": "boolean",
            "description": "On keeps image references with absolute URLs. Off removes them.",
            "default": true
          },
          "keepNavigation": {
            "title": "Keep navigation and footers",
            "type": "boolean",
            "description": "Off by default: menus, headers, footers and sidebars are stripped so only the article body is left. Turn on for pages where the list itself is the content.",
            "default": false
          },
          "removeSelectors": {
            "title": "Remove these elements",
            "type": "array",
            "description": "CSS selectors deleted before extraction, for example .cookie-banner or #newsletter-signup. Use this when a site's boilerplate keeps showing up in the output.",
            "items": {
              "type": "string"
            }
          },
          "minWords": {
            "title": "Minimum words",
            "minimum": 0,
            "type": "integer",
            "description": "A page whose extracted body is shorter than this counts as failed rather than being returned as a near-empty row, and you are not charged for it. Japanese, Chinese and Korean are counted by characters instead.",
            "default": 25
          },
          "renderJavaScript": {
            "title": "JavaScript rendering",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "Auto (default) fetches over plain HTTP first and only opens a browser for pages that return nothing readable. Never skips the browser entirely, which is fastest. Always renders every page in a browser.",
            "default": "auto"
          },
          "waitForSelector": {
            "title": "Wait for this element",
            "type": "string",
            "description": "Only used when a page is rendered in a browser. A CSS selector to wait for before reading the page, for example article or .post-body."
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "How long to wait for one page before giving up on it. Browser rendering gets 15 seconds more than this.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many pages to fetch at once. Higher is faster, but hits per-site rate limits sooner.",
            "default": 8
          },
          "maxItems": {
            "title": "Max pages to deliver",
            "minimum": 0,
            "type": "integer",
            "description": "Stops the run once this many pages have been extracted successfully, so you can cap what you spend. 0 means no limit.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Only used as a retry, for pages that answer 403, 402 or 429 to a direct request. Most pages never touch it. Residential proxy gets through more paywalled-by-IP sites than datacenter.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}