{
  "openapi": "3.0.1",
  "info": {
    "title": "Lazada Product Scraper - SG, MY, PH, TH, VN, ID",
    "description": "Collect Lazada search result listings across Singapore, Malaysia, Philippines, Thailand, Vietnam, and Indonesia via browser-context AJAX with market-matched residential proxies.",
    "version": "0.3",
    "x-build-id": "ZoHh6m834Jp7hf7YN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~lazada-ph-search-results-collector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-lazada-ph-search-results-collector",
        "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/lentic_clockss~lazada-ph-search-results-collector/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-lazada-ph-search-results-collector",
        "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/lentic_clockss~lazada-ph-search-results-collector/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-lazada-ph-search-results-collector",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "Search keywords to query on Lazada. Empty or whitespace-only entries are removed before validation. Platform empty runs use the default.",
            "items": {
              "type": "string"
            },
            "default": [
              "bluetooth earbuds"
            ]
          },
          "market": {
            "title": "Market",
            "enum": [
              "PH",
              "SG",
              "MY",
              "TH",
              "VN",
              "ID"
            ],
            "type": "string",
            "description": "Target Lazada country site. The worker uses the matching site host and control-plane-managed market egress.",
            "default": "MY"
          },
          "pages": {
            "title": "Pages per keyword",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many Lazada search result pages to fetch per keyword. Hard-capped at 3 for v1.",
            "default": 1
          },
          "maxItems": {
            "title": "Max rows per keyword or seller key",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Most rows for each keyword or explicit seller key, after dedupe (1–200). Default 70; larger numbers are collected in parts of 70. Products, reviews, and all other row types share that input's budget. The whole run stops at your maximum total charge. Free Apify plan: up to 200 rows per run and 10 runs of this Actor (limits set by the Actor developer).",
            "default": 70
          },
          "minItemsPerPage": {
            "title": "Minimum items per page",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Minimum acceptable number of listItems in a parsed AJAX payload. Lower this only for low-result keywords.",
            "default": 1
          },
          "headless": {
            "title": "Run browser headless",
            "type": "boolean",
            "description": "Whether the browser should run in headless mode. Disable only for local debugging.",
            "default": true
          },
          "includeRawPayload": {
            "title": "Save raw AJAX payloads",
            "type": "boolean",
            "description": "When enabled, raw AJAX payloads are stored in the key-value store. This improves debugging but increases storage cost.",
            "default": false
          },
          "debug": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "When enabled, failures attempt to store screenshots, page HTML, payload metadata, and extra logs in the key-value store.",
            "default": false
          },
          "maxRetriesPerKeyword": {
            "title": "Max retries per keyword",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "How many times to retry a keyword after a recoverable failure before marking it failed.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 15,
            "maximum": 120,
            "type": "integer",
            "description": "Per-keyword timeout budget for page navigation, AJAX fetch, and parsing work.",
            "default": 90
          },
          "scrollSteps": {
            "title": "Scroll steps",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many light scroll steps to perform after landing on the search page before calling the AJAX endpoint.",
            "default": 3
          },
          "scrollDelayMs": {
            "title": "Delay after each scroll (ms)",
            "minimum": 0,
            "maximum": 3000,
            "type": "integer",
            "description": "Delay in milliseconds between light scroll steps to give the page time to hydrate.",
            "default": 300
          },
          "postLoadWaitMs": {
            "title": "Wait after page load (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Extra wait after initial page load before collecting AJAX data, useful when Lazada renders late.",
            "default": 1200
          },
          "enrichDetails": {
            "title": "Enrich product details (PDP)",
            "type": "boolean",
            "description": "When enabled (default), the worker opens the product detail page for the first results to upgrade lead fields: seller org id, ship-from city/district address granularity, shop link. Disable only for fastest list-only collection.",
            "default": true
          },
          "enrichMaxItems": {
            "title": "Max items to enrich from PDP",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many of the collected items to enrich via the product detail page (0-10).",
            "default": 3
          },
          "searchEngine": {
            "title": "Search engine",
            "enum": [
              "auto",
              "mtop",
              "browser"
            ],
            "type": "string",
            "description": "auto: anonymous mtop h5api first with browser fallback; mtop: protocol channel only (fails if denied); browser: force the credentialed patchright path.",
            "default": "auto"
          },
          "includeReviews": {
            "title": "Include buyer reviews",
            "type": "boolean",
            "description": "Emit available buyer reviews as separate rowType=review dataset rows. Product and review rows share maxItems. Not applied to sitemap-only records.",
            "default": false
          },
          "maxReviewsPerItem": {
            "title": "Max reviews per item",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on separate review rows considered per product (0–50), still bounded by that input's maxItems budget.",
            "default": 5
          },
          "includeSellerInfo": {
            "title": "Include seller info",
            "type": "boolean",
            "description": "Attach the seller dimension (shop name, seller rating, follower count, chat availability) to each result via the anonymous mtop store.visit endpoint. sellerKey is derived from the seller name — no extra credential needed.",
            "default": false
          },
          "includeMultiBuy": {
            "title": "Include multi-buy offers",
            "type": "boolean",
            "description": "Attach multi-buy / bundle-promotion data (offer count, promo page URL) to each result via the anonymous mtop detail.multiBuyItems endpoint. Only present on items that actually run a multi-buy offer.",
            "default": false
          },
          "enrichEngine": {
            "title": "Detail enrich engine",
            "enum": [
              "auto",
              "htmlDirect",
              "zyte",
              "none"
            ],
            "type": "string",
            "description": "PDP enrichment channel. auto: free ISP-direct HTML fetch first, then zyte extract fallback. htmlDirect: ISP-direct only. zyte: paid zyte extract only. none: skip PDP enrichment.",
            "default": "auto"
          },
          "discoveryMode": {
            "title": "Discovery mode",
            "enum": [
              "search",
              "sitemap",
              "both",
              "sellers",
              "live",
              "shopcatalog"
            ],
            "type": "string",
            "description": "search: keyword results; sitemap: verified product details from the site's inventory, not keyword matches; both: search first, then inventory if budget remains; sellers: enumerate storefronts from the sitemap-sellers bucket and profile each via the anonymous store.visit endpoint (seller dimension, not product rows). Sitemap requires enrichDetails=true and enrichMaxItems>0. live: anonymous live.channel feed (liveId/anchor/roomStatus, presenter recommends). shopCatalog: per-seller storefront + in-shop category tree via shop.category.bysellerkey.query (sellerKeys or sitemap-sellers).",
            "default": "search"
          },
          "sitemapBuckets": {
            "title": "Maximum sitemap buckets",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Bound inventory discovery to this many sitemap buckets.",
            "default": 3
          },
          "sitemapMaxUrls": {
            "title": "Maximum discovered URLs",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound for inventory URLs. Emitted products are also limited by maxItems and enrichMaxItems.",
            "default": 200
          },
          "workerBaseUrl": {
            "title": "Worker base URL (optional)",
            "type": "string",
            "description": "Override worker origin for this run. Default: Actor env WORKER_BASE_URL. Production migrations should update WORKER_BASE_URL in Actor settings (no code change)."
          },
          "sellerKeys": {
            "title": "Seller keys",
            "type": "array",
            "description": "Explicit sellerKey list for discoveryMode=shopCatalog (storefront slug, e.g. itel). Empty/absent -> harvested from the sitemap-sellers bucket.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}