{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Agent Web Fetcher",
    "description": "An advanced web fetcher that can fetch almost all websites and convert them to LLM-friendly Markdown format. Perfect for AI agents, RAG systems, and integration with search actors.",
    "version": "0.1",
    "x-build-id": "Ns9FPWx6lB07TlzlR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~ai-fetch-python/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-ai-fetch-python",
        "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/abotapi~ai-fetch-python/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-ai-fetch-python",
        "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/abotapi~ai-fetch-python/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-ai-fetch-python",
        "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": {
          "url": {
            "title": "URL to fetch",
            "type": "string",
            "description": "The URL of the webpage to fetch (single URL mode). If the Start URLs list is left at its two built-in examples, only this URL is fetched (1 page, 1 result row); if you edit the list, this URL and the list are fetched together (duplicates removed). Clear this field to fetch the list alone. Exception: the default value https://www.google.com is not added to an edited list; to fetch google.com together with your own list, put it in the Start URLs list.",
            "default": "https://www.google.com"
          },
          "startUrls": {
            "title": "Start URLs (multiple)",
            "type": "array",
            "description": "Fetch several URLs in one run (used when no Dataset ID is given). Each page becomes one result row. Capped by Max pages. The form ships with two examples (a plain static page and a long article). If this list is left at those two examples, only the URL field above is fetched (1 page, 1 result row); if you edit the list, the URL field and your list are fetched together (duplicates removed). Clear the URL field to fetch just the two examples or your own list. Exception: the default value https://www.google.com is not added to an edited list; to fetch google.com together with your own list, put it in the Start URLs list.",
            "default": [
              {
                "url": "https://www.example.com"
              },
              {
                "url": "https://en.wikipedia.org/wiki/Web_scraping"
              }
            ]
          },
          "datasetId": {
            "title": "Dataset ID (Integration Mode)",
            "type": "string",
            "description": "Dataset ID containing URLs to fetch. Used when integrating with search actors. Leave empty for single URL mode."
          },
          "urlField": {
            "title": "URL Field Name",
            "type": "string",
            "description": "Field name in dataset items containing the URL (default: 'link')",
            "default": "link"
          },
          "maxUrls": {
            "title": "Maximum URLs to Fetch",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of URLs to fetch from dataset (1-100)",
            "default": 10
          },
          "maxCrawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "0 (default) fetches only the given URLs. 1-10 also follows same-site links found on each page, that many levels deep. Every fetched page is one billed result row; failed pages (HTTP errors, non-HTML files) are skipped and never billed. (Not used with Dataset ID: dataset mode fetches only the dataset's links.)",
            "default": 0
          },
          "maxCrawlPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on pages fetched in a multi-URL or crawl run (1-1000).",
            "default": 10
          },
          "includeUrlGlobs": {
            "title": "Include URL globs",
            "type": "array",
            "description": "Crawl only links matching one of these glob patterns, e.g. https://example.com/blog/* (Not used with Dataset ID: dataset mode fetches only the dataset's links.)",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlGlobs": {
            "title": "Exclude URL globs",
            "type": "array",
            "description": "Skip links matching any of these glob patterns. (Not used with Dataset ID: dataset mode fetches only the dataset's links.)",
            "items": {
              "type": "string"
            }
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "CSS selector to wait for (up to 15 s) before reading the page. Uses the standard browser path instead of the stealth first path."
          },
          "customHttpHeaders": {
            "title": "Custom HTTP headers",
            "type": "object",
            "description": "Extra request headers as a JSON object, e.g. {\"Accept-Language\": \"de\"}. Uses the standard browser path instead of the stealth first path."
          },
          "initialCookies": {
            "title": "Initial cookies",
            "type": "array",
            "description": "Cookies set before loading, e.g. [{\"name\":\"a\",\"value\":\"b\"}] (optional domain, path). Uses the standard browser path instead of the stealth first path."
          },
          "engine": {
            "title": "Fetch engine",
            "enum": [
              "auto",
              "http",
              "browser"
            ],
            "type": "string",
            "description": "auto (default) is the browser-based fetch with automatic fallback. http tries one plain HTTP request first (cheaper, no JavaScript) and falls back to auto. browser skips the first browser path and uses the standard browser directly. The plain HTTP step is skipped when screenshots, custom headers, cookies or a wait selector are set.",
            "default": "auto"
          },
          "removeElementsCssSelector": {
            "title": "Remove elements (CSS)",
            "type": "string",
            "description": "CSS selector of elements to drop from the page before the Markdown/text conversion (e.g. nav, .sidebar). Empty keeps the built-in cleanup only."
          },
          "keepElementsCssSelector": {
            "title": "Keep only elements (CSS)",
            "type": "string",
            "description": "If set, only the matching elements are converted to Markdown/text."
          },
          "saveHtml": {
            "title": "Include raw HTML in rows",
            "type": "boolean",
            "description": "Adds the full page HTML to the html field of each row (larger dataset).",
            "default": false
          },
          "saveHtmlAsFile": {
            "title": "Save HTML as file",
            "type": "boolean",
            "description": "Stores each page HTML as a file in the key-value store and puts its link in htmlUrl.",
            "default": false
          },
          "saveScreenshots": {
            "title": "Save screenshots",
            "type": "boolean",
            "description": "Takes a screenshot per page, stores it in the key-value store and puts its link in screenshotUrl. Uses the standard browser path instead of the stealth first path.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait Until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "When to consider navigation succeeded.",
            "default": "domcontentloaded"
          },
          "debug": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Adds a debug object (fetch seconds, HTML length, engine, links found) to each row.",
            "default": false
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy settings. Enable Apify Proxy with RESIDENTIAL group for best results on protected sites."
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify -> Settings -> Integrations, then select it here. The connector receives a condensed, human-readable summary per item (title + key fields), not the full JSON; the complete record stays in the dataset. Leave empty to skip. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL (or id) of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}