{
  "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": "Q7udRx44Lt7Xb3bu1"
  },
  "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": [
              "phone case"
            ]
          },
          "market": {
            "title": "Market",
            "enum": [
              "PH",
              "SG",
              "MY",
              "TH",
              "VN",
              "ID"
            ],
            "type": "string",
            "description": "Target Lazada country site. The actor uses the matching site host and, on Apify, automatically selects the matching residential proxy country for that market.",
            "default": "TH"
          },
          "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": "Maximum output items (max 200; free users capped at 200/run)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of normalized rows written to the dataset after dedupe (1–200). Free Apify plan users: also limited to 10 total runs of this Actor (Actor developer policy).",
            "default": 1
          },
          "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
          },
          "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)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}