{
  "openapi": "3.0.1",
  "info": {
    "title": "RAG Web Browser: Web Search to LLM Context & Markdown",
    "description": "Search the web and get the top results as one LLM-ready context block, their passages that answer the query under numbered sources to cite, and each page or PDF as Markdown; or fetch one URL. Chunks scored for relevance. Standby answers MCP calls in seconds. $2.50 per 1,000 searches of 3 pages.",
    "version": "0.1",
    "x-build-id": "q3VUlQBRbMK3bgKB3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pikoulas~rag-web-browser/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pikoulas-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/pikoulas~rag-web-browser/runs": {
      "post": {
        "operationId": "runs-sync-pikoulas-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/pikoulas~rag-web-browser/run-sync": {
      "post": {
        "operationId": "run-sync-pikoulas-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",
        "required": [
          "query"
        ],
        "properties": {
          "query": {
            "title": "Search terms or URL",
            "type": "string",
            "description": "What to search the web for, or the URL of one page to fetch. Search operators work: \"exact phrase\", site:openai.com, -site:reddit.com. A URL (https://... or example.com/page) is fetched as it is, without a search."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of the top organic results to fetch, in rank order. Ignored when the query is a URL.",
            "default": 3
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only results from the past day, week, month or year, as the search engines date them.",
            "default": "any"
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Each page's main content as Markdown (headings, lists, tables, code blocks and links kept), plain text, and the cleaned HTML of that content.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html"
              ],
              "enumTitles": [
                "Markdown",
                "Text",
                "Cleaned HTML"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Keep the content's images in the Markdown, as ![alt](url). Off saves tokens.",
            "default": false
          },
          "maxTokensPerPage": {
            "title": "Max tokens per page",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep each page's content within this many tokens: the passages that best match the search terms, in page order under their headings, with … where text is left out, then the page's start while it fits. A URL given as the query keeps the page's start. 0 for the whole page.",
            "default": 0
          },
          "includeContext": {
            "title": "LLM context block",
            "type": "boolean",
            "description": "Add a free row after the pages: their passages that best match the query in one text, each page under a numbered source line ([1] title and URL), ready to paste into a prompt so the answer can cite its sources. In Standby, includeContext=true adds it as the last item.",
            "default": false
          },
          "contextTokens": {
            "title": "Context block tokens",
            "minimum": 200,
            "maximum": 100000,
            "type": "integer",
            "description": "The context block's size in tokens, shared evenly among the pages.",
            "default": 4000
          },
          "chunkSize": {
            "title": "Chunk size (tokens)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Also cut each page's content into chunks of up to this many tokens for embedding: by its headings, long sections between paragraphs, each chunk with the headings it sits under. 0 for none.",
            "default": 0
          },
          "removeElementsCssSelector": {
            "title": "Remove elements (CSS selector)",
            "type": "string",
            "description": "Elements to leave out of the content besides the page's menus, header, footer, sidebars and banners, which are left out anyway, e.g. .newsletter, #comments, figure."
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "The time the whole request has, the search included. A page not loaded by then comes with an error, and the others are returned.",
            "default": 40
          },
          "maxRequestRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Times a page is asked again after a network error, a server error (5xx) or a 429.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most sites. The result pages are fetched through this proxy; datacenter IPs cost nothing extra, residential ones are charged per 100 KB fetched. A search engine refusing the run's IP is asked again through Apify's residential proxy by itself.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}