{
  "openapi": "3.0.1",
  "info": {
    "title": "Apex Hali Scraper",
    "description": "Apex Hali Scraper extracts carpet and rug product data from apexhali.com, including prices, availability, images, variants, descriptions, breadcrumbs, SEO metadata, and collection details for catalog building, price monitoring, and e-commerce research.",
    "version": "0.0",
    "x-build-id": "g4hLVuKo9n0reEjhw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sovanza.inc~apex-hali-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sovanza.inc-apex-hali-scraper",
        "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/sovanza.inc~apex-hali-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sovanza.inc-apex-hali-scraper",
        "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/sovanza.inc~apex-hali-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sovanza.inc-apex-hali-scraper",
        "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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One or more Apex Hali collection, category, or product URLs to start from. If empty, defaults to the English homepage. Each item should have a 'url' field. Supports collection pages (/en/collections/...), product pages (/en/products/...), and the homepage.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "discover_and_scrape",
              "product_urls_only",
              "category_urls_only"
            ],
            "type": "string",
            "description": "discover_and_scrape: crawl category/collection pages and scrape all found products. product_urls_only: scrape only the provided product URLs without discovery. category_urls_only: extract category/collection structure without scraping product detail pages.",
            "default": "discover_and_scrape"
          },
          "maxProducts": {
            "title": "Max products",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of product pages to scrape. Set to 0 for unlimited (not recommended for large catalogs).",
            "default": 200
          },
          "maxPages": {
            "title": "Max category/list pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of category, collection, or pagination pages to visit during discovery.",
            "default": 20
          },
          "categoryFilters": {
            "title": "Category filters",
            "type": "array",
            "description": "Optional list of category keywords to restrict scraping (case-insensitive). For example: ['machine carpet', 'bamboo', 'living room']. Leave empty to scrape all discovered categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeCollections": {
            "title": "Include collection rows",
            "type": "boolean",
            "description": "When enabled, collection/category summary rows are pushed to the dataset in addition to product rows.",
            "default": true
          },
          "includeProductDetails": {
            "title": "Include full product detail",
            "type": "boolean",
            "description": "When enabled, each discovered product URL is visited and full product details are extracted. When disabled, only product URL rows are emitted from listing pages.",
            "default": true
          },
          "includeBreadcrumbs": {
            "title": "Include breadcrumbs",
            "type": "boolean",
            "description": "Extract category path breadcrumbs from product and collection pages.",
            "default": true
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Collect all product image URLs found on the page.",
            "default": true
          },
          "includeVariants": {
            "title": "Include variants",
            "type": "boolean",
            "description": "Extract size, color, and other option groups if visible on the product page.",
            "default": true
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Extract product description text from product detail pages.",
            "default": true
          },
          "includeSeoMetadata": {
            "title": "Include SEO metadata",
            "type": "boolean",
            "description": "Extract meta title and meta description from each page.",
            "default": true
          },
          "includeAvailabilitySignals": {
            "title": "Include availability signals",
            "type": "boolean",
            "description": "Extract and normalize availability/stock signals from product pages.",
            "default": true
          },
          "includePriceHistoryFields": {
            "title": "Include compare-at price fields",
            "type": "boolean",
            "description": "Extract visible compare-at / original price fields where shown. Does NOT fabricate historical pricing — only captures what is visible on the page.",
            "default": false
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "tr",
              "auto"
            ],
            "type": "string",
            "description": "Language variant of the site to scrape. 'en' uses apexhali.com/en, 'tr' uses apexhali.com/tr. 'auto' keeps URLs as provided.",
            "default": "en"
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum seconds to wait for each page to load.",
            "default": 45
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of pages being processed in parallel (browser tabs/instances). Lower values are gentler on the target server.",
            "default": 8
          },
          "blockAssets": {
            "title": "Block non-essential assets",
            "type": "boolean",
            "description": "Block images, fonts, and tracking scripts to speed up page loads. Disable if product images fail to resolve.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Residential proxy with country TR (Turkey) is recommended for apexhali.com.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "TR"
            }
          },
          "proxyCountry": {
            "title": "Proxy country override",
            "enum": [
              "AUTO_SELECT_PROXY_COUNTRY",
              "TR",
              "DE",
              "GB",
              "US",
              "NL"
            ],
            "type": "string",
            "description": "Country code for proxy selection. TR (Turkey) is recommended for apexhali.com. Overrides the country in proxyConfiguration when set.",
            "default": "AUTO_SELECT_PROXY_COUNTRY"
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable extra logging, raw row text, and link discovery details in output records.",
            "default": false
          },
          "saveHtmlSnapshot": {
            "title": "Save HTML snapshot",
            "type": "boolean",
            "description": "Save page HTML to a local file (debug_page.html) when extraction returns null fields. Only useful when running locally or in Apify with KV store access.",
            "default": false
          },
          "saveScreenshot": {
            "title": "Save screenshot",
            "type": "boolean",
            "description": "Save a PNG screenshot alongside the HTML snapshot when saveHtmlSnapshot is also enabled.",
            "default": false
          },
          "saveParsedRows": {
            "title": "Save parsed row debug fields",
            "type": "boolean",
            "description": "Include debug fields (titleSource, priceSource, imageSource, rawRowText, normalizationWarnings) in product records.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}