{
  "openapi": "3.0.1",
  "info": {
    "title": "RAG Web Browser - Google Search to Markdown for AI",
    "description": "Web search and fetch for AI agents and RAG: searches Google and returns the top results as clean Markdown, or reads any URL. Main content only, token counts, metadata, any country and language, many queries per run. Plain HTTP, no browser: seconds per query.",
    "version": "0.1",
    "x-build-id": "pEwAwz7ZdjohgSFVT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eiv~rag-web-browser/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eiv-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/eiv~rag-web-browser/runs": {
      "post": {
        "operationId": "runs-sync-eiv-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/eiv~rag-web-browser/run-sync": {
      "post": {
        "operationId": "run-sync-eiv-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": "A Google search, e.g. \"best open-source vector databases\" (operators work: site:, -site:, \"exact phrase\", after:2026-01-01), or the URL of one page to read, e.g. https://docs.apify.com. Several lines are read as several queries."
          },
          "queries": {
            "title": "More queries or URLs",
            "type": "array",
            "description": "Any number of further searches or URLs, one per line, read in the same run. Duplicates are skipped.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (for chaining Actors)",
            "type": "array",
            "description": "Pages to read, in the URL-list shape other Actors output, so a previous Actor's results can be fed straight in. Read like URLs in the fields above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Results per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of Google's top organic results to read for each search. Every page read is one charged result. 3-5 is typical for an AI agent; up to 100 (Google's further result pages are fetched as needed). Ignored for URLs.",
            "default": 3
          },
          "replaceFailedPages": {
            "title": "Replace pages that fail",
            "type": "boolean",
            "description": "When a result cannot be read (the site blocks automated visitors, a PDF, a dead link), read the next Google result in its place, so a search returns as many pages as asked for. The failed result is still listed, uncharged.",
            "default": true
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "What to return for each page: Markdown (best for LLMs), plain text, the cleaned HTML of the content, and the page's links. Any combination; the price per page is the same.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html",
                "links"
              ],
              "enumTitles": [
                "Markdown",
                "Plain text",
                "HTML (cleaned)",
                "Links"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "htmlTransformer": {
            "title": "Content to keep",
            "enum": [
              "readableText",
              "none"
            ],
            "type": "string",
            "description": "Main content (default): the article, docs or post body, without menus, sidebars, footers, cookie banners and comment threads; a page whose text is spread out keeps everything. Whole page: everything except the elements removed below.",
            "default": "readableText"
          },
          "maxCharsPerPage": {
            "title": "Max characters per page",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cut each page's Markdown and text at this many characters, on a paragraph boundary, to keep an LLM's context small (8,000 characters is about 2,000 tokens). Rows say contentTruncated. 0 = no cap.",
            "default": 0
          },
          "removeElementsCssSelector": {
            "title": "Remove HTML elements",
            "type": "string",
            "description": "CSS selector of elements to remove before the content is read, e.g. \".ad, .newsletter\". Empty removes nothing extra. Scripts, styles and form controls are always removed.",
            "default": "nav, footer, script, style, noscript, svg, img[src^='data:'],\n[role=\"alert\"],\n[role=\"banner\"],\n[role=\"dialog\"],\n[role=\"alertdialog\"],\n[role=\"region\"][aria-label*=\"skip\" i],\n[aria-modal=\"true\"]"
          },
          "countryCode": {
            "title": "Search from country",
            "enum": [
              "",
              "af",
              "al",
              "dz",
              "as",
              "ad",
              "ao",
              "ai",
              "aq",
              "ag",
              "ar",
              "am",
              "aw",
              "au",
              "at",
              "az",
              "bs",
              "bh",
              "bd",
              "bb",
              "by",
              "be",
              "bz",
              "bj",
              "bm",
              "bt",
              "bo",
              "ba",
              "bw",
              "bv",
              "br",
              "io",
              "bn",
              "bg",
              "bf",
              "bi",
              "kh",
              "cm",
              "ca",
              "cv",
              "ky",
              "cf",
              "td",
              "cl",
              "cn",
              "cx",
              "cc",
              "co",
              "km",
              "cd",
              "cg",
              "ck",
              "cr",
              "ci",
              "hr",
              "cu",
              "cy",
              "cz",
              "dk",
              "dj",
              "dm",
              "do",
              "ec",
              "eg",
              "sv",
              "gq",
              "er",
              "ee",
              "sz",
              "et",
              "fk",
              "fo",
              "fj",
              "fi",
              "fr",
              "gf",
              "pf",
              "tf",
              "ga",
              "gm",
              "ge",
              "de",
              "gh",
              "gi",
              "gr",
              "gl",
              "gd",
              "gp",
              "gu",
              "gt",
              "gn",
              "gw",
              "gy",
              "ht",
              "hm",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "ir",
              "iq",
              "ie",
              "il",
              "it",
              "jm",
              "jp",
              "jo",
              "kz",
              "ke",
              "ki",
              "kw",
              "kg",
              "la",
              "lv",
              "lb",
              "ls",
              "lr",
              "ly",
              "li",
              "lt",
              "lu",
              "mo",
              "mg",
              "mw",
              "my",
              "mv",
              "ml",
              "mt",
              "mh",
              "mq",
              "mr",
              "mu",
              "yt",
              "mx",
              "fm",
              "md",
              "mc",
              "mn",
              "me",
              "ms",
              "ma",
              "mz",
              "mm",
              "na",
              "nr",
              "np",
              "nl",
              "an",
              "nc",
              "nz",
              "ni",
              "ne",
              "ng",
              "nu",
              "nf",
              "kp",
              "mk",
              "mp",
              "no",
              "om",
              "pk",
              "pw",
              "ps",
              "pa",
              "pg",
              "py",
              "pe",
              "ph",
              "pn",
              "pl",
              "pt",
              "pr",
              "qa",
              "re",
              "ro",
              "ru",
              "rw",
              "sh",
              "kn",
              "lc",
              "pm",
              "vc",
              "ws",
              "sm",
              "st",
              "sa",
              "sn",
              "rs",
              "sc",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "so",
              "za",
              "gs",
              "kr",
              "es",
              "lk",
              "sd",
              "sr",
              "sj",
              "se",
              "ch",
              "sy",
              "tw",
              "tj",
              "tz",
              "th",
              "tl",
              "tg",
              "tk",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "tc",
              "tv",
              "ug",
              "ua",
              "ae",
              "gb",
              "us",
              "um",
              "uy",
              "uz",
              "vu",
              "va",
              "ve",
              "vn",
              "vg",
              "vi",
              "wf",
              "eh",
              "ye",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "The country Google searches from (gl): results as a person there sees them. Default: United States.",
            "default": ""
          },
          "languageCode": {
            "title": "Interface language",
            "enum": [
              "",
              "af",
              "sq",
              "am",
              "ar",
              "hy",
              "az",
              "eu",
              "be",
              "bn",
              "bh",
              "bs",
              "bg",
              "my",
              "ca",
              "zh-CN",
              "zh-TW",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "eo",
              "et",
              "fo",
              "fi",
              "fr",
              "fy",
              "gl",
              "ka",
              "de",
              "el",
              "gu",
              "iw",
              "hi",
              "hu",
              "is",
              "id",
              "ia",
              "ga",
              "it",
              "ja",
              "jw",
              "kn",
              "km",
              "ko",
              "lo",
              "la",
              "lv",
              "lt",
              "mk",
              "ms",
              "ml",
              "mt",
              "mr",
              "mn",
              "ne",
              "no",
              "nn",
              "oc",
              "fa",
              "pl",
              "pt-BR",
              "pt-PT",
              "pa",
              "ro",
              "ru",
              "sm",
              "gd",
              "sr",
              "si",
              "sk",
              "sl",
              "so",
              "es",
              "su",
              "sw",
              "sv",
              "tl",
              "ta",
              "te",
              "th",
              "ti",
              "tr",
              "uk",
              "ur",
              "uz",
              "vi",
              "cy",
              "xh",
              "zu"
            ],
            "type": "string",
            "description": "Google's interface language (hl), which also steers result language. Default: the country's own language.",
            "default": ""
          },
          "timeRange": {
            "title": "Results from",
            "enum": [
              "",
              "h",
              "d",
              "w",
              "m",
              "y"
            ],
            "type": "string",
            "description": "Only results Google dates within this period, for fresh news and recent posts.",
            "default": ""
          },
          "maxItems": {
            "title": "Max pages per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many pages read in total, across all queries. You pay per page read, so this is also your cost cap for the run.",
            "default": 1000
          },
          "requestTimeoutSecs": {
            "title": "Time per query",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Time budget for one query: the Google search and all its pages. Pages still loading when it runs out are returned as TIMEOUT rows (not charged), so an agent gets its answer in time. Searches the run retries at the end get a new budget.",
            "default": 40
          },
          "maxRequestRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries for a page that is refused (403, 429, a bot check), drops the connection or does not answer within 12 s; each retry comes from a fresh IP, within the time per query. 404s are not retried.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Queries at a time",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many queries run in parallel. The pages of each query are always fetched in parallel.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy for pages",
            "type": "object",
            "description": "Off by default: pages load from the Actor's own IP, and a refused page is retried through Apify datacenter proxy automatically. Turn it on to send every page through datacenter proxy or your own proxy URLs. Residential is not used for pages.",
            "default": {
              "useApifyProxy": false
            }
          },
          "debugMode": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every search and page request (route, HTTP status, time, error) in the run log, for troubleshooting a site that will not load.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}