{
  "openapi": "3.0.1",
  "info": {
    "title": "RAG Web Browser",
    "description": "Search the web or fetch direct URLs and return clean markdown for LLM/RAG pipelines. filters: domainAllowlist/Blocklist, minTextLength, keywordsAnyOf. No login, no cookies.",
    "version": "1.0",
    "x-build-id": "OjRc7qyvqfcBdd4z4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~rag-web-browser/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-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/crawlerbros~rag-web-browser/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-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/crawlerbros~rag-web-browser/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-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 (or URL)",
            "type": "string",
            "description": "Free-text search query OR a single URL. When `startUrls` is also set, both are processed.",
            "default": "what is retrieval augmented generation"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct URLs to fetch. When set, the actor skips Google search and fetches each URL directly.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max search results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "When `query` is a search term, how many top organic results to fetch.",
            "default": 3
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which textual representations to include per page. Combine any of `markdown`, `text`, `html`.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html"
              ],
              "enumTitles": [
                "Markdown",
                "Plain text",
                "HTML"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Per-page HTTP timeout.",
            "default": 40
          },
          "scrapingTool": {
            "title": "Scraping tool",
            "enum": [
              "raw-http",
              "browser-playwright"
            ],
            "type": "string",
            "description": "`raw-http` is fast (curl_cffi with chrome131 impersonation). `browser-playwright` runs a headless browser for JS-heavy pages.",
            "default": "raw-http"
          },
          "removeElementsCssSelector": {
            "title": "Strip elements (CSS selector)",
            "type": "string",
            "description": "CSS selector matching elements to remove before extraction (e.g. `nav, footer, aside, .ad`). One comma-separated string.",
            "default": "nav, footer, aside, script, style, .ad, .advertisement, [aria-hidden='true']"
          },
          "htmlTransformer": {
            "title": "HTML transformer",
            "enum": [
              "none",
              "readable-text"
            ],
            "type": "string",
            "description": "`none` keeps full HTML; `readable-text` extracts the main article text (best for blog posts, news).",
            "default": "readable-text"
          },
          "desiredConcurrency": {
            "title": "Desired concurrency",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many URLs to fetch in parallel. Set 0 for auto.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Max retries per URL",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries on transient HTTP failures (429/5xx).",
            "default": 2
          },
          "dynamicContentWaitSecs": {
            "title": "Dynamic content wait (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "When `scrapingTool=browser-playwright`, how long to wait for JS-loaded content.",
            "default": 5
          },
          "removeCookieWarnings": {
            "title": "Remove cookie warnings",
            "type": "boolean",
            "description": "When true, dismisses common cookie/consent dialogs in browser mode.",
            "default": true
          },
          "useApifyProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "Route requests through Apify proxy. Recommended for Google search and some target sites.",
            "default": true
          },
          "domainAllowlist": {
            "title": "Domain allowlist",
            "type": "array",
            "description": "Only emit pages whose host contains one of these substrings (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "domainBlocklist": {
            "title": "Domain blocklist",
            "type": "array",
            "description": "Drop pages whose host contains one of these substrings.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minTextLength": {
            "title": "Min text length",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop pages with fewer than N characters of extracted text. Filters out thin / parking-page results."
          },
          "excludeContentSelectors": {
            "title": "Exclude content selectors",
            "type": "array",
            "description": "Additional CSS selectors to strip — extends `removeElementsCssSelector`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordsAnyOf": {
            "title": "Must contain (any-of)",
            "type": "array",
            "description": "Only emit pages whose extracted text contains at least one of these keywords (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}