{
  "openapi": "3.0.1",
  "info": {
    "title": "Ai Web Scraper - Extract Data With Ease",
    "description": "Ai Web Scraper enables scraping for everyone, including non-techies! It uses Google's Gemini LLM to scrape websites with natural language commands. It dynamically extracts data, no selector input needed, handles dynamic content and cookie consent, avoids bot detection, outputs JSON or other formats.",
    "version": "0.0",
    "x-build-id": "VoUe5PEx2880yElNG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eloquent_mountain~ai-web-scraper-extract-data-with-ease/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eloquent_mountain-ai-web-scraper-extract-data-with-ease",
        "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/eloquent_mountain~ai-web-scraper-extract-data-with-ease/runs": {
      "post": {
        "operationId": "runs-sync-eloquent_mountain-ai-web-scraper-extract-data-with-ease",
        "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/eloquent_mountain~ai-web-scraper-extract-data-with-ease/run-sync": {
      "post": {
        "operationId": "run-sync-eloquent_mountain-ai-web-scraper-extract-data-with-ease",
        "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": [
          "start_urls"
        ],
        "properties": {
          "start_urls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Provide one or more URLs",
            "items": {
              "type": "string"
            }
          },
          "instructions": {
            "title": "Instructions",
            "type": "string",
            "description": "Desired items to scrape in natural language. Example: 'product description and product price'. Required for the default 'items' output mode; ignored by 'chunks' mode except when following links, where it guides which links to follow."
          },
          "output_mode": {
            "title": "Output mode",
            "enum": [
              "items",
              "chunks"
            ],
            "type": "string",
            "description": "How results are shaped. 'items' (default) uses vision + Gemini to extract the fields you describe. 'chunks' turns the actor into a RAG loader: it reads each page's clean text and emits one dataset row per embeddable chunk (url, chunkIndex, headingPath, text, tokenCount, meta) — ready for LangChain / LlamaIndex and vector-DB ingestion. Chunks mode makes no vision/LLM calls, so it is fast and cheap.",
            "default": "items"
          },
          "chunk_size": {
            "title": "Chunk size (tokens)",
            "minimum": 50,
            "maximum": 4000,
            "type": "integer",
            "description": "Target size of each chunk in tokens (only used in 'chunks' output mode). Token counts are approximate. Match this to your embedding model's context window.",
            "default": 512
          },
          "chunk_overlap": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Approximate number of tokens of trailing context carried into the next chunk (only used in 'chunks' output mode). Overlap preserves continuity across chunk boundaries for better retrieval. Must be smaller than the chunk size.",
            "default": 64
          },
          "output_fields": {
            "title": "Output fields (optional)",
            "type": "array",
            "description": "Define the exact output columns instead of letting the AI derive them from the instructions. Guarantees stable column names across runs and saves one LLM call. Array of objects, e.g. [{\"name\": \"price\", \"type\": \"number\", \"description\": \"numeric price without currency symbol\"}]. Supported types: string, number, integer, boolean (default: string). Only \"name\" is required."
          },
          "follow_links": {
            "title": "Follow links to detail pages",
            "type": "boolean",
            "description": "Treat the start URLs as listing/category pages: the AI selects links that lead to detail pages matching your instructions (e.g. product pages) and extracts the data from each detail page instead of from the listing itself.",
            "default": false
          },
          "max_followed_links": {
            "title": "Max followed links",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of detail-page links to follow per start URL (only used when 'Follow links to detail pages' is enabled). Each visited detail page generates its own vision API calls.",
            "default": 10
          },
          "max_pages": {
            "title": "Max pages (pagination)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of pages to process per start URL by clicking 'next page' / 'load more' controls. Set to 1 to disable pagination. The control is auto-detected, or you can provide a CSS selector below.",
            "default": 1
          },
          "pagination_selector": {
            "title": "Pagination selector (optional)",
            "type": "string",
            "description": "CSS selector of the 'next page' or 'load more' button/link. Leave empty to let the actor auto-detect it (rel=next links, common button texts, AI fallback)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use Apify Proxy or custom proxies to access sites that block datacenter traffic (Cloudflare, Akamai, etc.)."
          },
          "has_infinite_scroll": {
            "title": "Has infinite scroll",
            "type": "boolean",
            "description": "Enable if the page has infinite scrolling (loads more content as you scroll down)",
            "default": false
          },
          "above_fold_only": {
            "title": "Above fold only",
            "type": "boolean",
            "description": "Only capture content visible without scrolling (above the fold)",
            "default": false
          },
          "save_screenshots": {
            "title": "Save screenshots",
            "type": "boolean",
            "description": "Save screenshots to key-value store for debugging purposes",
            "default": false
          },
          "handle_cookie_consent": {
            "title": "Handle cookie consent",
            "type": "boolean",
            "description": "Automatically detect and click cookie consent buttons. Disable to skip this step and speed up runs on pages without consent banners.",
            "default": true
          },
          "gemini_model": {
            "title": "Gemini model",
            "enum": [
              "gemini-3.1-flash-lite",
              "gemini-2.5-flash",
              "gemini-2.5-pro"
            ],
            "type": "string",
            "description": "Gemini model used for extraction. Flash-Lite is the fastest and cheapest, Flash is more capable, Pro is the most capable but slowest and most expensive.",
            "default": "gemini-3.1-flash-lite"
          },
          "device_type": {
            "title": "Device type",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Choose viewport simulation type",
            "default": "desktop"
          },
          "mobile_device_model": {
            "title": "Mobile device model",
            "enum": [
              "iPhone 15 Pro Max",
              "iPhone 15 Pro",
              "iPhone 15 Plus",
              "iPhone 15",
              "iPhone SE (2022)",
              "Samsung Galaxy S24",
              "Samsung Galaxy S23",
              "Custom"
            ],
            "type": "string",
            "description": "Specific mobile device to emulate (only used when device type is mobile)",
            "default": "iPhone 15"
          },
          "custom_viewport_width": {
            "title": "Custom viewport width",
            "minimum": 200,
            "maximum": 2000,
            "type": "integer",
            "description": "Custom viewport width in pixels (only used when mobile device model is 'Custom')",
            "default": 393
          },
          "custom_viewport_height": {
            "title": "Custom viewport height",
            "minimum": 200,
            "maximum": 2000,
            "type": "integer",
            "description": "Custom viewport height in pixels (only used when mobile device model is 'Custom')",
            "default": 852
          },
          "max_concurrent_screenshots": {
            "title": "Max concurrent screenshots",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of screenshots to process simultaneously (higher values = faster but more resource intensive)",
            "default": 4
          },
          "screenshot_timeout": {
            "title": "Screenshot timeout",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout in seconds for each screenshot analysis (increase if screenshots are complex)",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}