{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Web Data Extractor: Extract Structured Data from Any Website",
    "description": "No-code AI web scraper. Paste public page URLs, describe the fields in plain language, and extract structured JSON — no CSS selectors, no OpenAI key. Respects robots.txt, skips login walls, not for personal data. $0.008 per extracted page (100 pages = $0.80).",
    "version": "0.1",
    "x-build-id": "UNaMu523UCVe4wGMw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datatools-ai~ai-web-data-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datatools-ai-ai-web-data-extractor",
        "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/datatools-ai~ai-web-data-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datatools-ai-ai-web-data-extractor",
        "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/datatools-ai~ai-web-data-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datatools-ai-ai-web-data-extractor",
        "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": {
          "urls": {
            "title": "Public page URLs",
            "type": "array",
            "description": "http(s) URLs of public pages to extract structured data from. Example: [\"https://books.toscrape.com/\", \"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html\"]. Do not send login-only pages, and do not use this Actor to collect personal data about private individuals. One output item is written per URL.",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "title": "Fields to extract (plain language)",
            "type": "array",
            "description": "One object per field to extract, described in plain language: {\"name\":\"price\",\"instruction\":\"Product price including currency, or null\",\"type\":\"text|enum|number|boolean|list\",\"options\":[\"A\",\"B\"]}. 'options' is only for type enum. 'list' returns an array of strings. Use this or jsonSchema (fields wins if both are set).",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Field name",
                  "type": "string",
                  "description": "Identifier in the output JSON, e.g. price or in_stock.",
                  "editor": "textfield"
                },
                "instruction": {
                  "title": "Instruction",
                  "type": "string",
                  "description": "Plain-language description of what to extract, in any language.",
                  "editor": "textarea"
                },
                "type": {
                  "title": "Type",
                  "type": "string",
                  "enum": [
                    "text",
                    "enum",
                    "number",
                    "boolean",
                    "list"
                  ],
                  "description": "Output type."
                },
                "options": {
                  "title": "Enum options",
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Required when type is enum."
                }
              }
            }
          },
          "jsonSchema": {
            "title": "Or: JSON Schema of the object to extract",
            "type": "object",
            "description": "Optional alternative to fields. A JSON Schema for one object (type: object, with named properties). Used only if fields is empty. Property names must be simple identifiers and cannot be url, status, finalUrl, httpStatus, fetchedAt, error, note or contentType."
          },
          "extraInstructions": {
            "title": "Extra instructions (optional)",
            "type": "string",
            "description": "Global rules applied to every page, e.g. 'Answer in Spanish' or 'Prices should include the currency symbol'."
          },
          "maxPages": {
            "title": "Max pages per run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on URLs processed (and potentially charged) in one run. Default 20. Use a small number while testing your field instructions.",
            "default": 20
          },
          "requestDelayMs": {
            "title": "Delay between requests to the same site (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Polite delay between HTTP requests to the same origin. Also respects Crawl-delay in robots.txt when it is larger. Default 1000 ms.",
            "default": 1000
          },
          "concurrency": {
            "title": "Parallel page workers",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages are processed at once (each origin is still rate-limited). Keep this low to stay polite. Default 2.",
            "default": 2
          },
          "maxTextChars": {
            "title": "Max page text sent to the model",
            "minimum": 1000,
            "maximum": 40000,
            "type": "integer",
            "description": "Characters of visible text kept after HTML is stripped. Long pages are truncated to protect cost and latency. Default 12,000.",
            "default": 12000
          },
          "model": {
            "title": "Model",
            "enum": [
              "gpt-4o-mini",
              "gpt-4.1-mini"
            ],
            "type": "string",
            "description": "OpenAI model used for extraction. GPT-4o mini is the default and is included in the per-page price. The price per extracted page is the same for either option.",
            "default": "gpt-4o-mini"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}