{
  "openapi": "3.0.1",
  "info": {
    "title": "Products Shop Crawler",
    "description": "It discovers product pages from start URLs and/or sitemaps, follows internal links intelligently, and extracts structured data such as product name, description, price, currency, SKU, images, availability, and page metadata.",
    "version": "0.0",
    "x-build-id": "97U5Ld0bLH8fGWEgT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/emt_getdataforu~products-shop-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-emt_getdataforu-products-shop-crawler",
        "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/emt_getdataforu~products-shop-crawler/runs": {
      "post": {
        "operationId": "runs-sync-emt_getdataforu-products-shop-crawler",
        "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/emt_getdataforu~products-shop-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-emt_getdataforu-products-shop-crawler",
        "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": "Homepage, category, or collection URLs to start from. Leave empty if you only use sitemap URLs below. Note: regular webpage URLs should usually go here, not in the sitemap field.\n\n**Examples by platform (replace with your own URLs):**\n- Shopify: `https://thewolf.vn/collections/giay-da-nam` (auto-reads `var meta` inline JSON for variants, prices, gallery)\n- WooCommerce: `https://teeworld.vn/shop/` (DOM + `.woocommerce-Price-amount` fallback)\n- Haravan: `https://juno.vn/collections/all` (auto-reads `window.product` / `Haravan.product`)\n- Sapo / Bizweb: `https://your-sapo-shop.com/collections/all` (auto-reads `Sapo.product`)\n- Magento: `https://your-magento-shop.com/` (microdata + `form#product_addtocart_form` fallback)\n- Custom VN (cellphones, dienmayxanh, fptshop…): often work via JSON-LD `Product`",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "productSitemapUrls": {
            "title": "Product sitemap URLs (recommended for Shopify / Haravan)",
            "minItems": 0,
            "type": "array",
            "description": "One XML sitemap URL per line. Prefer `/sitemap.xml` (index sitemap). Nested indexes and `.gz` are supported.\n\n**Examples by platform:**\n- Shopify: `https://thewolf.vn/sitemap.xml` (index → `sitemap_products_*.xml`)\n- Haravan: `https://juno.vn/sitemap.xml`\n- WooCommerce (Yoast / Rank Math): `https://teeworld.vn/product-sitemap.xml` or `https://teeworld.vn/sitemap_index.xml`\n- Sapo: `https://your-sapo-shop.com/sitemap.xml`\n- Magento: `https://your-magento-shop.com/pub/sitemap.xml`\n\nFor Shopify, use the index sitemap instead of shortened `sitemap_products_*.xml` URLs.",
            "items": {
              "type": "string"
            }
          },
          "onlyFollowProductSitemapsFromIndex": {
            "title": "Only follow product sitemap branches from index",
            "type": "boolean",
            "description": "When enabled, index sitemap parsing follows only child sitemap URLs containing `sitemap_products`. Useful for Shopify stores to skip pages/blog/collections branches.",
            "default": true
          },
          "maxRequestsPerCrawl": {
            "title": "Max requests per crawl",
            "minimum": 1,
            "maximum": 99999999,
            "type": "integer",
            "description": "Total page requests allowed in a run (including discovered links). Homepages often contain many navigation links; low values can hit enqueue limits before reaching enough product pages.",
            "default": 3000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of parallel requests. Higher values are faster but increase blocking risk.",
            "default": 10
          },
          "maxProduct": {
            "title": "Max products to store",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Maximum product records pushed to dataset. `0` means unlimited. Once reached, the Actor stops storing new products, stops deep link expansion, and gracefully stops the crawler run.",
            "default": 0
          },
          "maxUrlsFromSitemaps": {
            "title": "Max URLs collected from sitemaps",
            "minimum": 1,
            "maximum": 5000000,
            "type": "integer",
            "description": "Upper bound for URLs extracted from sitemap XML to prevent excessive memory usage on very large sitemap sets.",
            "default": 100000
          },
          "followInternalLinks": {
            "title": "Follow internal links",
            "type": "boolean",
            "description": "If disabled, crawl only seed URLs (start URLs + sitemap URLs). If enabled, discover additional links within the same subdomain.",
            "default": true
          },
          "maxDepth": {
            "title": "Max link depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many link hops from seed URLs are allowed. `0` means no expansion.",
            "default": 5
          },
          "saveNonProductPages": {
            "title": "Store non-product pages",
            "type": "boolean",
            "description": "When disabled (default), only product-like pages are stored. Enable for debugging or broader page analysis.",
            "default": false
          },
          "excludeNavigationNoisePaths": {
            "title": "Exclude non-commerce navigation paths",
            "type": "boolean",
            "description": "Exclude common non-shopping paths (blog, support, account, contact, etc.) from discovered links to preserve request budget for product/category pages.",
            "default": true
          },
          "smartFollowPatterns": {
            "title": "Use smart commerce URL patterns",
            "type": "boolean",
            "description": "Prioritize URL patterns commonly used by e-commerce platforms (e.g. `/product/`, `/products/`, `/collections/`, `/category/`) to improve product discovery.",
            "default": true
          },
          "followIncludeGlobs": {
            "title": "Additional include URL globs",
            "type": "array",
            "description": "Advanced: add extra glob patterns for URLs that should be considered for enqueueing. Leave empty to use default smart patterns.",
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "followExcludeRegex": {
            "title": "Additional exclude regex for discovered links",
            "pattern": "^[^\\n\\r]{0,500}$",
            "type": "string",
            "description": "Advanced: URLs matching this regex are skipped during enqueue (in addition to built-in excludes)."
          },
          "stripTrackingQueryParams": {
            "title": "Strip tracking query params",
            "type": "boolean",
            "description": "Remove common tracking query params (`utm_*`, `fbclid`, `gclid`, etc.) before enqueueing to reduce duplicate URLs.",
            "default": true
          },
          "dropCommonFilterQueryParams": {
            "title": "Drop common filter/sort query params",
            "type": "boolean",
            "description": "Remove common faceted-navigation params (`filter_*`, `sort`, `orderby`, `view`, `variant`, etc.) before enqueueing to avoid URL explosion.",
            "default": true
          },
          "sitemapFetchDelayMs": {
            "title": "Delay between sitemap requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Delay between sitemap fetches. Useful for hosts sensitive to request bursts.",
            "default": 0
          },
          "productUrlRegex": {
            "title": "Product URL regex filter",
            "pattern": "^[^\\n\\r]{0,500}$",
            "type": "string",
            "description": "Optional regex to keep only matching page URLs from sitemap urlsets (not index files). Leave empty to disable."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}