{
  "openapi": "3.0.1",
  "info": {
    "title": "RAG Web Browser — URL & Website to Markdown for LLM & RAG",
    "description": "Search the web or pass URLs and get each page as clean Markdown, plain text or HTML with title and source URL, ready for LLM and RAG pipelines. Crawls links up to 3 hops, up to 1000 URLs per run, pay only per converted page.",
    "version": "0.3",
    "x-build-id": "dpX0LDhDWW0dFt8rj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~rag-web-browser/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-rag-web-browser",
        "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/s-r~rag-web-browser/runs": {
      "post": {
        "operationId": "runs-sync-s-r-rag-web-browser",
        "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/s-r~rag-web-browser/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-rag-web-browser",
        "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": "Search query",
            "type": "string",
            "description": "Search the web and convert the top results to Markdown. Leave empty if you already know the URLs. Pasting a single URL here works too — it is fetched directly instead of searched."
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Specific pages to convert. Use this instead of (or together with) a search query. Bare domains like example.com are accepted.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max search results",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many top search results to fetch when a search query is given. Ignored in URL-only mode.",
            "default": 5
          },
          "searchLanguage": {
            "title": "Search language",
            "type": "string",
            "description": "Two-letter language code to narrow search results, e.g. en, de, nl, fr. Leave empty for no language filter. Note: this filters by language, not by country.",
            "default": ""
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which representations to include on every row. Markdown is the extracted content; text is that with the Markdown syntax stripped; HTML is rendered from the Markdown (it is not the origin page's own markup).",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html"
              ],
              "enumTitles": [
                "Markdown",
                "Plain text",
                "HTML"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "includeMetadata": {
            "title": "Include page metadata",
            "type": "boolean",
            "description": "Add title, description, publishedTime and finalUrl columns to each row.",
            "default": true
          },
          "minContentLength": {
            "title": "Minimum content length",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Pages with less extracted text than this are flagged with contentWarning rather than dropped. Raise it to be stricter about thin pages.",
            "default": 200
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "0 fetches only the pages you asked for. 1 also follows links found in those pages, 2 follows links from those, and so on.",
            "default": 0
          },
          "maxCrawlPages": {
            "title": "Max pages per crawl",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard ceiling on total pages fetched when crawl depth is above 0. This is your cost cap.",
            "default": 10
          },
          "sameDomainOnly": {
            "title": "Stay on the same domain",
            "type": "boolean",
            "description": "Only follow links that stay on the starting page's domain. www and the bare domain count as the same site.",
            "default": true
          },
          "excludeUrlPatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Skip any URL containing one of these substrings, e.g. /tag/ or ?replytocom. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "concurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pages fetched in parallel. The default of 10 is the measured throughput peak; going much higher trips upstream rate limits and gets slower, not faster.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for a single page before giving up on that attempt.",
            "default": 30
          },
          "hedgeDelaySecs": {
            "title": "Hedge delay (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "If the first content provider has not answered within this many seconds, a second one is tried in parallel and the first good response wins. Lower is faster but issues more upstream requests.",
            "default": 4
          },
          "maxRetries": {
            "title": "Max retries per provider",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries per content provider for a rate-limited or failed page.",
            "default": 2
          },
          "cursor": {
            "title": "Continuation cursor (API only)",
            "type": "string",
            "description": "Leave empty. Only for API users who continue a run from the next_cursor value of an earlier response; use it with exactly the same input."
          },
          "pageLimit": {
            "title": "Maximum result rows",
            "minimum": 1,
            "maximum": 1200,
            "type": "integer",
            "description": "Maximum number of result rows for this run. The default (1200) keeps the behaviour of earlier runs; lower it to stop a large run early.",
            "default": 1200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}