{
  "openapi": "3.0.1",
  "info": {
    "title": "URL to Markdown Reader - $0.25/1K Pages | Johto Data",
    "description": "Read many URLs at once as Markdown cut to your token budget, with token counts and a content hash. Pass last hashes: unchanged pages are free. $0.25 per 1,000 pages; failed pages free.",
    "version": "0.1",
    "x-build-id": "uzfnwVPlGPdYUHLlK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/johto.data~llm-web-reader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-johto.data-llm-web-reader",
        "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/johto.data~llm-web-reader/runs": {
      "post": {
        "operationId": "runs-sync-johto.data-llm-web-reader",
        "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/johto.data~llm-web-reader/run-sync": {
      "post": {
        "operationId": "run-sync-johto.data-llm-web-reader",
        "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": {
          "query": {
            "title": "Page URLs (space-separated)",
            "type": "string",
            "description": "The web page URL to read, e.g. `https://docs.apify.com/platform/actors`. Same field name as apify/rag-web-browser. Several URLs separated by spaces are fetched in parallel; commas are kept as part of the URL. Keyword search is NOT supported: search with your own tool, then pass the URLs here. Use when: you have one page URL (or a few, space-separated). Don't use when: you only have keywords (search first) or the page needs JavaScript to render."
          },
          "urls": {
            "title": "More URLs",
            "type": "array",
            "description": "Optional list of page URLs to read in the same call (batch). Each item is one URL, used as given. Each successful page is one `fetch` event. Use when: you read a batch of URLs in one run (one start fee per batch).",
            "items": {
              "type": "string"
            }
          },
          "maxTokens": {
            "title": "Token budget per page",
            "minimum": 50,
            "maximum": 200000,
            "type": "integer",
            "description": "Return at most about this many tokens of Markdown per page (chars/4 estimate), e.g. `2000`. Overrides maxContentChars. `stats.tokensEstimateFull` still reports the full page size, so you can decide whether to read more. Use when: the page must fit a context window. Leave empty for the full page (up to maxContentChars)."
          },
          "knownHashes": {
            "title": "Known content hashes (pay only for changes)",
            "type": "object",
            "description": "Map of URL to the `stats.contentHash` you got last time, e.g. `{\"https://example.com/pricing\": \"ecb64355722797f8\"}`. If a page's content is the same, you get a row with `unchanged: true` and no Markdown, and that page is NOT charged. Use when: you re-check pages you read before and only want to pay for changes."
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Formats to return for each page. `markdown` (default) is best for LLMs. Same values as apify/rag-web-browser.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "maxContentChars": {
            "title": "Max characters per page",
            "minimum": 0,
            "type": "integer",
            "description": "Cut each page's content to this many characters to keep the payload small for your context window (about 5,000 tokens at the default). `stats.tokensEstimateFull` still reports the full size. 0 = no limit.",
            "default": 20000
          },
          "htmlTransformer": {
            "title": "Content extraction",
            "enum": [
              "readableText",
              "none"
            ],
            "type": "string",
            "description": "`readableText` (default) keeps the main article/body content and drops menus and boilerplate. `none` converts the whole page body after removing `removeElementsCssSelector`.",
            "default": "readableText"
          },
          "removeElementsCssSelector": {
            "title": "Remove elements (CSS)",
            "type": "string",
            "description": "CSS selector for elements to delete before conversion (used when htmlTransformer is `none`, and for the `text`/`html` formats).",
            "default": "nav, footer, script, style, noscript, svg, iframe, form, img[src^='data:'], [role=\"alert\"], [role=\"banner\"], [role=\"dialog\"], [role=\"alertdialog\"], [aria-modal=\"true\"], .cookie, #cookie, [class*=\"cookie-banner\"], [id*=\"cookie-banner\"]"
          },
          "includeLinks": {
            "title": "Include links",
            "type": "boolean",
            "description": "Also return the page's absolute links (up to 500) in `links`, for agents that browse onward. Use when: your agent browses onward from this page.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (s)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per-page timeout in seconds. Same name and default as apify/rag-web-browser.",
            "default": 40
          },
          "maxRequestRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries per page on network error or HTTP 5xx.",
            "default": 1
          },
          "desiredConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages fetched in parallel when several URLs are given.",
            "default": 5
          },
          "maxUrls": {
            "title": "Max URLs per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on how many URLs one run reads. Use it to cap spend: each page with content costs $0.00025 ($0.25 per 1,000).",
            "default": 100
          },
          "scrapingTool": {
            "title": "Scraping tool",
            "enum": [
              "raw-http",
              "browser-playwright"
            ],
            "type": "string",
            "description": "Accepted for apify/rag-web-browser compatibility. This Actor always uses fast raw HTTP (no JavaScript rendering).",
            "default": "raw-http"
          },
          "maxResults": {
            "title": "Max results (compatibility)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Accepted for apify/rag-web-browser compatibility; ignored because there is no search step.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Off by default (direct, fastest). Use when: a site blocks direct requests. Leave off otherwise.",
            "default": {
              "useApifyProxy": false
            }
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Keep Open Graph and JSON-LD blocks in `metadata`.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}