{
  "openapi": "3.0.1",
  "info": {
    "title": "Web Scraper For Llms",
    "description": "Stealth web scraping engine built for LLMs. Converts any web page to clean markdown or HTML",
    "version": "0.1",
    "x-build-id": "rLxN7cRc12ooaT29F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~web-scraper-for-llms/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-web-scraper-for-llms",
        "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~web-scraper-for-llms/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-web-scraper-for-llms",
        "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~web-scraper-for-llms/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-web-scraper-for-llms",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "URLs to scrape. When crawl is enabled, each URL is used as a seed to discover linked pages.",
            "items": {
              "type": "string"
            }
          },
          "crawl": {
            "title": "Enable Crawl Mode (follow links and scrape discovered pages)",
            "type": "boolean",
            "description": "When enabled, the scraper will follow links from each URL to discover and scrape additional pages. Use Crawl Depth and Max Pages below to control how far it goes.",
            "default": false
          },
          "crawlDepth": {
            "title": "Crawl Depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many link hops from the starting URL. Ignored when crawl is off.",
            "default": 1
          },
          "crawlMaxPages": {
            "title": "Max Pages to Discover",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum pages to discover per seed URL. Ignored when crawl is off.",
            "default": 20
          },
          "formats": {
            "title": "Output Formats",
            "type": "array",
            "description": "Which content formats to extract.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "html"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of URLs to process in parallel.",
            "default": 3
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts for failed URLs. Ignored when crawl is on.",
            "default": 2
          },
          "timeoutMs": {
            "title": "Timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Request timeout per URL in milliseconds.",
            "default": 30000
          },
          "onlyMainContent": {
            "title": "Only Main Content",
            "type": "boolean",
            "description": "Extract only main content, removing nav/header/footer/sidebar. Ignored when crawl is on.",
            "default": true
          },
          "removeAds": {
            "title": "Remove Ads",
            "type": "boolean",
            "description": "Remove ads and tracking elements.",
            "default": true
          },
          "removeBase64Images": {
            "title": "Remove Base64 Images",
            "type": "boolean",
            "description": "Remove base64-encoded images to reduce output size.",
            "default": true
          },
          "includeTags": {
            "title": "Include Tags",
            "type": "array",
            "description": "CSS selectors for elements to include. If set, only matching elements are kept. Ignored when crawl is on.",
            "items": {
              "type": "string"
            }
          },
          "excludeTags": {
            "title": "Exclude Tags",
            "type": "array",
            "description": "CSS selectors for elements to exclude from output. Ignored when crawl is on.",
            "items": {
              "type": "string"
            }
          },
          "includePatterns": {
            "title": "Include URL Patterns",
            "type": "array",
            "description": "Regex patterns for URL filtering. In crawl mode, controls which discovered links to follow.",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URL Patterns",
            "type": "array",
            "description": "Regex patterns for URL filtering. In crawl mode, controls which discovered links to skip.",
            "items": {
              "type": "string"
            }
          },
          "waitForSelector": {
            "title": "Wait For Selector",
            "type": "string",
            "description": "CSS selector to wait for before considering page loaded. Ignored when crawl is on."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify proxy configuration."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}