{
  "openapi": "3.0.1",
  "info": {
    "title": "Lazada Scraper",
    "description": "Scrape Lazada products across all six marketplaces: Singapore, Malaysia, Indonesia, the Philippines, Thailand and Vietnam. Search by keyword, browse a category or read a single product, and get the price with its currency, the seller, the brand, the rating and the stock state on every row.",
    "version": "0.1",
    "x-build-id": "qQZVJyfxsVQpDggHK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~lazada-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-lazada-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/s-r~lazada-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s-r-lazada-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/s-r~lazada-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-lazada-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": {
          "market": {
            "title": "Marketplace",
            "enum": [
              "sg",
              "my",
              "id",
              "ph",
              "th",
              "vn"
            ],
            "type": "string",
            "description": "Which Lazada marketplace to read. The marketplace decides the currency of every price in the output: Singapore is SGD, Malaysia MYR, Indonesia IDR, the Philippines PHP, Thailand THB, Vietnam VND. Products, prices and sellers differ per marketplace, so the same search returns a different catalogue in each.",
            "default": "sg"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search, one per line. Each term is searched on the selected marketplace and returns up to 40 products per page. If the marketplace has no real match for a term it answers with unrelated recommended products instead of an empty page, and this Actor detects that and reports the term under noMatchQueries rather than handing you the recommendations as results.",
            "default": [
              "phone case"
            ],
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category URLs",
            "type": "array",
            "description": "Lazada category or browse URLs to read, one per line. Copy them straight from your browser address bar, for example https://www.lazada.sg/shop-mobiles/. Filters already applied in the URL are preserved. A URL on a different marketplace than the one selected above is moved onto the selected marketplace host.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs or item IDs",
            "type": "array",
            "description": "Individual products to read in full detail, one per line. Accepts a full product URL or just the numeric item ID. Detail rows add the brand, the full description, the category path, the variant list and a currency code read from the product page itself. A product that no longer exists is reported under deadProducts instead of being silently skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many unique products across all search terms, categories and product URLs. Duplicates across pages are removed before this is counted. Free Apify plans receive at most 10 rows per run and this Actor lowers the target to match before it makes its first request, so a free run does not wait for pages it will not receive.",
            "default": 40
          },
          "pagesPerSearch": {
            "title": "Pages per search term",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many result pages to walk for each search term and each category URL. One page is 40 products. The marketplace serves at most 102 pages for any query, and this Actor also stops early when a page repeats products it has already returned, when the marketplace says there are no more pages, or when the product target is reached. The reason it stopped is reported per term under paginationStops.",
            "default": 1
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "popularity",
              "price_asc",
              "price_desc",
              "newest"
            ],
            "type": "string",
            "description": "The ordering the marketplace applies to search results before this Actor reads them. Popularity is the marketplace default and is the best match ordering. Price ascending and descending are useful for finding the cheapest or most expensive offers for a term. Ignored for category URLs that already carry their own sort.",
            "default": "popularity"
          },
          "minQueryRelevance": {
            "title": "Minimum query relevance",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How much of a result page must actually relate to your search term before the page is accepted, as a percentage. Lazada answers an unmatched search with 40 recommended products and still reports thousands of matches, so this Actor measures how many returned product names, brands or sellers contain a word from your search term. A genuine search scores close to 100. A search with no real match scores 0. Lower this only if you search in a language where your terms do not appear in product titles.",
            "default": 25
          },
          "keepUnmatchedResults": {
            "title": "Keep recommended products when a search has no real match",
            "type": "boolean",
            "description": "Off by default. When the relevance check above fails, the products the marketplace offered instead are discarded and the search term is reported under noMatchQueries. Turn this on to keep those products anyway; they are then flagged with matches_query false and is_recommendation_fallback true on every row, so they can never be mistaken for real search results.",
            "default": false
          },
          "attemptsPerPage": {
            "title": "Attempts per page",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many times to retry a page that the marketplace declines to serve. Lazada answers a declined request with a 200 response that contains no products at all, so retrying is how a page gets read rather than a nicety. Raise this if runs come back with a blocked outcome, lower it to fail faster. Every attempt spent is reported as requestAttempts in the run summary.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}