{
  "openapi": "3.0.1",
  "info": {
    "title": "URL to Markdown for LLM & RAG (fast, cheap)",
    "description": "Convert any public web page to clean, LLM-ready Markdown or text: main-content extraction, metadata, optional same-site crawl and RAG chunking. Plain HTTP, no browser, so it is fast and cheap. Respects robots.txt.",
    "version": "0.1",
    "x-build-id": "zpjeycV3t3mWruRcc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/liora-tools~url-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-liora-tools-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/liora-tools~url-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-liora-tools-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/liora-tools~url-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-liora-tools-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Public web pages to convert.",
            "items": {
              "type": "string"
            }
          },
          "extractMode": {
            "title": "What to extract",
            "enum": [
              "main",
              "full"
            ],
            "type": "string",
            "description": "Main content is best for LLMs and RAG.",
            "default": "main"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "text"
            ],
            "type": "string",
            "description": "Markdown keeps headings, lists, tables and links.",
            "default": "markdown"
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "0 = only the given URLs. 1+ = also follow links on the same website up to this many clicks away.",
            "default": 0
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit on pages visited when crawling.",
            "default": 100
          },
          "includeUrlRegex": {
            "title": "Only follow URLs matching (regex)",
            "type": "array",
            "description": "Optional. When crawling, follow only links that match one of these regular expressions, e.g. /docs/.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlRegex": {
            "title": "Exclude URLs (regex)",
            "type": "array",
            "description": "Crawled links matching any of these regular expressions are skipped, e.g. /tag/ or \\\\?page=",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "useSitemap": {
            "title": "Seed from sitemap.xml",
            "type": "boolean",
            "description": "Also queue pages listed in the site's sitemap (found via robots.txt or /sitemap.xml), up to Max pages. Good for whole-site conversion without deep crawling.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "If above 0, also split the content into chunks on paragraph boundaries (for embeddings). 0 = no chunking.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Characters repeated at the start of each next chunk.",
            "default": 200
          },
          "includeLinks": {
            "title": "Include list of links",
            "type": "boolean",
            "description": "Add all absolute links found on the page.",
            "default": false
          },
          "includeImages": {
            "title": "Keep images",
            "type": "boolean",
            "description": "Keep images as Markdown image links.",
            "default": false
          },
          "removeSelectors": {
            "title": "Remove CSS selectors",
            "type": "array",
            "description": "Elements to delete before conversion, e.g. nav, footer, .cookie-banner",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keepSelectors": {
            "title": "Keep only CSS selectors",
            "type": "array",
            "description": "If set, only these elements are converted, e.g. article, main, #content",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "saveHtml": {
            "title": "Save raw HTML",
            "type": "boolean",
            "description": "Store each page's raw HTML in the run's key-value store; the record key is in htmlKey.",
            "default": false
          },
          "generateLlmsTxt": {
            "title": "Generate llms.txt",
            "type": "boolean",
            "description": "Writes llms.txt (index of pages) and llms-full.txt (all content) to the key-value store at the end of the run.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many converted pages (0 = no limit). Caps your cost.",
            "default": 0
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages the site disallows for crawlers (skipped pages are free).",
            "default": true
          },
          "acceptLanguage": {
            "title": "Accept-Language header",
            "type": "string",
            "description": "Preferred page language.",
            "default": "en-US,en;q=0.8"
          },
          "requestHeaders": {
            "title": "Custom HTTP headers",
            "type": "object",
            "description": "Extra request headers, e.g. for your own staging site. Never logged. Not for bypassing logins or bot protection.",
            "default": {}
          },
          "onlyChanged": {
            "title": "Only changed pages",
            "type": "boolean",
            "description": "For scheduled monitoring: pages whose HTML did not change since the last run with the same state key are skipped for free.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the memory used by 'Only changed pages'.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many pages are fetched at the same time.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}